@maestro_io/maestro-web-sdk 6.0.2 → 6.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -279,7 +279,7 @@ const Q=function(t){const e=[];let n=0;for(let i=0;i<t.length;i++){let r=t.charC
279
279
  * See the License for the specific language governing permissions and
280
280
  * limitations under the License.
281
281
  */
282
- function et(t){return t&&t._delegate?t._delegate:t}}).call(this,n(43),n(61))},function(t,e,n){"use strict";n.r(e),n.d(e,"PanelEvent",(function(){})),n.d(e,"IMaestroEventDelegate",(function(){})),n.d(e,"IMaestroEvent",(function(){return f.a})),n.d(e,"IMaestroKeyPlaysResponse",(function(){return ee.a})),n.d(e,"MaestroPanelType",(function(){return A.a})),n.d(e,"SDKEventConfigParams",(function(){return h.SDKEventConfigParams})),n.d(e,"SDKStopEventParams",(function(){return h.SDKStopEventParams})),n.d(e,"StartClientFocusManagementParams",(function(){})),n.d(e,"StartSDKFocusManagementParams",(function(){return d.StartSDKFocusManagementParams})),n.d(e,"OverlayData",(function(){return d.OverlayData})),n.d(e,"OverlayEvent",(function(){}));var i=n(0),r=n.n(i),s=n(65),a=n.n(s);function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=class{constructor(){o(this,"renderersMap",new Map)}async renderOverlay(t){if(this.renderersMap.has(t)){this.renderersMap.get(t).unmount(),this.renderersMap.delete(t)}const e=await this.getRenderer(t),i=n(200).default,s=n(283).default;return e.render(r.a.createElement(i,null,r.a.createElement(s,null))),()=>{this.renderersMap.has(t)&&this.renderersMap.get(t)===e&&(e.unmount(),this.renderersMap.delete(t))}}async renderPanel(t){if(this.renderersMap.has(t)){this.renderersMap.get(t).unmount(),this.renderersMap.delete(t)}const e=await this.getRenderer(t),i=n(200).default,s=n(282).default;return e.render(r.a.createElement(i,null,r.a.createElement(s,null))),()=>{this.renderersMap.has(t)&&this.renderersMap.get(t)===e&&(e.unmount(),this.renderersMap.delete(t))}}async getRenderer(t){if(this.renderersMap.has(t))return this.renderersMap.get(t);const e=document.getElementById(t);if(!e)throw new Error(`Element with id ${t} not found`);const n=a.a;let i="function"==typeof n.createRoot?n.createRoot:null;if(i||(i=await async function(){try{const{createRoot:t}=await import("react-dom/client");return"function"==typeof t?t:null}catch{return null}}()),i){const n=i(e),r={render:t=>{n.render(t)},unmount:()=>{n.unmount(),e.innerHTML=""}};return this.renderersMap.set(t,r),r}if("function"==typeof n.render){const i={render:t=>{n.render(t,e)},unmount:()=>{"function"==typeof n.unmountComponentAtNode&&n.unmountComponentAtNode(e),e.innerHTML=""}};return this.renderersMap.set(t,i),i}throw new Error("Maestro Web SDK: No supported ReactDOM API found. Use React 18+ with react-dom (createRoot on ReactDOM or react-dom/client), or ensure react-dom/client resolves in your bundler.")}};const c=!0,u=!1;var h=n(69),d=n(60),f=n.n(d),_=n(8),p=n(6),m=n(26),v=n(54);const g={panels:{bets:{hidePanel:!1,hideWagers:!1},stats:{hidePanel:!1},keyPlays:{hidePanel:!1},fantasy:{hidePanel:!1}}};var A=n(15);function b(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const y={[A.a.ESPN_BETS]:"bets",[A.a.ESPN_STATS]:"stats",[A.a.ESPN_KEY_PLAYS]:"keyPlays",[A.a.ESPN_FANTASY]:"fantasy",[A.a.ESPN_SHOP]:"shop"};class w{constructor(){b(this,"_settings",void 0),this._settings=new _.a(g)}static getInstance(){return w.instance||(w.instance=new w),w.instance}get settings(){return this._settings}getCurrentSettings(){return this._settings.value}updateSettings(t){if(!this.validateSettings(t))return void console.warn("Invalid user settings provided, using default setting");const e=this.mergeSettings(this._settings.value,t);this._settings.value=e}getPanelSettings(t){var e;return null===(e=this._settings.value.panels)||void 0===e?void 0:e[t]}isPanelHidden(t){const e=this.mapPanelTypeToSettingsKey(t);if(!e)return!1;const n=this.getPanelSettings(e);return!0===(null==n?void 0:n.hidePanel)}shouldHideWagers(){const t=this.getPanelSettings("bets");return!0===(null==t?void 0:t.hideWagers)}resetToDefaults(){this._settings.value=g}validateSettings(t){if(!t||"object"!=typeof t)return!1;if(t.panels&&"object"!=typeof t.panels)return!1;if(t.panels)for(const[e,n]of Object.entries(t.panels)){if(n&&"object"!=typeof n)return!1;if(n)for(const[t,i]of Object.entries(n))if(void 0!==i&&"boolean"!=typeof i)return console.warn(`Invalid setting value for ${e}.${t}: expected boolean, got ${typeof i}`),!1}return!0}mergeSettings(t,e){const n={panels:{...t.panels}};if(e.panels)for(const[t,i]of Object.entries(e.panels))if(i){const e={...n.panels[t]};for(const[t,n]of Object.entries(i))void 0!==n&&(e[t]=n);n.panels[t]=e}return n}mapPanelTypeToSettingsKey(t){return t in y?y[t]:null}}function E(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){var e,n;return!1!==(null===(e=t.renderer)||void 0===e||null===(n=e.supported_platforms)||void 0===n?void 0:n.bbd)}function C(t,e){const n=e.reduce((t,e)=>t.concat(e.panels||[]),[]).filter(e=>e.panel_type===t);return 0!==n.length&&n.some(k)}function x(t,e){for(const n of e)for(const e of n.panels||[])if(e.panel_type===t&&k(e))return e.panel_name||"";return""}b(w,"instance",void 0);class B{getAvailablePanelsFromConfig(){const t=ge.getPageConfigs(),e=new Set,n=[];for(const i of t)if(i&&Array.isArray(i.panels)&&0!==i.panels.length)for(const r of i.panels){const i=r.panel_type;i&&Object.values(A.a).includes(i)&&(e.has(i)||C(i,t)&&(e.add(i),n.push({type:i,title:x(i,t)})))}return this.sortPanelsByOrder(n,t)}resolvePanelOrders(t){const e=new Map;for(const n of t)if(n&&Array.isArray(n.panels))for(const t of n.panels){const n=t.panel_type;if(!n||"number"!=typeof t.order)continue;const i=e.get(n);(void 0===i||t.order<i)&&e.set(n,t.order)}return e}sortPanelsByOrder(t,e){const n=this.resolvePanelOrders(e);return t.map((t,e)=>({panel:t,index:e,order:n.get(t.type)})).sort((t,e)=>void 0!==t.order&&void 0!==e.order?t.order-e.order||t.index-e.index:void 0!==t.order?-1:void 0!==e.order?1:t.index-e.index).map(t=>t.panel)}constructor(){E(this,"_panels",new _.a([])),E(this,"_currentPanel",new _.a(null)),E(this,"_panelWidth",new _.a(0)),E(this,"settingsManager",void 0),E(this,"settingsUnsubscribe",null),this.settingsManager=w.getInstance(),this.setPanels(),this.subscribeToSettingsChanges()}setPanels(){const t=this.filterPanels(),e=ge.getIsProdEnv();t.length||e?this._panels.value=t:this._panels.value=[{type:"helloWorld",title:"HELLO WORLD"}],this.updateActivePanel()}subscribeToSettingsChanges(){this.settingsUnsubscribe=this.settingsManager.settings.subscribe(()=>{this.setPanels()})}filterPanels(){return this.getAvailablePanelsFromConfig().filter(t=>!this.settingsManager.isPanelHidden(t.type))}updateActivePanel(){!this.currentPanel&&this.panels[0]&&(this.currentPanel=this.panels[0].type),this.panels.length>0&&this._currentPanel.value&&!this.panels.find(t=>t.type===this._currentPanel.value)&&(this._currentPanel.value=this.panels[0].type)}cleanup(){this.settingsUnsubscribe&&(this.settingsUnsubscribe(),this.settingsUnsubscribe=null),this._panels.value=[],this._currentPanel.value=null,this._panelWidth.value=0}get panels(){return this._panels.value}get panelsObservable(){return this._panels}get currentPanel(){return this._currentPanel.value}set currentPanel(t){this._currentPanel.value=t}get currentPanelObservable(){return this._currentPanel}get panelWidthObservable(){return this._panelWidth}setPanelWidth(t){this._panelWidth.value!==t&&(this._panelWidth.value=t)}setActivePanel(t){t!==this.currentPanel&&void 0!==this.panels.find(e=>e.type===t)&&(this.currentPanel=t,this.updateActivePanel())}getIndex(t){const e=this.panels.findIndex(e=>e.type===t);return-1!==e?e:null}getPanelType(t){var e;return(null===(e=this.panels[t])||void 0===e?void 0:e.type)||null}get panelTypeToLeft(){if(!this.currentPanel)return null;const t=this.getIndex(this.currentPanel);return null===t||0===t?null:this.getPanelType(t-1)}get panelTypeToRight(){if(!this.currentPanel)return null;const t=this.getIndex(this.currentPanel);return null===t||t===this.panels.length-1?null:this.getPanelType(t+1)}getUnlistedPanels(){const t=ge.getPageConfigs(),e=new Set,n=[];for(const i of t)if(i&&Array.isArray(i.panels))for(const t of i.panels)t.panel_type&&!Object.values(A.a).includes(t.panel_type)&&(e.has(t.panel_type)||(e.add(t.panel_type),n.push({type:t.panel_type,title:t.panel_name||""})));return n}}var S=n(44),T=n(23),j=n(50);function q(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class P{constructor(t,e){q(this,"configObservable",new _.a(null)),q(this,"client",void 0),this.client=new T.b({externalNetworkClient:new S.a({backoff:2,baseURL:Object(j.a)(t,e),delay:1e3,retries:5})})}async fetchPageConfigByMetadata(t,e){try{return await this.client.externalApiRequest({endpoint:`/pages/sites/${t}/metadata/${e}.json`})}catch(t){return Object(p.a)("StaticService","fetchPageConfigByMetadata",t),Promise.resolve(null)}}fetchPageConfig({siteId:t,metadataValue:e,pageId:n}){return n?this.fetchPageConfigById(t,n):e?Array.isArray(e)?this.fetchPageConfigsByMetadata(t,e).then(t=>{var e;return null!==(e=t.find(Boolean))&&void 0!==e?e:null}):this.fetchPageConfigByMetadata(t,e):Promise.resolve(null)}fetchPageConfigsByMetadata(t,e){return Promise.all(e.map(e=>this.fetchPageConfigByMetadata(t,e)))}fetchPageConfigsByPageIds(t,e){return Promise.all(e.map(e=>this.fetchPageConfigById(t,e)))}async fetchPageConfigById(t,e){try{return await this.client.externalApiRequest({endpoint:`/pages/sites/${t}/pages/${e}.json`})}catch(t){return Object(p.a)("StaticService","fetchPageConfigById",t),Promise.resolve(null)}}static isPanelAvailable(t,e){var n;return null==t||null===(n=t.panels)||void 0===n?void 0:n.some(t=>{var n,i;return t.panel_type===e&&!1!==(null===(n=t.renderer)||void 0===n||null===(i=n.supported_platforms)||void 0===i?void 0:i.bbd)})}static isPanelAvailableInAny(t,e){return t.some(t=>P.isPanelAvailable(t,e))}pollGlobalConfig(t){const e=24e4+Math.floor(12e4*Math.random());return this.client.pollExternalApiRequest({endpoint:"/config/global.json",interval:e,onData:t,onError:t=>{Object(p.a)("StaticService","pollGlobalConfig",t)}})}}var I=P;function N(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class z{constructor(t){this.delegate=t,N(this,"awaitingHeaderRefresh",!1),N(this,"attempts",0)}setDelegate(t){this.delegate=t}notifyAuthError(t,e="Unauthorized"){this.awaitingHeaderRefresh||this.attempts>=3||(this.attempts+=1,this.awaitingHeaderRefresh=!0,this.delegate.onPanelEvent({type:"general:error",payload:{message:e,code:401,details:t}}))}headersRefreshed(){this.awaitingHeaderRefresh=!1}reset(){this.attempts=0,this.awaitingHeaderRefresh=!1}}var O=n(63),R=n(37);function D(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class M{constructor(){var t,e;D(this,"handle",void 0);const n=null===R.FoxStatsHandle||void 0===R.FoxStatsHandle||null===(t=R.FoxStatsHandle.Companion)||void 0===t||null===(e=t.startStandalone)||void 0===e?void 0:e.call(t);this.handle=null!=n?n:{setConfig:()=>{},updateTimecode:()=>{},updateListings:()=>{},subscribe:()=>{},pause:()=>{},resume:()=>{},retry:()=>{},close:()=>{}}}setConfig(t,e,n,i,r){const s=i&&Object.keys(i).length>0?Object.entries(i).map(([t,e])=>[t,e]):void 0;this.handle.setConfig(t,e,n,s,r)}updateTimecode(t){this.handle.updateTimecode(t)}subscribe(t){this.handle.subscribe(t)}pause(){this.handle.pause()}resume(){this.handle.resume()}retry(){this.handle.retry()}close(){this.handle.close()}}var L=n(16);function F(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t){return null==t.headers||"object"==typeof t.headers&&!Array.isArray(t.headers)&&Object.entries(t.headers).every(([t,e])=>"string"==typeof t&&"string"==typeof e)}class V extends m.a{constructor(t,e){super(),this.eventIds=t,F(this,"isDataLoading",new _.a(!0)),F(this,"statsItems",new _.a([])),F(this,"errorState",new _.a("none")),F(this,"hasEverSuccessfullyLoaded",new _.a(!1)),F(this,"multiEventModeActive",new _.a(!1)),F(this,"isViewingDetails",new _.a(!1)),F(this,"focusRestoreSignal",new _.a(null)),F(this,"pendingFocusRestoreEventId",null),F(this,"handle",null),F(this,"analyticsService",void 0),F(this,"lastStatsHash",null),F(this,"foxPaths",[]),F(this,"hasConfig",!1),F(this,"bifrost",null),F(this,"paused",!1),this.analyticsService=e,this.handle=new M}async onPanelView(){try{await this.analyticsService.panelView(A.a.FOX_STATS)}catch(t){Object(p.a)("FoxStatsViewModel","onPanelView",t)}}onKMPData(t){if(this.isDataLoading.value=t.isLoading,!(t.isError||t.events.length||this.hasEverSuccessfullyLoaded.value||t.isLoading&&this.hasConfig))return this.errorState.value="unpopulatedEvent",void this.setError(null);if(t.isError)return void(this.hasEverSuccessfullyLoaded.value?console.warn("[FoxStatsViewModel] Received error state from KMP adapter after previously successful load. Retaining existing data and error state."):this.errorState.value="tabLoadFailure");if(0===t.events.length){var e;if(this.isViewingDetails.value&&!t.isLoading)this.isViewingDetails.value=!1,this.statsItems.value=[],this.hasEverSuccessfullyLoaded.value=!1,this.lastStatsHash=null,null===(e=this.handle)||void 0===e||e.retry();return}const n=Object(L.b)(JSON.stringify(t.events));if(n!==this.lastStatsHash){if(this.lastStatsHash=n,this.multiEventModeActive.value=t.events.length>1,this.statsItems.value=t.events,this.hasEverSuccessfullyLoaded.value||(this.hasEverSuccessfullyLoaded.value=!0),this.errorState.value&&(this.errorState.value="none"),this.pendingFocusRestoreEventId&&!this.isViewingDetails.value&&t.events.length>1){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}else console.log("[FoxStatsViewModel] Received events from KMP adapter, but they are identical to the current events. Skipping update.")}refresh(t){this.eventIds=[...t],this.lastStatsHash=null,this.bifrost&&this.applyBifrostConfig(this.eventIds,this.bifrost)}openStatsDetailForEvent(t){this.pendingFocusRestoreEventId=t,this.isViewingDetails.value=!0,this.bifrost&&this.applyBifrostConfig([t],this.bifrost)}onUpdatePlayerTimeCode(t){null!=t&&this.handle&&(this.isViewingDetails.value&&(this.lastStatsHash=null),this.handle.updateTimecode(t))}setDataToPanel(t){try{const n=t.bifrostAPIRequest;var e;if(function(t){if(!t||"object"!=typeof t)return!1;const e=t;if("string"!=typeof e.url||""===e.url.trim())return!1;const n=e.paths;if(null==n||"object"!=typeof n)return!1;if(Array.isArray(n))return!(0===n.length||!n.every(t=>Array.isArray(t)&&t.length>=2&&"string"==typeof t[0]&&"string"==typeof t[1]))&&U(e);const i=Object.values(n);return!(0===i.length||!i.every(t=>"string"==typeof t))&&U(e)}(n))this.applyBifrostConfig(this.eventIds,n),this.bifrost=n,this.foxPaths=n.paths,this.hasConfig=!0,"unpopulatedEvent"===this.errorState.value&&(this.errorState.value="none"),null===(e=this.handle)||void 0===e||e.subscribe(this.onKMPData.bind(this))}catch(t){const e=t instanceof Error?t.message:"Failed to set panel data";Object(p.a)("FoxStatsViewModel","setDataToPanel",t),this.multiEventModeActive.value||this.hasEverSuccessfullyLoaded.value||this.setError(e)}}async onEngage(t){await this.trackStatsCardAction(t)}onSeeAllStats(t){this.openStatsDetailForEvent(t),this.trackStatsExpandAction(t)}onExpandableCardToggle(t,e){this.trackStatsCardAction(t,e?"expand":"collapse")}async trackStatsExpandAction(t){try{var e;const a=null!==(n=this.foxPaths,i=t,e=Array.isArray(n)?null===(s=n.find(t=>t[1]===i))||void 0===s?void 0:s[0]:null===(r=Object.entries(n).find(([,t])=>t===i))||void 0===r?void 0:r[0])&&void 0!==e?e:t;await this.analyticsService.panelClick({type:"foxStats",name:"stats_item_clicked",metadata:{event_name:"stats_expand",entity_id:a}})}catch(t){Object(p.a)("FoxStatsViewModel","trackStatsExpandAction",t)}var n,i,r,s}async trackStatsCardAction(t,e){try{await this.analyticsService.panelClick({type:"foxStats",name:"stats_item_clicked",metadata:{card:[t],...e?{action:e}:{}}})}catch(t){Object(p.a)("FoxStatsViewModel","trackStatsCardAction",t)}}applyBifrostConfig(t,e){var n;const i=e||this.bifrost;if(!i)return;const r=function(t,e=[]){const n=Array.isArray(t)?t.filter(t=>e.includes(t[0])):Object.entries(t).filter(([t])=>e.includes(t)).map(([t,e])=>[t,e]),i=new Set;return n.filter(([,t])=>!i.has(t)&&(i.add(t),!0))}(i.paths,t);null===(n=this.handle)||void 0===n||n.setConfig(i.url,r,i.method,i.headers,this.getBifrostPollingIntervalMs())}getBifrostPollingIntervalMs(){const t=ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_STATS,featureFlag:"bifrost_polling_interval"});if(null==t)return;const e=parseFloat(String(t));return Number.isFinite(e)&&e>0?1e3*e:void 0}returnToStatsSummary(t=!1){this.isViewingDetails.value&&(t&&this.trackStatsCardAction("back"),this.isViewingDetails.value=!1,this.bifrost&&this.applyBifrostConfig(this.eventIds,this.bifrost))}pause(){var t;this.paused||this.isBackgroundPollingEnabled()||(null===(t=this.handle)||void 0===t||t.pause(),this.paused=!0)}resume(){var t;this.paused&&(null===(t=this.handle)||void 0===t||t.resume(),this.paused=!1)}isBackgroundPollingEnabled(){return!1!==ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_STATS,featureFlag:"background_polling"})}deinit(){var t;null===(t=this.handle)||void 0===t||t.close(),this.handle=null,this.lastStatsHash=null,this.multiEventModeActive.value=!1,this.errorState.value="none",this.hasEverSuccessfullyLoaded.value=!1}clearTabLoadFailure(){var t;this.lastStatsHash=null,null===(t=this.handle)||void 0===t||t.retry()}}function W(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class H{constructor(){W(this,"handle",void 0),this.handle=R.FoxKeyPlaysHandle.Companion.startStandalone()}setConfig(t,e,n,i){const r=n&&Object.keys(n).length>0?Object.entries(n).map(([t,e])=>[t,e]):void 0;this.handle.setConfig(t,e,r,i)}updateListings(t){this.handle.updateListings(t)}subscribe(t){this.handle.subscribe(t)}notifyKeyPlaySelected(t){this.handle.onKeyPlaySelected(t)}updateProgress(t,e,n){this.handle.updateProgress(t,e,n)}updateTimecode(t){this.handle.updateTimecode(t)}clearProgress(){this.handle.clearProgress()}pause(){this.handle.pause()}resume(){this.handle.resume()}retry(){this.handle.retry()}close(){this.handle.close()}}function $(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Y extends m.a{constructor(t,e,n){super(),this.eventIds=t,this.delegate=e,this.analyticsService=n,$(this,"events",new _.a([])),$(this,"errorState",new _.a(null)),$(this,"isViewingDetails",new _.a(!1)),$(this,"selectedEventId",new _.a(null)),$(this,"focusRestoreSignal",new _.a(null)),$(this,"adapter",void 0),$(this,"hasEverSuccessfullyLoaded",!1),$(this,"hasConfig",!1),$(this,"lastEventsHash",null),$(this,"pendingFocusRestoreEventId",null),$(this,"paused",!1),this.adapter=new H}getPageConfigForEventById(t,e,n){var i;return null!==(i=Boolean(t.find(t=>{var i,r;return null!==(i=null==t||null===(r=t.panels)||void 0===r?void 0:r.some(i=>{var r,s,a;return i.panel_type===e&&(null===(r=t.page.metadata)||void 0===r?void 0:r.external_field_1)===n&&!0===(null===(s=i.renderer)||void 0===s||null===(a=s.supported_platforms)||void 0===a?void 0:a.bbd)}))&&void 0!==i&&i})))&&void 0!==i&&i}filterEventIdsForBbdPanel(t,e,n){const i=[];for(const r of n){this.getPageConfigForEventById(t,e,r)&&i.push(r)}return i}refresh(t){this.eventIds=[...t],this.lastEventsHash=null;const e=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);this.adapter.updateListings(e)}setDataToPanel(t){try{if((e=t.keyPlaysAPIRequest)&&"object"==typeof e&&"string"==typeof e.url&&""!==e.url.trim()&&"string"==typeof e.method&&["GET","POST"].includes(e.method.toUpperCase())&&(!e.headers||"object"==typeof e.headers&&!Array.isArray(e.headers))&&(!e.refresh||e.refresh&&"number"==typeof e.refresh.max_age_ms&&e.refresh.max_age_ms>0)){this.adapter.setConfig(t.keyPlaysAPIRequest.url,t.keyPlaysAPIRequest.method,t.keyPlaysAPIRequest.headers,this.getKeyPlayPollingIntervalMs()),this.hasConfig=!0,"unpopulatedEvent"===this.errorState.value&&(this.errorState.value=null);const e=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);this.adapter.updateListings(e),this.adapter.subscribe(this.onKMPData.bind(this))}if((t=>t&&"object"==typeof t&&"string"==typeof t.listing_id&&"string"==typeof t.key_play_id&&"number"==typeof t.progress)(t.keyPlaysProgressUpdate)){const e=t.keyPlaysProgressUpdate;this.adapter.updateProgress(e.listing_id,e.key_play_id,e.progress)}}catch(t){const e=t instanceof Error?t.message:"Failed to set panel data";Object(p.a)("FoxKeyPlaysViewModel","setDataToPanel",t),this.hasEverSuccessfullyLoaded||this.setError(e)}var e}openKeyPlaysDetailForEvent(t){this.pendingFocusRestoreEventId=t,this.isViewingDetails.value=!0,this.selectedEventId.value=t}onSeeAllKeyPlays(t){this.openKeyPlaysDetailForEvent(t),this.trackKeyPlaysPanelClick({name:"key_plays_item_clicked",metadata:{event_name:"keyplays_expand",entity_id:t}})}returnToSummary(t=!1){if(this.isViewingDetails.value&&(t&&this.trackKeyPlaysPanelClick({name:"key_plays_item_clicked",metadata:{card:["back"]}}),this.isViewingDetails.value=!1,this.selectedEventId.value=null,this.pendingFocusRestoreEventId)){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}clearProgress(){this.adapter.clearProgress()}async onPanelView(){try{await this.analyticsService.panelView(A.a.FOX_KEY_PLAYS)}catch(t){Object(p.a)("FoxKeyPlaysViewModel","onPanelView",t)}}onKMPData(t){if(!(t.isError||t.events.length||this.hasEverSuccessfullyLoaded||t.isLoading&&this.hasConfig))return void(this.errorState.value="unpopulatedEvent");if(t.isError)return void(this.hasEverSuccessfullyLoaded?console.warn("[FoxKeyPlaysViewModel] Received error state from KMP adapter after previously successful load. Retaining existing data and error state."):this.errorState.value="tabLoadFailure");if(0===t.events.length){if(this.isViewingDetails.value&&!t.isLoading){this.isViewingDetails.value=!1,this.selectedEventId.value=null,this.events.value=[],this.hasEverSuccessfullyLoaded=!1,this.lastEventsHash=null,this.adapter.retry();const t=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);t.length>0&&this.adapter.updateListings(t)}return}const e=Object(L.b)(JSON.stringify(t.events));if(e!==this.lastEventsHash){if(this.lastEventsHash=e,this.events.value=t.events,this.emitListOfKeyPlays(t.events),this.hasEverSuccessfullyLoaded||(this.hasEverSuccessfullyLoaded=!0),this.errorState.value&&(this.errorState.value=null),this.error.value&&this.setError(null),this.pendingFocusRestoreEventId&&!this.isViewingDetails.value&&t.events.length>1){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}else console.log("[FoxKeyPlaysViewModel] Received events from KMP adapter, but they are identical to the current events. Skipping update.")}emitListOfKeyPlays(t){const e=[];for(const o of t)for(const t of null!==(n=o.sections)&&void 0!==n?n:[]){var n;for(const n of null!==(i=t.keyPlays)&&void 0!==i?i:[]){var i,r,s,a;e.push({listing_id:null!==(r=n.listingId)&&void 0!==r?r:o.id,key_play_id:n.keyPlayId,start_time:null!==(s=n.startTime)&&void 0!==s?s:"",end_time:null!==(a=n.endTime)&&void 0!==a?a:""})}}this.delegate.onPanelEvent({type:"fox:list-of-key-plays",payload:{listOfKeyPlays:e}}),this.overlayManager.recordPanelData(A.a.FOX_KEY_PLAYS,{totalKeyPlays:e.length})}pause(){this.paused||this.isBackgroundPollingEnabled()||(this.adapter.pause(),this.paused=!0)}resume(){this.paused&&(this.adapter.resume(),this.paused=!1)}isBackgroundPollingEnabled(){return!1!==ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_KEY_PLAYS,featureFlag:"background_polling"})}deinit(){this.adapter.close(),this.lastEventsHash=null,this.hasEverSuccessfullyLoaded=!1,this.errorState.value=null}getKeyPlayPollingIntervalMs(){const t=ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_KEY_PLAYS,featureFlag:"keyplay_polling_interval"});if(null==t)return;const e=Number(t);return Number.isFinite(e)&&e>0?1e3*e:void 0}onUpdatePlayerTimeCode(t){this.isViewingDetails.value&&(this.lastEventsHash=null),this.adapter.updateTimecode(t)}clearTabLoadFailure(){this.lastEventsHash=null,this.adapter.retry();const t=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);t.length>0&&this.adapter.updateListings(t)}onKeyPlayEnter(t){var e;const n=null!==(e=t.listingId)&&void 0!==e?e:this.eventIds[0];if(!n)return;this.adapter.notifyKeyPlaySelected(t.keyPlayId);const i={listing_id:n,key_play_id:t.keyPlayId,...t.startTime&&{start_time:t.startTime},...t.endTime&&{end_time:t.endTime}};this.delegate.onPanelEvent({type:"fox:key-play:selected",payload:i}),this.trackKeyPlaysPanelClick({name:"key_play_clicked",metadata:{event_name:"keyplay_click",key_play_type:this.getKeyPlayType(t),key_play_id:t.keyPlayId,sport_uri:this.getKeyPlaySportUri(t),description:this.getKeyPlayDescription(t),entity_id:n}})}getKeyPlayType(t){var e,n;const i=t;return null!==(e=null!==(n=i.keyPlayType)&&void 0!==n?n:i.key_play_type)&&void 0!==e?e:null}getKeyPlayDescription(t){var e,n;const i=t;return null!==(e=null!==(n=i.description)&&void 0!==n?n:i.title)&&void 0!==e?e:null}getKeyPlaySportUri(t){var e,n;const i=t;return null!==(e=null!==(n=i.sportEventUri)&&void 0!==n?n:i.sport_event_uri)&&void 0!==e?e:null}async trackKeyPlaysPanelClick(t){try{await this.analyticsService.panelClick({type:"foxKeyPlays",...t})}catch(e){Object(p.a)("FoxKeyPlaysViewModel","trackKeyPlaysPanelClick",e,{...t})}}get overlayManager(){return ge.getMaestroEventViewModel().overlayManagerViewModel}}var G=n(25);function K(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var X=class{constructor(t){K(this,"currentlyPlayingClipIndex",new _.a(null)),K(this,"lastPlayedClipIndex",new _.a(null)),K(this,"currentClipPlaybackProgress",new _.a(null)),K(this,"errorState",new _.a("unpopulatedEvent")),K(this,"failedClips",new _.a({})),K(this,"items",new _.a([])),K(this,"filteredItems",new _.a([])),K(this,"analyticsService",void 0),K(this,"loadFailureRetryTimeouts",new Map),this.analyticsService=t}cleanup(){for(const t of this.loadFailureRetryTimeouts.values())clearTimeout(t);this.loadFailureRetryTimeouts.clear()}onUpdatePlayerTimeCode(t){this.filterItemsByPlayerTimeCode(t),this.cleanErrors()}filterItemsByPlayerTimeCode(t){if(!t)return void(this.filteredItems.value=this.items.value);const e=[];for(const n of this.items.value){const i=n.items.filter(e=>this.shouldShowKeyPlay(e,t));i.length>0&&e.push({title:n.title,items:i})}this.filteredItems.value=e}shouldShowKeyPlay(t,e){if(!t.wallClock||!e)return!0;const n=new Date(e);return new Date(t.wallClock)<=n}isCurrentlyPlaying(t){return t===this.currentlyPlayingClipIndex.value}async setKeyPlays(t,e){null!==t?(this.items.value=this.parseNetworkResponse(t),this.filterItemsByPlayerTimeCode(e),this.cleanErrors()):this.errorState.value="tabLoadFailure"}cleanErrors(){"tabLoadFailure"===this.errorState.value&&(this.errorState.value=null),"unpopulatedEvent"===this.errorState.value&&this.allItems.length&&(this.errorState.value=null),this.filteredItems.value.length||(this.errorState.value="unpopulatedEvent")}async playKeyPlay(t){const e=this.allItems[t];if(!e)return void console.warn("Key play not found at index:",t);ge.getMaestroEventViewModel().delegate.playClip(t),this.analyticsService.panelClick({type:"espnKeyPlays",name:"key_play_clicked",metadata:{action:"play clip",clip:e.clipID,key_play:e.description}})}async init(){await this.analyticsService.panelView("espnKeyPlays")}parseNetworkResponse(t){var e,n;const i=Object.values((null===(e=t.entities)||void 0===e?void 0:e.team)||{}),r=Object.values((null===(n=t.entities)||void 0===n?void 0:n.athlete)||{}),s=i.find(t=>"home"===t.homeAway),a=i.find(t=>"away"===t.homeAway),o=[],l=[];for(const e of t.sections){for(const t of e.items){const n=t.team?i.find(e=>e.id===t.team):void 0,l=t.athlete?r.find(e=>e.id===t.athlete):void 0,c=null!=n&&n.logoRef?Object(G.b)(n.logoRef,184,144):void 0,u=null!=l&&l.headshot?Object(G.b)(l.headshot,184,144):void 0,h="headshot"!==t.thumbnailType&&t.thumbnail?Object(G.b)(t.thumbnail,184,144):void 0,d=t.homeScore?t.homeScore:"0",f=t.awayScore?t.awayScore:"0",_=t.scoringPlay?parseInt(d):void 0,p=t.scoringPlay?parseInt(f):void 0,m={id:`${e.title||""}-${t.clipID}`,description:t.description?t.description:"",homeTeamName:s?s.shortName:"",awayTeamName:a?a.shortName:"",homeTeamScore:_,awayTeamScore:p,clipID:t.clipID,teamImageUrl:c,playerImageUrl:u,thumbnailImageUrl:h,section:e.title,wallClock:t.wallClock};o.push(m)}if(o.length){const t=e.title,n=l.find(e=>e.title===t);n?n.items.push(...o):l.push({title:t,items:[...o]}),o.length=0}}return l}get allItems(){return this.items.value.reduce((t,e)=>t.concat(e.items),[])}clipID(t){if(this.allItems[t])return this.allItems[t].clipID}handleKeyPlayLoadFailure(t){const e=this.clipID(t);if(e){const n=this.loadFailureRetryTimeouts.get(e);void 0!==n&&(clearTimeout(n),this.loadFailureRetryTimeouts.delete(e));const i=this.failedClips.value;i[e]="recentFailure",this.failedClips.value=i;const r=setTimeout(()=>{if(this.loadFailureRetryTimeouts.delete(e),"recentFailure"===this.loadFailureStatus(t)){const t=this.failedClips.value;t[e]="nonRecentFailure",this.failedClips.value=t}},5e3);this.loadFailureRetryTimeouts.set(e,r)}}loadFailureStatus(t){const e=this.clipID(t);return this.failedClips.value&&e?this.failedClips.value[e]:"noFailure"}clearLoadFailureStatus(t){const e=this.clipID(t);e&&this.failedClips&&(this.failedClips.value={...this.failedClips.value,[e]:"noFailure"})}async userRequestedNewKeyPlaysData(){const t=ge.getMaestroEventViewModel();await t.delegate.userRequestedNewKeyPlaysData()}};function J(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Z=class{getOverrideHeaders(t){return{...(null==t?void 0:t.headers)||{}}}getPersonalizedRequestHeaders(t){return this.overridePersonalized?this.getOverrideHeaders(this.overridePersonalized):{"x-p13n-auth":t}}getNonPersonalizedRequestHeaders(){return this.overrideNonPersonalized?this.getOverrideHeaders(this.overrideNonPersonalized):{}}constructor(t){J(this,"networkManager",void 0),J(this,"overridePersonalized",null),J(this,"overrideNonPersonalized",null),this.networkManager=new T.b({externalBaseURL:t.getBettingAPIBaseURL()})}async getNonPersonalizedBets(t){return this.networkManager.externalApiRequest({endpoint:this.nonPersonalizedBetsEndpoint(t),method:T.a.GET,params:{deviceType:"ictv"},headers:this.getNonPersonalizedRequestHeaders()})}async getPersonalizedBets(t,e,n){return this.networkManager.externalApiRequest({endpoint:this.personalizedBetsEndpoint(t),method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n)})}async getPersonalizedBetsWithHeaders(t,e,n){return this.networkManager.externalApiRequestWithHeaders({endpoint:this.personalizedBetsEndpoint(t),method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n)})}pollPersonalizedBets(t,e,n,i,r,s){return this.networkManager.pollExternalApiRequest({endpoint:this.personalizedBetsEndpoint(t),interval:i,method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n),onData:r,onError:s})}pollPersonalizedBetsWithHeaders(t,e,n,i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:this.personalizedBetsEndpoint(t),interval:i,method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n),onData:r,onError:s})}nonPersonalizedBetsEndpoint(t){return this.overrideNonPersonalized?this.overrideNonPersonalized.endpoint:`/site/v2/events/${t}/odds`}personalizedBetsEndpoint(t){return this.overridePersonalized?this.overridePersonalized.endpoint:`/personalized/site/v2/events/${t}/odds`}};const Q={event:{id:"401815534",sport:"basketball",league:"nba",date:"2026-05-28T00:00:00Z",gameState:"in",title:null,recent:!0,bets:{provider:{id:"45",name:"ESPN BET",priority:1},odds:[{id:"ml-1",displayName:"Moneyline",type:"moneyline",state:"live",values:[{odds:"-180",team:"7",type:"home"},{odds:"+155",team:"21",type:"away"}]},{id:"spread-1",displayName:"Spread",type:"spread",state:"live",values:[{line:"-4.5",odds:"-110",team:"7",type:"home"},{line:"+4.5",odds:"-110",team:"21",type:"away"}]},{id:"total-1",displayName:"Total",type:"total",state:"live",values:[{line:"218.5",odds:"-110",type:"over"},{line:"218.5",odds:"-110",type:"under"}]}]},competitions:[{id:"401815534",status:{displayValue:"Q3 4:32"},competitors:[{id:"7",athletes:[]},{id:"21",athletes:[]}],odds:[{id:"ml-1",displayName:"Moneyline",type:"moneyline",state:"live",values:[{odds:"-180",team:"7",type:"home"},{odds:"+155",team:"21",type:"away"}]}]}],featured:[{id:"mkt-featured-001",text:"Nikola Jokic Over 28.5 Points",type:"default",status:"live",points:"28.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",selections:[{id:"sel-feat-001",displayName:"Over 28.5",odds:{current:"-125"}}]},{id:"mkt-featured-002",text:"Devin Booker Over 24.5 Points",type:"default",status:"live",points:"24.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",selections:[{id:"sel-feat-002",displayName:"Over 24.5",odds:{current:"-115"}}]},{id:"mkt-featured-003",text:"Jamal Murray Over 6.5 Assists",type:"default",status:"live",points:"6.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",selections:[{id:"sel-feat-003",displayName:"Over 6.5",odds:{current:"+105"}}]},{id:"mkt-featured-004",text:"Bradley Beal Over 15.5 Points",type:"default",status:"live",points:"15.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",selections:[{id:"sel-feat-004",displayName:"Over 15.5",odds:{current:"-130"}}]}],links:[{href:"https://espnbet.com/sport/basketball/organization/nba/event/401815534"}]},entities:{teams:{7:{id:"7",displayName:"Denver Nuggets",abbreviation:"DEN",shortDisplayName:"Nuggets",logo:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",logoDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",score:"78",favored:!0,favoredAtOpen:!0,displayOrder:2},21:{id:"21",displayName:"Phoenix Suns",abbreviation:"PHX",shortDisplayName:"Suns",logo:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",logoDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",score:"72",favored:!1,favoredAtOpen:!1,displayOrder:1}}},promotion:{title:"Bet on ESPN BET",description:"Place your bets on this game",logo:"https://a.espncdn.com/i/espnbet/espnbet-logo.png",qrCode:"https://a.espncdn.com/i/espnbet/qr-code-espnbet.png"},disclaimers:{gambling:"Must be 21+. Gambling problem? Call 1-800-GAMBLER."},betsModule:{defaultTab:"live",upcoming:[{id:"dk-bet-100",type:"STRAIGHT",displayName:"Straight",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"-110",startTime:"2026-05-29T01:00:00Z",closedAtTime:null,legCount:1,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-100",marketId:"mkt-200",marketSelectionId:"sel-100",marketType:"TOTAL",status:"PENDING",selectionText:"Over 218.5",marketText:"Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"upcoming",currentPoints:null,targetPoints:218.5}]}]}],live:[{id:"dk-bet-101",type:"PARLAY",displayName:"4 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+1079",startTime:"2026-05-28T00:00:00Z",closedAtTime:null,legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Dual Screen Monday Night",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-101",marketId:"mkt-201",marketSelectionId:"sel-101",marketType:"MONEYLINE",status:"PENDING",selectionText:"Dallas Cowboys",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-102",marketId:"mkt-202",marketSelectionId:"sel-102",marketType:"TOTAL",status:"WIN",selectionText:"Over 31.5",marketText:"Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"live",currentPoints:32,targetPoints:31.5},{id:"sel-103",marketId:"mkt-203",marketSelectionId:"sel-103",marketType:"MONEYLINE",status:"PENDING",selectionText:"Detroit Lions",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-104",marketId:"mkt-204",marketSelectionId:"sel-104",marketType:"TOTAL",status:"PENDING",selectionText:"Under 100",marketText:"J. Gibbs Receiving Yards",type:"UNDER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:10,targetPoints:100}]}]},{id:"dk-bet-108",type:"PARLAY",displayName:"3 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+720",startTime:"2026-05-28T01:30:00Z",closedAtTime:null,legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815600",displayName:"Celtics @ Knicks",guid:"7ef0e9ab-2f44-42e4-8c89-d46a81155600",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815600"},teams:null,cehEvent:null,legs:[{id:"sel-108-1",marketId:"mkt-208-1",marketSelectionId:"sel-108-1",marketType:"MONEYLINE",status:"PENDING",selectionText:"Boston Celtics",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null}]},{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:null,cehEvent:null,legs:[{id:"sel-108-2",marketId:"mkt-208-2",marketSelectionId:"sel-108-2",marketType:"TOTAL",status:"PENDING",selectionText:"Nikola Jokic Over 28.5",marketText:"Player Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:24,targetPoints:28.5},{id:"sel-108-3",marketId:"mkt-208-3",marketSelectionId:"sel-108-3",marketType:"TOTAL",status:"PENDING",selectionText:"Devin Booker Over 24.5",marketText:"Player Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:20,targetPoints:24.5}]}]},{id:"dk-bet-109",type:"PARLAY",displayName:"2 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+425",startTime:"2026-05-28T02:30:00Z",closedAtTime:null,legCount:2,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815601",displayName:"Lakers @ Warriors",guid:"c9e5e891-a26f-46f7-a0b8-c415de147601",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815601"},teams:null,cehEvent:null,legs:[{id:"sel-109-1",marketId:"mkt-209-1",marketSelectionId:"sel-109-1",marketType:"MONEYLINE",status:"PENDING",selectionText:"Golden State Warriors",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-109-2",marketId:"mkt-209-2",marketSelectionId:"sel-109-2",marketType:"TOTAL",status:"PENDING",selectionText:"Over 224.5",marketText:"Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:168,targetPoints:224.5}]}]}],settled:[{id:"dk-bet-102",type:"PARLAY",displayName:"3 Pick Parlay",betStatus:"LOST",outcome:"LOSS",betDisplayStatement:"loss",odds:"+850",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-201",marketId:"mkt-301",marketSelectionId:"sel-201",marketType:"MONEYLINE",status:"LOSS",selectionText:"Suns to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-202",marketId:"mkt-302",marketSelectionId:"sel-202",marketType:"TOTAL",status:"WIN",selectionText:"Over 24.5",marketText:"Devin Booker Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:31,targetPoints:24.5},{id:"sel-203",marketId:"mkt-303",marketSelectionId:"sel-203",marketType:"TOTAL",status:"WIN",selectionText:"Over 9.5",marketText:"Nikola Jokic Total Rebounds",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:14,targetPoints:9.5}]}]},{id:"dk-bet-103",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"WON",outcome:"WIN",betDisplayStatement:"won",odds:"+450",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-w-1",marketType:"TOTAL",status:"WIN",selectionText:"Over 215.5",marketText:"Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:220,targetPoints:215.5},{id:"sel-w-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 22.5",marketText:"Devin Booker Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:28,targetPoints:22.5}]}]},{id:"dk-bet-104",type:"PARLAY",displayName:"4 Pick Parlay",betStatus:"WON",outcome:"LOSS",overrideOutcome:"GHOST_WIN",betDisplayStatement:"ghost win",odds:"+1450",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-g-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Nuggets to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-g-2",marketType:"TOTAL",status:"LOSS",selectionText:"Over 35.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:33,targetPoints:35.5},{id:"sel-g-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:8,targetPoints:6.5},{id:"sel-g-4",marketType:"TOTAL",status:"WIN",selectionText:"Over 200.5",marketText:"Total Game Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:218,targetPoints:200.5}]}]},{id:"dk-bet-105",type:"PARLAY",displayName:"4 Pick Parlay",betStatus:"WON",outcome:"WIN",betDisplayStatement:"early exit win",odds:"+960",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:"EARLY_EXIT",rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-e-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Suns to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-e-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 14.5",marketText:"Devin Booker Total Rebounds",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:17,targetPoints:14.5},{id:"sel-e-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 4.5",marketText:"Bradley Beal Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:7,targetPoints:4.5},{id:"sel-e-4",marketType:"TOTAL",status:"WIN",selectionText:"Over 12.5",marketText:"Aaron Gordon Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:18,targetPoints:12.5}]}]},{id:"dk-bet-106",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"PUSH",outcome:"PUSH",betDisplayStatement:"push",odds:"+200",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-p-1",marketType:"TOTAL",status:"PUSH",selectionText:"Over 28.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:28.5,targetPoints:28.5},{id:"sel-p-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:9,targetPoints:6.5}]}]},{id:"dk-bet-107",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"VOID",outcome:"VOID",betDisplayStatement:"void",odds:"+1000",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!0,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-v-1",marketType:"MONEYLINE",status:"VOID",selectionText:"Game canceled",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-v-2",marketType:"TOTAL",status:"VOID",selectionText:"Under 10.5",marketText:"Bradley Beal Total Points",type:"UNDER",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:null,targetPoints:null}]}]},{id:"dk-bet-110",type:"PARLAY",displayName:"3 Pick Parlay",betStatus:"WON",outcome:"LOSS",overrideOutcome:"GHOST_LEG_PARLAY",betDisplayStatement:"ghost leg parlay",odds:"+620",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-gl-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Nuggets to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-gl-2",marketType:"TOTAL",status:"LOSS",selectionText:"Over 35.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:33,targetPoints:35.5},{id:"sel-gl-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:8,targetPoints:6.5}]}]}],containsEvent:!0}};function tt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const et=t=>"object"==typeof t&&null!==t&&"event"in t&&"object"==typeof t.event;class nt extends m.a{constructor(t,e,n,i={}){super(),tt(this,"betsItems",new _.a([])),tt(this,"isDataLoading",new _.a(!0)),tt(this,"errorState",new _.a("none")),tt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),tt(this,"hideWagers",new _.a(!1)),tt(this,"eventId",void 0),tt(this,"delegate",void 0),tt(this,"betsService",void 0),tt(this,"analyticsService",void 0),tt(this,"pollingInterval",void 0),tt(this,"pollingTask",null),tt(this,"lastNonPersonalizedResponseHash",null),tt(this,"lastPersonalizedResponseHash",null),tt(this,"useMockData",!1),tt(this,"userSettingsManager",void 0),tt(this,"settingsSubscription",null),tt(this,"initialized",!1),this.eventId=t,this.delegate=e,this.betsService=new Z(e),this.analyticsService=n,this.pollingInterval=3e4,this.useMockData=i.useMockData||!1,this.userSettingsManager=w.getInstance(),this.hideWagers.value=this.userSettingsManager.shouldHideWagers(),this.settingsSubscription=this.userSettingsManager.settings.subscribe(()=>{this.updateHideWagersFromSettings()}),this.betsService=new Z(e)}async init(){this.trackPanelView(),await this.fetchNewData(),this.refreshPolling(),this.initialized=!0}cleanup(){this.stopPolling(),this.settingsSubscription&&(this.settingsSubscription(),this.settingsSubscription=null),this.initialized=!1}async trackPanelView(){try{const t=this.getUserBetCounts();await this.analyticsService.panelView("espnBet",t)}catch(t){Object(p.a)("BetsViewModel","trackPanelView",t)}}async trackCardClick(t,e){try{const n={...this.getUserBetCounts(),card:t,bet_type:e||null};await this.analyticsService.panelClick({type:"espnBet",name:"bets_item_clicked",metadata:n})}catch(n){Object(p.a)("BetsViewModel","trackCardClick",n,{cardType:t,betType:e})}}getUserBetCounts(){try{let t=0,e=0;for(const n of this.betsItems.value)if("userBets"===n.type){const i=n;e=[...i.data.bets.live,...i.data.bets.settled,...i.data.bets.upcoming].length,t=i.data.bets.live.length;break}return{in_game_bets:t,total_bets:e}}catch(t){return Object(p.a)("BetsViewModel","getUserBetCounts",t),{in_game_bets:0,total_bets:0}}}refreshPolling(){this.stopPolling(),this.useMockData||this.betsService.overridePersonalized||(this.pollingTask={stop:()=>{}},this.pollWithInterval())}async getUserCredentials(){return{swid:await this.delegate.getUserSWID()||"",jwt:await this.delegate.getUserToken()||""}}updatePollingInterval(t){const e=this.getResponseHeaderPollingIntervalValue(t),n=this.getPanelConfigInterval(),i=e||n;i&&i!==this.pollingInterval&&(this.pollingInterval=i,console.log(`[BET] Updating polling interval to ${this.pollingInterval} milliseconds`),this.refreshPolling())}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnBet"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.odds_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[BET] Invalid polling interval from panel config: ${s}.`),null):1e3*a}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[BET] Invalid polling interval header received: ${e}.`),null):1e3*n}async pollWithInterval(){try{const{swid:t,jwt:e}=await this.getUserCredentials();this.pollingTask=this.betsService.pollPersonalizedBetsWithHeaders(this.eventId,t,e,this.pollingInterval,t=>{this.updatePollingInterval(t.headers),this.processPolledData(t.data)},this.handlePollingError.bind(this))}catch(t){Object(p.a)("BetsViewModel","pollWithInterval",t)}}processPolledData(t){const e=Object(L.b)(JSON.stringify(t));if(et(t)){if(this.lastPersonalizedResponseHash===e&&this.hasEverSuccessfullyLoaded.value)return void console.log("[BET] Response hash is the same as last successful response - skipping update");this.lastPersonalizedResponseHash=e}else{if(this.lastNonPersonalizedResponseHash===e&&this.hasEverSuccessfullyLoaded.value)return void console.log("[BET] Response hash is the same as last successful response - skipping update");this.lastNonPersonalizedResponseHash=e}this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.processBetsData(t)}processBetsData(t){var e;const n=[];if(!Object.keys(t).length)return;if("golf"===(et(t)?null===(e=t.event)||void 0===e?void 0:e.sport:t.sport)){const e=this.processGolfOddsData(t);e&&n.push(e)}else{const e=this.processSixPackData(t);e&&n.push(e)}const i=this.processLocationDisclaimer(t);i&&n.push(i);const r=this.processUserBetsData(t);r&&n.push(r);const s=this.processHotProps(t);s&&n.push(s);const a=this.processPromoCode(t);a&&n.push(a);const o=this.processGamblingMessage(t);o&&n.push(o),this.betsItems.value=n}processLocationDisclaimer(t){var e;return et(t)&&null!==(e=t.disclaimers)&&void 0!==e&&e.location?{type:"locationDisclaimer",id:"locationDisclaimer",data:{text:t.disclaimers.location}}:null}processPromoCode(t){var e;if(!et(t)||!t.promotion)return null;const n=(t.promotion.title||"").trim(),i=(t.promotion.description||"").trim(),r=(t.promotion.logo||"").trim(),s=(t.promotion.qrCode||"").trim(),a=(t.promotion.backgroundImage||"").trim();return n&&i&&r&&s&&a?{type:"promo",data:{title:n,description:i,logo:r,qrCode:s,backgroundImage:a},id:"promo-"+((null===(e=t.event)||void 0===e?void 0:e.id)||t.id)}:null}processGamblingMessage(t){var e;return et(t)&&null!==(e=t.disclaimers)&&void 0!==e&&e.gambling?{type:"gamblingMessage",id:"gamblingMessage",data:{text:t.disclaimers.gambling}}:null}processSixPackData(t){var e,n,i,r,s,a,o,l,c,u;const h=et(t),d=null===(e=t.entities)||void 0===e?void 0:e.teams,f=h?null===(i=t.event)||void 0===i||null===(r=i.bets)||void 0===r?void 0:r.odds:null===(n=t.bets)||void 0===n?void 0:n.odds,_=f&&((p=f).length>0&&"displayName"in p[0])?f:void 0;var p;const m=h?null===(s=t.event)||void 0===s?void 0:s.gameState:t.gameState,v=h?null===(a=t.event)||void 0===a?void 0:a.sport:t.sport,g=h?null===(o=t.event)||void 0===o?void 0:o.id:t.id,A=h?"soccer"===(null===(l=t.event)||void 0===l?void 0:l.sport):"soccer"===t.sport;if(!(_&&m&&v&&g&&d))return null;const b=Object.values(d);let y,w;for(const t of Object.values(d)){const e=_.find(t=>"pointSpread"===t.type);e&&(e.values.some(e=>e.team===t.id&&"home"===e.type)?w=t:e.values.some(e=>e.team===t.id&&"away"===e.type)&&(y=t))}if(!w||!y)switch(console.warn("Could not determine home/away teams from odds, using first two teams"),b.length){case 0:throw new Error("No teams found in response");case 1:w=b[0],y=b[0];break;case 2:w=b[0],y=b[1];break;default:w=b[0],y=b[1],console.warn(`Warning: Unexpected team count (${b.length}) in six pack response`)}if(!y||!w)throw new Error("Could not determine home or away team from response");const E="in"===m,k=A&&!E?null===(x=w.favoredAtOpen)||void 0===x||x:null===(C=w.favored)||void 0===C||C;var C,x;const B=A&&!E?null!==(T=y.favoredAtOpen)&&void 0!==T&&T:null!==(S=y.favored)&&void 0!==S&&S;var S,T;let j="",q="",P="",I="",N="",z="",O="",R="",D="",M="",L="",F="",U="",V="",W="",H="",$="";const Y=new Set,G=[];for(const t of _){Y.has(t.type)||(G.push({type:t.type,abbreviation:t.abbreviation}),Y.add(t.type));const e="live"===t.state,n="close"===t.state,i="open"===t.state;switch(t.type){case"pointSpread":if(E?e:n)for(const e of t.values){var K,X,J,Z;if("home"===e.type)O=null!==(K=e.line)&&void 0!==K?K:"",R=null!==(X=e.odds)&&void 0!==X?X:"";if("away"===e.type)N=null!==(J=e.line)&&void 0!==J?J:"",z=null!==(Z=e.odds)&&void 0!==Z?Z:""}if((E?n:i)&&!A){if(k)for(const e of t.values){var Q,tt;if("home"===e.type)P=null!==(Q=e.line)&&void 0!==Q?Q:"",I=null!==(tt=e.odds)&&void 0!==tt?tt:""}if(B)for(const e of t.values){var nt,it;if("away"===e.type)j=null!==(nt=e.line)&&void 0!==nt?nt:"",q=null!==(it=e.odds)&&void 0!==it?it:""}}break;case"total":if(E?e:n)for(const e of t.values){var rt,st,at,ot,lt,ct,ut,ht;if("over"===e.type)if(A)L=null!==(rt=e.line)&&void 0!==rt?rt:"",F=null!==(st=e.odds)&&void 0!==st?st:"";else D=null!==(at=e.line)&&void 0!==at?at:"",M=null!==(ot=e.odds)&&void 0!==ot?ot:"";if("under"===e.type)if(A)D=null!==(lt=e.line)&&void 0!==lt?lt:"",M=null!==(ct=e.odds)&&void 0!==ct?ct:"";else L=null!==(ut=e.line)&&void 0!==ut?ut:"",F=null!==(ht=e.odds)&&void 0!==ht?ht:""}if(E?n:i){if(!k)for(const e of t.values){var dt,ft;if(A&&"over"===e.type||!A&&"under"===e.type)P=null!==(dt=e.line)&&void 0!==dt?dt:"",I=null!==(ft=e.odds)&&void 0!==ft?ft:""}if(!B)for(const e of t.values){var _t,pt;if(A&&"under"===e.type||!A&&"over"===e.type)j=null!==(_t=e.line)&&void 0!==_t?_t:"",q=null!==(pt=e.odds)&&void 0!==pt?pt:""}}break;case"moneyline":{const r=E?e:n;if(r)for(const e of t.values){var mt,vt;if("home"===e.type)V=null!==(mt=e.odds)&&void 0!==mt?mt:"";if("away"===e.type)U=null!==(vt=e.odds)&&void 0!==vt?vt:""}if(A){const e=E?n:i;for(const n of t.values)if("draw"===n.type){var gt,At;if(e)W=null!==(gt=n.odds)&&void 0!==gt?gt:"",H="DRAW";if(r)$=null!==(At=n.odds)&&void 0!==At?At:""}if(e){if(k)for(const e of t.values){var bt,yt;if("home"===e.type)P=null!==(bt=e.odds)&&void 0!==bt?bt:"",I=null!==(yt=t.abbreviation)&&void 0!==yt?yt:""}if(B)for(const e of t.values){var wt,Et;if("away"===e.type)j=null!==(wt=e.odds)&&void 0!==wt?wt:"",q=null!==(Et=t.abbreviation)&&void 0!==Et?Et:""}}}break}}}const kt={teamAbbreviation:null!==(c=y.abbreviation)&&void 0!==c?c:"",startOfGameFirstLine:j,startOfGameSecondLine:q,gameSpreadFirstLine:N,gameSpreadSecondLine:z,totalPointsFirstLine:D,totalPointsSecondLine:M,moneylineFirstLine:U},Ct={teamAbbreviation:null!==(u=w.abbreviation)&&void 0!==u?u:"",startOfGameFirstLine:P,startOfGameSecondLine:I,gameSpreadFirstLine:O,gameSpreadSecondLine:R,totalPointsFirstLine:L,totalPointsSecondLine:F,moneylineFirstLine:V};return{id:"sixpack-"+g,type:"sixPack",data:{topTeamOdds:A?Ct:kt,bottomTeamOdds:A?kt:Ct,drawOdds:W&&H&&$?{teamAbbreviation:"DRAW",startOfGameFirstLine:W,startOfGameSecondLine:H,gameSpreadFirstLine:"",gameSpreadSecondLine:"",totalPointsFirstLine:"",totalPointsSecondLine:"",moneylineFirstLine:$}:void 0,orderedColumns:G,gameState:m},teamInfo:{home:w,away:y},hideWagers:this.hideWagers.value}}getBetStartMs(t){if(!t.startTime)return-1;const e=new Date(t.startTime).getTime();return isNaN(e)?-1:e}sortLiveBets(t,e){return[...t].sort((t,e)=>this.getBetStartMs(e)-this.getBetStartMs(t))}sortUpcomingBets(t){return[...t].sort((t,e)=>{const n=this.getBetStartMs(t),i=this.getBetStartMs(e);return(n<0?Number.MAX_SAFE_INTEGER:n)-(i<0?Number.MAX_SAFE_INTEGER:i)})}getThreeMonthsAgoCutoff(){const t=new Date;let e=t.getUTCFullYear(),n=t.getUTCMonth()-3;n<0&&(n+=12,e-=1);const i=new Date(Date.UTC(e,n+1,0)).getUTCDate(),r=Math.min(t.getUTCDate(),i);return Date.UTC(e,n,r,t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}sortAndFilterSettledBets(t){const e=this.getThreeMonthsAgoCutoff(),n=t=>{if(!t.closedAtTime)return-1;const e=new Date(t.closedAtTime).getTime();return isNaN(e)?-1:e};return t.map(t=>({bet:t,closedMs:n(t)})).filter(({closedMs:t})=>t>=e).sort((t,e)=>e.closedMs-t.closedMs).slice(0,10).map(({bet:t})=>t)}processUserBetsData(t){if(!et(t)||!t.event||!t.betsModule)return null;const e=t.event.id,n={live:this.sortLiveBets(t.betsModule.live.filter(t=>"promo"!==t.type),e),settled:this.sortAndFilterSettledBets(t.betsModule.settled.filter(t=>"promo"!==t.type)),upcoming:this.sortUpcomingBets(t.betsModule.upcoming.filter(t=>"promo"!==t.type))},i="in"===t.event.gameState;return{data:{bets:n,defaultTab:i?"live":"upcoming",isCurrentEventLive:i},id:"userBets-"+t.event.id,type:"userBets",hideWagers:this.hideWagers.value}}processGolfOddsData(t){var e,n,i;const r=et(t),s=r?t.event:t,a=null==s?void 0:s.bets,o=null==a?void 0:a.odds,l=null==a?void 0:a.headers,c=null===(e=t.entities)||void 0===e?void 0:e.athletes,u=r?null===(n=t.event)||void 0===n?void 0:n.id:t.id,h=null!==(i=null==s?void 0:s.title)&&void 0!==i?i:"";if(!o||!l||!u)return null;return{type:"golfOdds",id:"golfOdds-"+u,data:{title:h,headers:l,players:o.filter(t=>t.id).map(t=>{var e,n,i,r,s,a,o;const l=null==c?void 0:c[t.id];return{id:t.id,name:null!==(e=null==l?void 0:l.shortName)&&void 0!==e?e:t.id,score:t.displayValue,values:t.values.map(t=>{var e;return null!==(e=t.odds)&&void 0!==e?e:""}),flagUrl:null==l||null===(n=l.country)||void 0===n||null===(i=n.flag)||void 0===i?void 0:i.href,flagAlt:null!==(r=null==l||null===(s=l.country)||void 0===s||null===(a=s.flag)||void 0===a?void 0:a.alt)&&void 0!==r?r:null!=l&&null!==(o=l.country)&&void 0!==o&&o.name?l.country.name+" flag":void 0}})},hideWagers:this.hideWagers.value}}processHotProps(t){var e;const n=et(t)?null===(e=t.event)||void 0===e?void 0:e.featured:t.featured;if(!n||!Array.isArray(n))return null;if(!n.every(t=>Boolean(t&&t.id)))return null;const i=n.filter(t=>t.selections.length>0);return{type:"hotProps",hideWagers:this.hideWagers.value,id:"hotProps",data:{items:i.map(t=>{const e=t.selections[0];return{id:e.id,odds:e.odds.current||"",marketText:e.text,selectionText:t.text,status:e.status,type:e.type,icon:e.icon,iconDark:e.iconDark,outcome:e.outcome}})}}}handlePollingError(t){Object(p.a)("BetsViewModel","handlePollingError",t),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.betsItems.value=[])}stopPolling(){this.pollingTask&&(this.pollingTask.stop(),this.pollingTask=null),this.isDataLoading.value&&(this.isDataLoading.value=!1)}async fetchNewData(){this.isDataLoading.value=!0;try{if(this.useMockData)return this.betsItems.value=[],void await this.fetchMockData();await this.fetchPersonalizedData(),this.isDataLoading.value=!1}catch(t){Object(p.a)("BetsViewModel","fetchNewData",t),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.betsItems.value=[]),this.isDataLoading.value=!1}}async fetchPersonalizedData(){try{const{swid:t,jwt:e}=await this.getUserCredentials(),n=await this.betsService.getPersonalizedBets(this.eventId,t,e);this.processPolledData(n)}catch(t){throw Object(p.a)("BetsViewModel","fetchPersonalizedData",t),t}}async fetchMockData(){this.processBetsData(Q),this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",setTimeout(()=>{this.refreshPolling()},100)}shouldHideWagers(){return this.hideWagers.value}updateHideWagersFromSettings(){this.hideWagers.value=this.userSettingsManager.shouldHideWagers(),this.refreshBetItemsWithNewSettings()}refreshBetItemsWithNewSettings(){this.betsItems.value=this.betsItems.value.map(t=>"sixPack"===t.type||"userBets"===t.type||"hotProps"===t.type||"golfOdds"===t.type?{...t,hideWagers:this.hideWagers.value}:t)}parseOverrideHeaders(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,i]of Object.entries(t))"string"==typeof i&&(e[n]=i);return e}parseEndpointOverrideConfig(t){if(!t||"object"!=typeof t||Array.isArray(t))return null;const e=t,n="string"==typeof e.endpoint?e.endpoint.trim():"";return n?{endpoint:n,headers:this.parseOverrideHeaders(e.headers)}:null}areOverridesEqual(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.endpoint!==e.endpoint)return!1;const n=t.headers||{},i=e.headers||{},r=Object.keys(n),s=Object.keys(i);return r.length===s.length&&r.every(t=>n[t]===i[t])}setDataToPanel(t){const e="string"==typeof t.overrideUrl?t.overrideUrl.trim():"",n=this.parseEndpointOverrideConfig(t.overridePersonalized)||(e?{endpoint:e,headers:{}}:null),i=this.parseEndpointOverrideConfig(t.overrideNonPersonalized);this.areOverridesEqual(n,this.betsService.overridePersonalized)&&this.areOverridesEqual(i,this.betsService.overrideNonPersonalized)||(this.betsService.overridePersonalized=n,this.betsService.overrideNonPersonalized=i,this.stopPolling(),this.fetchNewData(),this.refreshPolling())}}var it=nt;const rt={entities:{teams:{9:{id:"9",uid:"s:40~l:59~t:9",slug:"new-york-liberty",location:"New York",name:"Liberty",abbreviation:"NY",displayName:"New York Liberty",shortDisplayName:"Liberty",color:"86cebc",alternateColor:"000000",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/ny.png",statistics:[{$key:"fieldGoalPct",value:45.8,displayValue:"45.8",displayName:"Field Goal %"},{$key:"threePointFieldGoalPct",value:34.7,displayValue:"34.7",displayName:"Three Point %"}],homeAway:"away",record:"11-4",displayOrder:1},11:{id:"11",uid:"s:40~l:59~t:11",slug:"phoenix-mercury",location:"Phoenix",name:"Mercury",abbreviation:"PHX",displayName:"Phoenix Mercury",shortDisplayName:"Mercury",color:"3c286e",alternateColor:"e56020",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/phx.png",statistics:[{$key:"fieldGoalPct",value:43.1,displayValue:"43.1",displayName:"Field Goal %"},{$key:"threePointFieldGoalPct",value:34.8,displayValue:"34.8",displayName:"Three Point %"}],homeAway:"home",record:"12-4",displayOrder:2},14:{id:"14",uid:"s:40~l:59~t:14",abbreviation:"SEA",displayName:"Seattle Storm",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/sea.png"},17:{id:"17",uid:"s:40~l:59~t:17",abbreviation:"LV",displayName:"Las Vegas Aces",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/lv.png"},18:{id:"18",uid:"s:40~l:59~t:18",abbreviation:"CONN",displayName:"Connecticut Sun",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/conn.png"},19:{id:"19",uid:"s:40~l:59~t:19",abbreviation:"CHI",displayName:"Chicago Sky",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/chi.png"},20:{id:"20",uid:"s:40~l:59~t:20",abbreviation:"ATL",displayName:"Atlanta Dream",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/atl.png"},129689:{id:"129689",uid:"s:40~l:59~t:129689",abbreviation:"GS",displayName:"Golden State Valkyries",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/gs.png"},130:{id:"121245",uid:"s:20~l:28~t:12",abbreviation:"KC",displayName:"Kansas City Chiefs",shortDisplayName:"Kansas City",color:"e31837",alternateColor:"ffcb05",logo:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png",homeAway:"home"},164:{id:"11232",uid:"s:20~l:28~t:12",abbreviation:"KC",displayName:"Kansas City Chiefs",shortDisplayName:"Kansas City",color:"e31837",alternateColor:"ffcb05",logo:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png",homeAway:"away"}},athletes:{2529137:{id:"2529137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4700818:{id:"2529137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4837356:{id:"2529137156425",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},5037871:{id:"252913653447",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4873138:{id:"25275349137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},2529140:{id:"2529147630",uid:"s:40~l:59~a:2529140",guid:"908608e9-31d4-62f2-dfe2-9fee9024e7e2",displayName:"Alyssa Thomas",shortName:"A. Thomas",jersey:"25",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529140.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529140/alyssa-thomas",text:"Player Card"}],position:{abbreviation:"F"}},2998928:{id:"29989212758",uid:"s:40~l:59~a:2998928",guid:"4d83d500-2f40-c89e-4f85-62927c5abbeb",displayName:"Breanna Stewart",shortName:"B. Stewart",jersey:"30",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2998928.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2998928/breanna-stewart",text:"Player Card"}],position:{abbreviation:"F"}},2999101:{id:"2999112756501",uid:"s:40~l:59~a:2999101",guid:"d5154a93-4a46-71af-8b55-f69328b84b54",displayName:"Jonquel Jones",shortName:"J. Jones",jersey:"35",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2999101.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2999101/jonquel-jones",text:"Player Card"}],position:{abbreviation:"C"}},4281929:{id:"428191234729",uid:"s:40~l:59~a:4281929",guid:"d4c403bb-a2c8-ed6b-aeaa-c290d8afea9b",displayName:"Satou Sabally",shortName:"S. Sabally",jersey:"0",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/4281929.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/4281929/satou-sabally",text:"Player Card"}],position:{abbreviation:"F"}}}},leaders:[{displayName:"Points",name:"pointsPerGame",home:{team:{$key:"11"},athlete:{$key:"4281929",statistics:[{displayValue:"19.1",abbreviation:"PTS"},{displayValue:"39.3",abbreviation:"FG%"},{displayValue:"81.9",abbreviation:"FT%"}]}},away:{team:{$key:"9"},athlete:{$key:"2998928",statistics:[{displayValue:"20.7",abbreviation:"PTS"},{displayValue:"52.0",abbreviation:"FG%"},{displayValue:"81.6",abbreviation:"FT%"}]}}},{displayName:"Assists",name:"assistsPerGame",home:{team:{$key:"11"},athlete:{$key:"2529140",statistics:[{displayValue:"9.3",abbreviation:"AST"},{displayValue:"3.2",abbreviation:"TO"},{displayValue:"30.3",abbreviation:"MIN"}]}},away:{team:{$key:"9"},athlete:{$key:"2529137",statistics:[{displayValue:"6.5",abbreviation:"AST"},{displayValue:"2.1",abbreviation:"TO"},{displayValue:"28.3",abbreviation:"MIN"}]}}},{displayName:"Rebounds",name:"reboundsPerGame",home:{team:{$key:"11"},athlete:{$key:"4281929",statistics:[{displayValue:"8.0",abbreviation:"REB"},{displayValue:"6.5",abbreviation:"DR"},{displayValue:"1.5",abbreviation:"OR"}]}},away:{team:{$key:"9"},athlete:{$key:"2999101",statistics:[{displayValue:"9.6",abbreviation:"REB"},{displayValue:"7.7",abbreviation:"DR"},{displayValue:"1.9",abbreviation:"OR"}]}}}],header:{teams:[{$key:"11",linescores:[{displayValue:"28"},{displayValue:"33"},{displayValue:"27"},{displayValue:"18"},{displayValue:"106"}]},{$key:"9",linescores:[{displayValue:"19"},{displayValue:"24"},{displayValue:"27"},{displayValue:"21"},{displayValue:"91"}]}],linescoresHeader:["1","2","3","4","T"]},predictor:{header:"Matchup Predictor",imageUrl:"https://platform.espnqa.com/lrd/matchuppredictor/401736212",homeTeam:{team:{$key:"11"},gameProjection:"31.8"},awayTeam:{team:{$key:"9"},gameProjection:"68.2"}},winProbability:{imageUrl:"https://platform.espnqa.com/lrd/winprobability/401736212/401736212576",homeTeam:{team:{$key:"11"},winPercentage:"100"},awayTeam:{team:{$key:"9"},winPercentage:"0"}},previousGames:[{displayOrder:2,team:{$key:"11"},events:[{team:{$key:"17",homeAway:"home"},score:"76-70",gameResult:"W"},{team:{$key:"18",homeAway:"home"},score:"83-75",gameResult:"W"},{team:{$key:"9",homeAway:"home"},score:"89-81",gameResult:"W"},{team:{$key:"19",homeAway:"home"},score:"107-86",gameResult:"W"},{team:{$key:"9",homeAway:"away"},score:"106-91",gameResult:"W"}]},{displayOrder:1,team:{$key:"9"},events:[{team:{$key:"20",homeAway:"away"},score:"86-81",gameResult:"W"},{team:{$key:"11",homeAway:"away"},score:"89-81",gameResult:"L"},{team:{$key:"14",homeAway:"home"},score:"89-79",gameResult:"L"},{team:{$key:"129689",homeAway:"home"},score:"81-78",gameResult:"W"},{team:{$key:"11",homeAway:"home"},score:"106-91",gameResult:"L"}]}],gameState:"in",promotion:{title:"Serving Sports Fans. Anytime.",description:"Open the ESPN app on a mobile device to checkout more stats!",logo:"https://www.espn.com/redesign/assets/img/ictv/logo_qr/1x/logo_qr_espn.png",qrCode:"https://stitcher.espn.com/qr-code/.png?url=sportscenter%3A%2F%2Fx-callback-url%2FshowGame%3FsportName%3Dbasketball%26leagueAbbrev%3Dwnba%26gameId%3D401736212&width=200&height=200",backgroundImage:"https://www.espn.com/redesign/assets/img/ictv/bkg_qr_espn.jpg"},activeAthletes:{displayText:"Active Athletes",teams:[{team:{$key:"130"},athletes:[{$key:"4700818",statLine:"16.6 PTS, 5.2 REB"},{$key:"4837356",statLine:"4.1 AST, 2.2 TO"}]},{team:{$key:"164"},athletes:[{$key:"5037871",statLine:"19.4 PTS, 4.0 AST"},{$key:"4873138",statLine:"7.2 REB, 2.1 OR"}]}]},drives:[{id:"drive-1",team:{$key:"9"},description:"4 PLAYS, 41 YARDS, 2:15",plays:[{id:"play-1",clock:{displayValue:"8:21"},period:{number:1},type:{text:"Shotgun"},text:"I.Pacheco left tackle to PHI 20 for 24 yards (M.Epps).",start:{downDistanceText:"2nd & 5 at PHI 44"}},{id:"play-2",clock:{displayValue:"9:33"},period:{number:1},type:{text:"Shotgun"},text:"P.Mahomes pass short middle to T.Kelce to KC 48 for 20 yards (T.Edwards).",start:{downDistanceText:"1st & 10 @ KC 25"}},{id:"play-3",clock:{displayValue:"10:09"},period:{number:1},type:{text:"Shotgun"},text:"I.Pacheco up the middle to KC 28 for 3 yards (J.Hargrave).",start:{downDistanceText:"1st & 10 @ KC 25"}},{id:"play-4",clock:{displayValue:"11:15"},period:{number:1},type:{text:"Shotgun"},text:"P.Mahomes pass complete short right to T.Kelce to KC 35 for 10 yards (J.Bradberry).",start:{downDistanceText:"2nd & 10 at KC 25"}}]}],meta:{gp_topic:"gp-basketball-wnba-401736212",picker_topic:"picker-basketball-wnba",gameState:"in"}},st=t=>t&&"object"==typeof t&&"$key"in t&&"value"in t&&"displayValue"in t&&"displayName"in t,at=t=>Array.isArray(t)&&t.every(t=>(t=>t&&"object"==typeof t&&"stats"in t&&Array.isArray(t.stats))(t));function ot(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lt=class{constructor(t){ot(this,"networkManager",void 0),ot(this,"overrideUrl",null),this.networkManager=new T.b({externalBaseURL:t.getStatsAPIBaseURL()})}async getStatsByUrl(t){return this.networkManager.externalApiRequest({endpoint:this.getSyncEndpoint(t),method:T.a.GET,params:{deviceType:"ictv"},headers:{}})}pollStatsByUrl(t,e,n,i){return this.networkManager.pollExternalApiRequest({endpoint:this.getSyncEndpoint(t),interval:e,method:T.a.GET,params:{deviceType:"ictv"},headers:{},onData:n,onError:i})}getSyncEndpoint(t){if(this.overrideUrl)return console.log("[StatsService] Using overrideUrl:",this.overrideUrl),this.overrideUrl;const{leagueId:e,mainId:n}=this.getIdsFromPageConfig(),i=this.formatTimeCodeForAPI(t),r=this.getUrlTemplateFromPanelConfig();return r?this.resolveUrlTemplate(r,e,n,i):`/${e}/${n}/en/us/${i}`}getUrlTemplateFromPanelConfig(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnStats"===t.panel_type),s=null==r||null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.url_template;return"string"==typeof s&&s.trim().length>0?s:null}resolveUrlTemplate(t,e,n,i){return t.replace(/{leagueId}/g,e).replace(/{eventId}/g,n).replace(/{timecode}/g,i)}getIdsFromPageConfig(){const t=ge.getPageConfig();if(!t)throw new Error("Page config is null or undefined");const e=t.page.metadata,n=null==e?void 0:e.external_field_1,i=null==e?void 0:e.external_field_5;if(!n||!i){const t=Object.keys(e||{}).join(", ");throw new Error("Missing eventId or leagueId in page config metadata. Cannot build sync URL. Required fields: external_field_1 (eventId), external_field_5 (leagueId). Available fields: "+t)}const{leagueId:r,fauxcastId:s}=this.parseLeagueData(i),a=s||n;if(!a.trim()||!r.trim())throw new Error("MainId or leagueId is empty string in page config metadata");return{eventId:n,leagueId:r,mainId:a}}parseLeagueData(t){try{const e=JSON.parse(t);if(!e.leagueId)throw new Error("leagueId not found in parsed JSON");return{leagueId:e.leagueId,fauxcastId:e.fauxcastId}}catch(e){const n=new Error("Failed to parse leagueId from external_field_5. Raw value: "+t);throw Object(p.a)("StatsService","parseLeagueIdFromExternalField",n,{rawValue:t,parseError:e}),n}}formatTimeCodeForAPI(t){if(!t||0===t)return"latest";if("number"!=typeof t||isNaN(t)||!isFinite(t))return console.warn('Invalid timecode provided, using "latest":',t),"latest";try{const e=new Date(t);if(isNaN(e.getTime()))return console.warn('Invalid date from timecode, using "latest":',t),"latest";const n=Date.now();if(n-t<0)return"latest";return e.toISOString().replace(/\.\d{3}Z$/,"Z")}catch(e){return Object(p.a)("StatsService","formatTimeCodeForAPI",e,{timeCode:t}),"latest"}}};const ct=t=>{var e,n;if(!t)return{plays:"0",yards:"0",time:""};const i=t.split(", ");return{plays:(null===(e=i[0])||void 0===e?void 0:e.split(" ")[0])||"0",yards:(null===(n=i[1])||void 0===n?void 0:n.split(" ")[0])||"0",time:i[2]||""}},ut=t=>{var e;if(null==t||null===(e=t.period)||void 0===e||!e.number)return"";const n=(t=>{const e=t%100;if(e>=11&&e<=13)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(t.period.number);return`(${t.clock.displayValue} - ${t.period.number}${n}) (${t.type.text}) ${t.text}`};function ht(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const dt=(t,e)=>{try{const n=new Date(t),i=new Date(e),r={month:"short",day:"numeric",year:"numeric"};return`${n.toLocaleDateString("en-US",r)} - ${i.toLocaleDateString("en-US",r)}`}catch{return""}},ft=(t,e)=>({collapsedItems:e?t.slice(0,6):t}),_t={activeAthletes:"activeAthletes",driveSummary:"drives",gameLeaders:"leaders",headerTeam:"header",matchPredictor:"predictor",playerSeasonStats:"playerStats",promotion:"promotion",recentGames:"previousGames",scoringSummary:"scoringSummary",teamStats:"entities",winProbability:"winProbability",careerMatchup:"careerMatchup",penalties:"penaltySummary",golfHeader:"golfHeader",golfLeaderboard:"leaderboard",statLeaders:"statLeaders",tennisMatchHeader:"competition",tennisAlsoLive:"live"};class pt extends m.a{constructor(t,e,n,i={}){super(),ht(this,"isDataLoading",new _.a(!0)),ht(this,"hasEverSuccessfullyLoaded",new _.a(!1)),ht(this,"eventId",void 0),ht(this,"statsItems",new _.a([])),ht(this,"errorState",new _.a("none")),ht(this,"currentGameState",new _.a("")),ht(this,"statsService",void 0),ht(this,"analyticsService",void 0),ht(this,"useMockData",!1),ht(this,"lastResponseHash",null),ht(this,"currentPlayerTimeCode",null),ht(this,"timecodePollingTask",null),ht(this,"smartPollingTimeout",null),ht(this,"smartPollingAbortController",null),ht(this,"timecodePollingState",{isActive:!1,currentUrl:null,lastUpdateTime:0}),ht(this,"onEngage",t=>{this.analyticsService.panelClick({type:"espnStats",name:"stats_item_clicked",metadata:{card:[_t[t]],game_state:[this.currentGameState.value]}})}),this.eventId=t,this.useMockData=i.useMockData||!1,this.statsService=new lt(e),this.analyticsService=n}setDataToPanel(t){if("overrideUrl"in t){const e=t.overrideUrl;"string"==typeof e&&e.length>0&&(console.log("[StatsViewModel] Setting overrideUrl:",e),this.statsService.overrideUrl=e)}}async init(){if(this.useMockData)await this.fetchMockData();else{const t=this.getCurrentTimeCode();this.onUpdatePlayerTimeCode(t),this.analyticsService.panelView("espnStats")}}getCurrentTimeCode(){try{const t=ge.getMaestroEventViewModel();if(t&&"function"==typeof t.getPlayerTimeCode)return t.getPlayerTimeCode()}catch(t){Object(p.a)("StatsViewModel","getCurrentTimeCode",t)}return null}cleanup(){this.stopTimecodePolling(),this.abortSmartPollingWork(),this.resetTimecodePollingState(),null!==this.currentPlayerTimeCode&&(this.currentPlayerTimeCode=null)}onUpdatePlayerTimeCode(t){if(this.currentPlayerTimeCode=t,!this.useMockData)try{this.performSmartPolling(t)}catch(t){this.handleTimecodeError("onUpdatePlayerTimeCode",t)}}clearTabLoadFailure(){this.errorState.value="none";const t=this.getCurrentTimeCode();this.onUpdatePlayerTimeCode(t)}async performSmartPolling(t){this.stopTimecodePolling(),this.abortSmartPollingWork();const e=new AbortController;this.smartPollingAbortController=e;const{signal:n}=e;try{const e=await this.statsService.getStatsByUrl(t);if(n.aborted)return;if(!e)throw new Error("API returned undefined or null response");if(this.processPolledData(e),n.aborted)return;this.smartPollingTimeout=window.setTimeout(()=>{this.smartPollingTimeout=null,n.aborted||this.startTimecodePolling(t)},1e3)}catch(e){if(n.aborted)return;this.handleTimecodeError("performSmartPolling",e),this.stopTimecodePolling(),this.startTimecodePolling(t)}}handleTimecodeError(t,e){Object(p.a)("StatsViewModel",t,e,{currentTimecode:this.currentPlayerTimeCode,hasExistingData:this.statsItems.value.length>0,lastResponseHash:this.lastResponseHash,url:this.timecodePollingState.currentUrl}),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure")}abortSmartPollingWork(){this.smartPollingAbortController&&(this.smartPollingAbortController.abort(),this.smartPollingAbortController=null),this.clearSmartPollingTimeout()}clearSmartPollingTimeout(){null!==this.smartPollingTimeout&&(clearTimeout(this.smartPollingTimeout),this.smartPollingTimeout=null)}resetTimecodePollingState(){this.timecodePollingState={isActive:!1,currentUrl:null,lastUpdateTime:0}}startTimecodePolling(t){this.stopTimecodePolling();try{this.timecodePollingTask=this.statsService.pollStatsByUrl(t,1e4,t=>{this.processPolledData(t)},t=>{this.handleTimecodeError("timecodePolling",t)}),this.timecodePollingState.isActive=!0}catch(t){this.handleTimecodeError("startTimecodePolling",t)}}stopTimecodePolling(){this.timecodePollingTask&&(this.timecodePollingTask.stop(),this.timecodePollingTask=null),this.timecodePollingState.isActive=!1}async fetchMockData(){this.processData(rt),this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value=!1}processPolledData(t){const e=JSON.stringify(t),n=Object(L.b)(e);this.hasEverSuccessfullyLoaded.value&&n===this.lastResponseHash||(this.lastResponseHash=n,this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.processData(t),"post"===t.gameState&&this.stopTimecodePolling())}processData(t){const e=[],n=this.parseGolfHeader(t);n&&e.push(n);const i=this.parseGolfLeaderboard(t);i&&e.push(i);const r=this.parseHeaderTeams(t);r&&e.push(r);const s=this.parseMatchPredictor(t);s&&e.push(s);const a=this.parseCareerMatchup(t);a&&e.push(a);const o=this.parsePlayerSeasonStats(t);o&&e.push(o);const l=this.parseScoringSummary(t);l&&e.push(l);const c=this.parseWinProbability(t);c&&e.push(c);const u=this.parseTeamSeasonStatistics(t)||this.parseTeamsStatistics(t);u&&e.push(u);const h=this.parseDriveSummary(t);h.length>0&&e.push(...h);const d=this.parsePenalties(t);d&&e.push(d);const f=this.parseActiveAthletes(t);f&&e.push(f);const _=this.parseGameLeaders(t);_&&e.push(_);const p=this.parseRecentGames(t);p&&e.push(p);const m=this.parseTennisCompetition(t);m&&e.push(m);const v=this.parseStatLeaders(t);v&&e.push(v);const g=this.parseTennisAlsoLive(t);g&&e.push(g);const A=this.parsePromotion(t);A&&e.push(A),this.statsItems.value=e,this.currentGameState.value=t.gameState}parseDriveSummary(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams,i=t.drives;if(!n||!i||0===i.length)return[];const r=[];for(const t of i){var s;if(null==t||null===(s=t.team)||void 0===s||!s.$key)continue;const e=[...t.plays||[]].reverse(),i=e[e.length-1]||null;let a="";i&&(a=ut(i));const{plays:o,time:l,yards:c}=ct(t.description||""),u=n[t.team.$key];u&&r.push({id:t.id,lastPlayMarquee:a,plays:e,playsQuantity:o,team:u,time:l,type:"driveSummary",yards:c})}return r}parseTeamsStatistics(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams;if(!n)return null;const i=Object.values(n).find(t=>"away"===t.homeAway),r=Object.values(n).find(t=>"home"===t.homeAway);if(!i||!r)return null;if(!i.statistics||!r.statistics)return null;const s=[];for(let t=0;t<i.statistics.length;t++){const e=i.statistics[t],n=r.statistics[t];st(e)&&st(n)&&s.push({awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",displayName:e.displayName||"",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0",awayTeamValue:(null==e?void 0:e.value)||0,homeTeamValue:(null==n?void 0:n.value)||0})}return s.length?{type:"teamStats",title:"Team Stats",awayTeam:{logo:i.logo,displayName:i.displayName||"",color:i.color||"",abbreviation:i.abbreviation||""},homeTeam:{logo:r.logo,displayName:r.displayName||"",color:r.color||"",abbreviation:r.abbreviation||""},statistics:s}:null}parseTeamSeasonStatistics(t){var e,n,i,r,s;const a=(null===(e=t.entities)||void 0===e?void 0:e.teams)||{};if(!(Object.keys(a).length&&t.statTeams&&t.statTeams.title&&null!==(n=t.statTeams.sections)&&void 0!==n&&n.length&&null!==(i=t.statTeams.teams)&&void 0!==i&&i.length))return null;const o=null===(r=t.statTeams.teams[0])||void 0===r?void 0:r.$key,l=null===(s=t.statTeams.teams[1])||void 0===s?void 0:s.$key;if(!o||!l)return null;const c=a[o],u=a[l];if(!u||!c)return null;const h={};return t.statTeams.sections.forEach(t=>{if(t.$key&&t.title){const i=[];if(at(u.statistics)&&at(c.statistics)){var e,n;const r=u.statistics.find(e=>e.$key===t.$key),s=c.statistics.find(e=>e.$key===t.$key);if(r&&s&&null!==(e=s.stats)&&void 0!==e&&e.length&&null!==(n=r.stats)&&void 0!==n&&n.length){for(let t=0;t<s.stats.length;t++){const e=s.stats[t],n=r.stats[t];i.push({awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",displayName:e.displayName||"",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0",awayTeamValue:null!=e&&e.displayValue?Number(e.displayValue):0,homeTeamValue:null!=n&&n.displayValue?Number(n.displayValue):0})}h[t.$key]={title:t.title,entries:i}}}}}),{type:"teamStats",title:t.statTeams.title,awayTeam:{abbreviation:c.abbreviation,displayName:c.displayName||"",color:c.color||"",logo:c.logo},homeTeam:{abbreviation:u.abbreviation,displayName:u.displayName||"",color:u.color||"",logo:u.logo},tabbedStatistics:h}}parseMatchPredictor(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams,i=t.predictor;if(!(n&&i&&i.homeTeam&&i.awayTeam))return null;const r=n[i.homeTeam.team.$key],s=n[i.awayTeam.team.$key];if(!r||!s)return null;const a=parseFloat(i.homeTeam.gameProjection),o=parseFloat(i.awayTeam.gameProjection);return{type:"matchPredictor",header:i.header,imageUrl:i.imageUrl,awayTeam:{percentage:o,abbreviation:s.abbreviation,logo:s.logo,displayName:s.displayName||""},homeTeam:{percentage:a,abbreviation:r.abbreviation,logo:r.logo,displayName:r.displayName||""}}}parsePromotion(t){const e=t.promotion;return e?{type:"promotion",title:e.title||"",description:e.description||"",logo:e.logo||"",qrCode:e.qrCode||"",backgroundImage:e.backgroundImage||""}:null}parseCareerMatchup(t){var e;const n=t.careerMatchup,i=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(!n||!n.sections)return null;const r=t=>{if("string"==typeof t)return t;if(t&&"object"==typeof t){const e=t.displayName;if("string"==typeof e)return e}return""},s=n.sections.filter(t=>!!t).map(t=>({items:(t.items||[]).filter(t=>!!t).map(t=>{var e;const n=null===(e=t.athlete)||void 0===e?void 0:e.$key,s=i&&n?i[n]:void 0,a=r(t.status),o="On Deck"===a;return{status:a,type:r(t.type)||"",displayName:r(t.displayName)||"",athlete:s,isHighlighted:o}}),statistics:(t.statistics||[]).filter(t=>!!t).map(t=>({abbreviation:t.abbreviation||"",displayValue:t.displayValue||""}))}));return{type:"careerMatchup",title:n.title||"",sections:s}}parseHeaderTeams(t){return this.parseHeaderTeamsFromTeamHeader(t)||this.parseHeaderTeamsFromHeader(t)}parseHeaderTeamsFromHeader(t){var e,n;const i=(null===(e=t.header)||void 0===e?void 0:e.teams)||[];return 0===i.length?null:this.buildHeaderTeamsItem({response:t,headerTeams:i,linescoresHeader:(null===(n=t.header)||void 0===n?void 0:n.linescoresHeader)||[],linescoresRowHeader:void 0,isLiveFromHeaderSource:!1})}parseHeaderTeamsFromTeamHeader(t){var e,n,i,r,s,a,o,l;const c=(null===(e=t.header)||void 0===e?void 0:e.teams)||[],u=(null===(n=t.teamHeader)||void 0===n?void 0:n.teams)||[];if(0===u.length)return null;const h=u.some(t=>Array.isArray(t.linescores)&&t.linescores.length>0),d=((null===(i=t.teamHeader)||void 0===i||null===(r=i.linescoresHeader)||void 0===r?void 0:r.length)||0)>0;if(!h&&!d&&c.length>0)return null;const f="teamLogo"===(null===(s=t.teamHeader)||void 0===s||null===(a=s.style)||void 0===a||null===(o=a.linescores)||void 0===o?void 0:o.rowHeader)?"teamLogo":void 0;return this.buildHeaderTeamsItem({response:t,headerTeams:u,linescoresHeader:(null===(l=t.teamHeader)||void 0===l?void 0:l.linescoresHeader)||[],linescoresRowHeader:f,isLiveFromHeaderSource:h||d})}buildHeaderTeamsItem(t){var e;const{response:n,headerTeams:i,linescoresHeader:r,linescoresRowHeader:s,isLiveFromHeaderSource:a}=t,o=null===(e=n.entities)||void 0===e?void 0:e.teams;if(!o||0===i.length)return null;const l=i.find(t=>{const e=o[t.$key];return e&&"home"===e.homeAway}),c=i.find(t=>{const e=o[t.$key];return e&&"away"===e.homeAway}),u=i[0],h=i[1],d=l||h,f=c||u;if(!d||!f)return null;const _=o[d.$key],p=o[f.$key];if(!_||!p)return null;const m=[],v=new Set,g=p.statistics||[],A=_.statistics||[],b=g.filter(st),y=A.filter(st);[...b,...y].forEach(t=>{v.add(t.$key)}),v.forEach(t=>{const e=b.find(e=>e.$key===t),n=y.find(e=>e.$key===t);e&&n&&m.push({displayName:(null==e?void 0:e.displayName)||(null==n?void 0:n.displayName)||"",awayTeamValue:(null==e?void 0:e.value)||0,homeTeamValue:(null==n?void 0:n.value)||0,awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0"})});const w=t=>t.linescores&&t.linescores.length>0?t.linescores.map(t=>t.displayValue):"string"==typeof t.score&&t.score.length>0?[t.score]:[],E=t=>{if(Array.isArray(t.details)&&t.details.filter(Boolean).length>0)return t.details.filter(Boolean)},k=E(f),C=E(d);let x=r,B=w(f),S=w(d);if(x.length>0&&(B.length>0||S.length>0)&&"teamLogo"===s){const t=x.slice(-3);if((t.includes("R")||t.includes("H")||t.includes("E"))&&x.length>12){const t=3,e=x.length-t,n=9;if(e>n){const t=e-n;x=x.slice(t),B=B.slice(t),S=S.slice(t)}}}return{type:"headerTeam",linescoresHeader:x,linescoresRowHeader:s,isLive:"in"===n.gameState||"post"===n.gameState||a,statistics:m,awayTeam:{abbreviation:p.abbreviation,color:p.color,id:p.id,linescores:B,logo:p.logo,name:p.name,record:p.record,...k?{details:k}:{}},homeTeam:{abbreviation:_.abbreviation,color:_.color,id:_.id,linescores:S,logo:_.logo,name:_.name,record:_.record,...C?{details:C}:{}}}}parseRecentGames(t){var e,n,i;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=t.previousGames;if(!r||!s||0===s.length)return null;const a=s.find(t=>1===(null==t?void 0:t.displayOrder)),o=s.find(t=>2===(null==t?void 0:t.displayOrder));if(!a||!o)return null;if(!a.events||!o.events)return null;if(null===(n=a.team)||void 0===n||!n.$key||null===(i=o.team)||void 0===i||!i.$key)return null;const l=r[a.team.$key],c=r[o.team.$key];if(!l||!c)return null;return{type:"recentGames",awayTeam:{events:[...a.events].reverse().filter(t=>{var e;return null==t||null===(e=t.team)||void 0===e?void 0:e.$key}).map(t=>{const e=r[t.team.$key];return{gameResult:t.gameResult,homeAway:t.team.homeAway,score:t.score,teamLogo:null==e?void 0:e.logo}}),logo:l.logo,name:l.shortDisplayName},homeTeam:{events:[...o.events].reverse().filter(t=>{var e;return null==t||null===(e=t.team)||void 0===e?void 0:e.$key}).map(t=>{const e=r[t.team.$key];return{gameResult:t.gameResult,homeAway:t.team.homeAway,score:t.score,teamLogo:null==e?void 0:e.logo}}),logo:c.logo,name:c.shortDisplayName}}}parseWinProbability(t){var e;const n=t.winProbability;if(!n||!n.homeTeam||!n.awayTeam)return null;const i=null===(e=t.entities)||void 0===e?void 0:e.teams;if(!i)return null;const r=i[n.homeTeam.team.$key],s=i[n.awayTeam.team.$key];return r&&s?{type:"winProbability",chartImageUrl:n.imageUrl,awayTeam:{id:s.id,abbreviation:s.abbreviation,logo:s.logo,winPercentage:n.awayTeam.winPercentage},homeTeam:{id:r.id,abbreviation:r.abbreviation,logo:r.logo,winPercentage:n.homeTeam.winPercentage}}:null}parseGameLeaders(t){var e,n;if(null===(e=t.entities)||void 0===e||!e.athletes||null===(n=t.entities)||void 0===n||!n.teams)return null;const i=t.leaders,r="pre"===t.gameState;if(!i||0===i.length)return null;const s=[];for(const e of i){var a,o,l,c,u,h;if(!e.away||!e.home)continue;if(null===(a=e.away)||void 0===a||null===(o=a.athlete)||void 0===o||!o.$key||null===(l=e.home)||void 0===l||null===(c=l.athlete)||void 0===c||!c.$key)continue;const n=t.entities.athletes[e.away.athlete.$key],i=t.entities.athletes[e.home.athlete.$key];if(!n||!i)continue;const r=e.away.athlete.statistics||[],d=e.home.athlete.statistics||[],f={displayName:e.displayName,awayAthlete:{id:n.id,displayName:n.displayName,headshot:n.headshot?Object(G.b)(n.headshot,256,144):"",position:(null===(u=n.position)||void 0===u?void 0:u.abbreviation)||"-",shortName:n.shortName,jersey:n.jersey,statistics:r},homeAthlete:{id:i.id,displayName:i.displayName,headshot:i.headshot?Object(G.b)(i.headshot,256,144):"",position:(null===(h=i.position)||void 0===h?void 0:h.abbreviation)||"-",shortName:i.shortName,jersey:i.jersey,statistics:d}};s.push(f)}return s.length?{type:"gameLeaders",items:s,displayText:r?"Season Leaders":"Game Leaders"}:null}parseStatLeaders(t){var e,n;const i=t.statLeaders||t.profiles,r=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(null==i||null===(n=i.sections)||void 0===n||!n.length||!r)return null;const s=[];for(const t of i.sections){var a;if(null===(a=t.items)||void 0===a||!a.length)continue;const e=[];for(const n of t.items){var o,l,c;const t=null===(o=n.athlete)||void 0===o?void 0:o.$key,i=t?r[t]:void 0,s=null!=i&&i.headshot?Object(G.b)(i.headshot,256,144):"",a=(null===(l=n.athlete)||void 0===l?void 0:l.statistics)||[],u=t=>!0===t.featured||"true"===t.featured,h=a.find(u),d=h?{displayValue:h.displayValue||"",label:h.label}:null,f=a.filter(t=>!u(t)).map(t=>({displayValue:t.displayValue||"",label:t.label}));e.push({headshot:s,backgroundImage:(null==i||null===(c=i.flag)||void 0===c?void 0:c.href)||"",title:n.title||"",subtitle:n.subtitle,details:n.details,featuredStat:d,statistics:f})}e.length>0&&s.push({title:t.title||"",items:e})}return 0===s.length?null:{type:"statLeaders",title:i.title||"Stat Leaders",sections:s}}parseActiveAthletes(t){var e;const n=t.activeAthletes,{awayTeam:i,homeTeam:r}=this.getActiveAthletesTeamInfo(t),s=[];if(null===(e=t.entities)||void 0===e||!e.athletes||!n||-1===i.index||-1===r.index)return null;for(let e=0;e<n.teams[i.index].athletes.length;e++){var a,o;const l=n.teams[i.index].athletes[e],c=n.teams[r.index].athletes[e];if(null==l||!l.$key||null==c||!c.$key)continue;const u=t.entities.athletes[l.$key],h=t.entities.athletes[c.$key];if(!u||!h)continue;const d=[],f=[],_=l.statLine||"",p=c.statLine||"";_.trim().split(",").forEach((t,e)=>{const[n,i]=t.trim().split(" "),r=p.trim().split(",")[e];if(!r)return;const[s,a]=r.trim().split(" ");d.push({displayValue:n||"0",abbreviation:i||"-",value:parseFloat(n)||0}),f.push({displayValue:s||"0",abbreviation:a||"-",value:parseFloat(s)||0})}),s.push({awayAthlete:{id:u.id,displayName:u.displayName,headshot:u.headshot?Object(G.b)(u.headshot,256,144):"",position:(null===(a=u.position)||void 0===a?void 0:a.abbreviation)||"-",shortName:u.shortName,jersey:u.jersey,statistics:d,minifiedStatistics:l.statLine},homeAthlete:{id:h.id,displayName:h.displayName,headshot:h.headshot?Object(G.b)(h.headshot,256,144):"",position:(null===(o=h.position)||void 0===o?void 0:o.abbreviation)||"-",shortName:h.shortName,jersey:h.jersey,statistics:f,minifiedStatistics:c.statLine}})}return s.length?{type:"activeAthletes",awayTeam:i,homeTeam:r,athletes:s,displayText:n.displayText}:null}getActiveAthletesTeamInfo(t){var e,n;const i=(null===(e=t.activeAthletes)||void 0===e?void 0:e.teams)||[];let r={index:-1,id:"",logo:"",name:"-"},s={index:-1,id:"",logo:"",name:"-"};const a=null===(n=t.entities)||void 0===n?void 0:n.teams;if(!a)return{awayTeam:r,homeTeam:s};for(let t=0;t<i.length;t++){const e=a[i[t].team.$key];e&&("away"===e.homeAway?r={index:t,id:e.id,logo:e.logo,name:e.name||"-"}:"home"===e.homeAway&&(s={index:t,id:e.id,logo:e.logo,name:e.name||"-"}))}return{awayTeam:r,homeTeam:s}}parseScoringSummary(t){var e,n;const i=t.scoringSummary;if(!i||!i.sections)return null;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=null===(n=t.entities)||void 0===n?void 0:n.athletes;if((t=>t&&"object"==typeof t&&"title"in t&&"sections"in t&&t.sections&&Array.isArray(t.sections)&&t.sections.some(t=>t&&"items"in t&&Array.isArray(t.items)&&t.items.some(t=>t&&("text"in t||"shortText"in t||"header"in t))))(i)){const t=[];for(const e of i.sections){var a;if(!e.title||null===(a=e.items)||void 0===a||!a.length)continue;const n=[];for(const t of e.items){var o,l,c;if(null==t||null===(o=t.team)||void 0===o||!o.$key||null==t||null===(l=t.athlete)||void 0===l||!l.$key)continue;const e=null==r?void 0:r[t.team.$key],i=null==s?void 0:s[t.athlete.$key];if(!e||!i)continue;const a=[];t.shortText&&a.push({featured:!1,title:t.shortText}),n.push({teamLogo:(null==e?void 0:e.logo)||"",teamName:null==e?void 0:e.abbreviation,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,200,144):void 0,athleteShortName:(null==i?void 0:i.shortName)||"",athleteJersey:null!=i&&i.jersey?"#"+i.jersey:"",athletePosition:(null==i||null===(c=i.position)||void 0===c?void 0:c.abbreviation)||"",text:(null==t?void 0:t.text)||"",shortText:a,header:((null==t?void 0:t.header)||[]).map((t,e)=>{var n,i;return{featured:null!==(n=t.featured)&&void 0!==n&&n,title:`${null!==(i=t.title)&&void 0!==i?i:""}${0===e?",":""}`}})})}if(n.length>0){const i=ft(n,!0);t.push({title:e.title,items:n,...i})}}return 0===t.length?null:{type:"scoringSummary",tag:"mlb",title:i.title||"Scoring Summary",sections:t}}if((t=>t&&"object"==typeof t&&"title"in t&&"sections"in t&&t.sections&&Array.isArray(t.sections)&&t.sections.every(t=>t&&"title"in t&&"items"in t&&Array.isArray(t.items)&&t.items.every(t=>t&&"clock"in t&&"title"in t&&"team"in t&&"athlete"in t)))(i)){const t=i,e=[];for(const n of t.sections||[]){const t=[];for(const e of n.items||[]){var u,h,d,f;if(null==e||null===(u=e.team)||void 0===u||!u.$key||null==e||null===(h=e.athlete)||void 0===h||!h.$key||null==e||!e.title)continue;const n=e.team&&e.team.$key?null==r?void 0:r[e.team.$key]:void 0,i=(null===(d=e.athlete)||void 0===d?void 0:d.$key)||"",a=null==s?void 0:s[i],o=e.title||"",[l,...c]=o.split(" ");let _="",p="";c.length>0&&(_=c[c.length-1],p=c.slice(0,-1).join(" "));const m=[];e.clock&&m.push({featured:!0,title:e.clock}),null!=n&&n.abbreviation&&m.push({featured:!1,title:n.abbreviation});const v=[];l&&v.push({featured:!1,title:l}),p&&v.push({featured:!0,title:p}),_&&v.push({featured:!1,title:_}),t.push({teamLogo:(null==n?void 0:n.logo)||"",teamName:(null==n?void 0:n.abbreviation)||"",header:m,text:(null==e?void 0:e.description)||"",shortText:v,headshot:null!=a&&a.headshot?Object(G.b)(a.headshot,200,144):void 0,athleteShortName:p,athletePosition:(null==a||null===(f=a.position)||void 0===f?void 0:f.abbreviation)||"",athleteJersey:l})}if(t.length>0){const i=ft(t,!0);e.push({title:(null==n?void 0:n.title)||"",items:t,...i})}}return 0===e.length?null:{type:"scoringSummary",tag:"hockey",title:t.title||"Scoring Summary",sections:e}}return null}parsePenalties(t){var e,n;const i=t.penaltySummary;if(!i||!i.sections)return null;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=null===(n=t.entities)||void 0===n?void 0:n.athletes,a=i.sections.map(t=>{const e=t.items.filter(t=>{var e,n;return(null==t||null===(e=t.team)||void 0===e?void 0:e.$key)&&(null==t||null===(n=t.athlete)||void 0===n?void 0:n.$key)}).map(t=>{var e;const n=null==r?void 0:r[t.team.$key],i=null==s?void 0:s[t.athlete.$key],[a,...o]=t.title.split(" "),l=(null!=o?o:[]).join(" ")||"",c=[];return a&&c.push({featured:!1,title:a}),l&&c.push({featured:!0,title:l}),{teamLogo:(null==n?void 0:n.logo)||"",teamName:(null==n?void 0:n.abbreviation)||"",header:[{title:t.clock||"",featured:!1}],text:t.description||"",shortText:c,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,200,144):void 0,athleteShortName:o.join(" "),athletePosition:(null==i||null===(e=i.position)||void 0===e?void 0:e.abbreviation)||"",athleteJersey:a||""}}),n=ft(e,!1);return{title:t.title,items:e,...n}});return!a.length||a.every(t=>0===t.items.length)?null:{type:"penalties",tag:"penalties",title:i.title,sections:a}}parsePlayerSeasonStats(t){var e,n,i;const r=t.playerStats,s=null===(e=t.entities)||void 0===e?void 0:e.teams,a=null===(n=t.entities)||void 0===n?void 0:n.athletes;if(null==r||null===(i=r.teams)||void 0===i||!i.length||!s)return null;const o=[];for(const t of r.teams){if(!t.$key)continue;const e=s[t.$key];if(!e)continue;const n=[];for(const e of t.sections||[]){var l;if(!e.title||null===(l=e.items)||void 0===l||!l.length)continue;const t=[];for(const n of e.items){var c,u,h,d,f;if(!n.title)continue;const e=null===(c=n.athlete)||void 0===c?void 0:c.$key,i=e?null==a?void 0:a[e]:void 0,r=(null===(u=n.athlete)||void 0===u?void 0:u.statistics)||[],s=r.find(t=>t.featured);t.push({athleteId:e,title:n.title,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,256,144):"",position:(null==i||null===(h=i.position)||void 0===h?void 0:h.abbreviation)||"",jersey:(null==i?void 0:i.jersey)||"",featuredStat:s?{displayValue:s.displayValue||"",label:s.label||""}:null,statistics:r.filter(t=>!t.featured).map(t=>({displayValue:t.displayValue||"",label:t.label||""})),playerStatus:null!=n&&n.status?{displayName:null!==(d=n.status.displayName)&&void 0!==d?d:"",type:null!==(f=n.status.type)&&void 0!==f?f:""}:null})}if(t.length>0){let i=null;e.onDeckAthlete&&(i=t.find(t=>t.athleteId===e.onDeckAthlete)||null),n.push({title:e.title,items:t,onDeckPlayer:i})}}n.length>0&&o.push({teamKey:t.$key,shortDisplayName:e.shortDisplayName||e.displayName||"",color:e.color||"",sections:n})}return 0===o.length?null:{type:"playerSeasonStats",teams:o}}parseGolfHeader(t){var e;const n=t.golfHeader||t.competitionHeader;return n?{title:n.title||"",details:n.details||[],dateRange:dt(n.date||"",n.endDate||""),logoUrl:n.logoUrl||"",courseSummary:n.summary||[],weather:n.weather?{temperature:null!==(e=n.weather.temperature)&&void 0!==e?e:0,iconUrl:n.weather.iconUrl||"",logoUrl:n.weather.logoUrl||""}:void 0,type:"golfHeader"}:null}parseGolfLeaderboard(t){var e,n,i;const r=t.leaderboard,s=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(!r||null===(n=r.leaderboardHeader)||void 0===n||!n.length||null===(i=r.leaders)||void 0===i||!i.length)return null;const a=(r.linescoresHeader||[]).map(t=>({label:t.label||"",values:t.values||[]})),o=(r.scoreTypeKey||[]).map(t=>({label:t.label||"",iconUrl:t.iconUrl||""})),l=r.leaders.map(t=>{var e,n,i,r,a,o,l,c,u,h,d;const f=null===(e=t.leaderboardValues)||void 0===e?void 0:e[0],_=null==f||null===(n=f.athlete)||void 0===n?void 0:n.$key,p=_?null==s?void 0:s[_]:void 0,m=null!==(i=null==f?void 0:f.displayValue)&&void 0!==i?i:"",v=null!==(r=null==p||null===(a=p.flag)||void 0===a?void 0:a.href)&&void 0!==r?r:"",g=null!==(o=null==p?void 0:p.shortName)&&void 0!==o?o:"",A=null!==(l=null==f||null===(c=f.athlete)||void 0===c?void 0:c.subtitles)&&void 0!==l?l:[],b=null==f?void 0:f.athlete,y=null!==(u=null==b?void 0:b.currentHoleIndex)&&void 0!==u?u:null==b?void 0:b.currentHole,w=null==b?void 0:b.startingHole;return{position:m,flagUrl:v,name:g,subtitles:A,values:null!==(h=null===(d=t.leaderboardValues)||void 0===d?void 0:d.slice(1).map(t=>{var e;return null!==(e=t.displayValue)&&void 0!==e?e:""}))&&void 0!==h?h:[],currentHoleIndex:y,startingHole:w,linescoreValues:(t.linescoreValues||[]).map(t=>({label:t.label||"",values:(t.values||[]).map(t=>{var e;return{displayValue:null!==(e=t.displayValue)&&void 0!==e?e:"",type:t.type}})}))}}),c=l.slice(0,5),u=Math.max(0,Math.min(10,l.length)-5),h=u>0?`+${u} More for the Top Ten`:null;return{type:"golfLeaderboard",leaderboardHeader:[...r.leaderboardHeader],linescoreHeader:a,scoreTypeKey:o,players:l,topPlayers:c,showMoreText:h}}parseSingleTennisCompetition(t,e){var n,i,r,s,a,o,l,c,u,h,d;if(null==t||null===(n=t.competitors)||void 0===n||!n.length||t.competitors.length<2)return null;const f="doubles"===(null===(i=t.type)||void 0===i?void 0:i.type),_=null!==(r=null!==(s=null===(a=t.situation)||void 0===a||null===(o=a.server)||void 0===o?void 0:o.competitorId)&&void 0!==s?s:null===(l=t.situation)||void 0===l||null===(c=l.server)||void 0===c?void 0:c.id)&&void 0!==r?r:null,p=[...t.competitors].sort((t,e)=>Number(t.displayOrder)-Number(e.displayOrder)).map(t=>{var n,i,r,s,a,o;const l=(null!==(n=null!==(i=t.athlete)&&void 0!==i?i:t.athletes)&&void 0!==n?n:[]).map(t=>t.$key),c=(null!==(r=t.linescores)&&void 0!==r?r:[]).map(t=>{var e;return{displayValue:null!==(e=t.displayValue)&&void 0!==e?e:null!=t.value?String(t.value):"",tiebreak:null!=t.tiebreak?String(t.tiebreak):void 0,winner:t.winner}});if(f&&l.length>=2){const n=l.map(t=>{var n,i,r,s,a,o;const l=null==e?void 0:e[t];return{shortName:null!==(n=null==l?void 0:l.shortName)&&void 0!==n?n:"",countryAbbr:null!==(i=null==l||null===(r=l.country)||void 0===r?void 0:r.abbreviation)&&void 0!==i?i:"",abbreviation:null!==(s=null==l?void 0:l.abbreviation)&&void 0!==s?s:"",flagHref:null==l||null===(a=l.country)||void 0===a||null===(o=a.flag)||void 0===o?void 0:o.href}});return{id:t.id,displayOrder:Number(t.displayOrder),ranking:t.ranking,winner:t.winner,linescores:c,athleteKeys:l,athletes:n}}const u=l[0],h=u?null==e?void 0:e[u]:void 0;return{id:t.id,displayOrder:Number(t.displayOrder),ranking:t.ranking,winner:t.winner,linescores:c,athleteKeys:l,headshot:null==h?void 0:h.headshot,shortName:null==h?void 0:h.shortName,countryAbbr:null==h||null===(s=h.country)||void 0===s?void 0:s.abbreviation,abbreviation:null==h?void 0:h.abbreviation,flagHref:null==h||null===(a=h.country)||void 0===a||null===(o=a.flag)||void 0===o?void 0:o.href}});return{type:"tennisMatchHeader",title:null!==(u=t.title)&&void 0!==u?u:"",court:null!==(h=t.court)&&void 0!==h?h:"",isDoubles:f,serverCompetitorId:_,linescoresHeader:null!==(d=t.linescoresHeader)&&void 0!==d?d:[],competitors:p}}parseTennisCompetition(t){var e;const n=t.competition;return n?this.parseSingleTennisCompetition(n,null===(e=t.entities)||void 0===e?void 0:e.athletes):null}parseTennisAlsoLive(t){var e,n,i;const r=t.live;if(null==r||null===(e=r.competitions)||void 0===e||!e.length)return null;const s=null===(n=t.entities)||void 0===n?void 0:n.athletes,a=r.competitions.map(t=>this.parseSingleTennisCompetition(t,s)).filter(t=>!!t);return 0===a.length?null:{type:"tennisAlsoLive",title:null!==(i=r.title)&&void 0!==i?i:"Also Live",competitions:a}}}var mt=pt;function vt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gt=class{constructor(){vt(this,"networkManager",void 0),vt(this,"leagueManagerOverrideBaseUrl",""),vt(this,"fantasyOverrideBaseUrl",""),vt(this,"gambitOverrideBaseUrl",""),this.networkManager=new T.b}get fantasyBaseUrl(){return this.fantasyOverrideBaseUrl||"https://fan.api.espn.com"}get leagueManagerBaseUrl(){return this.leagueManagerOverrideBaseUrl||"https://lm-api-partner.fantasy.espn.com"}get tournamentChallengeBaseUrl(){return this.gambitOverrideBaseUrl||"https://gambit-api-partner.fantasy.espn.com"}pollFantasy({eventId:t,jwt:e,swid:n},i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.fantasyBaseUrl}/apis/v2/fans/${n}`,interval:i,headers:{"x-p13n-auth":e},onData:r,onError:s,params:{displayHiddenPrefs:!0,context:"fantasy",useCookieAuth:!0,source:"fantasyictv-bbd",featureFlags:"challengeEntries",filterType:"FANTASY_CTV",platform:"fantasyictv_bbd",deviceType:"ictv",swid:n,eventId:t}})}pollLeagueManager({game:t,leagueId:e,seasonId:n,token:i,proGameId:r,teamId:s},a,o,l){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.leagueManagerBaseUrl}/apis/v3/games/${t}/seasons/${n}/segments/0/leagues/${e}/scoreboard`,interval:a,onData:o,onError:l,headers:{"x-p13n-auth":i},params:{view:"ictv_scoreboard",platform:"fantasyictv_bbd",deviceType:"ictv",proGameId:r,teamId:s}})}getPromo(){return this.networkManager.externalApiRequest({endpoint:"https://client.espncdn.com/ictv/promo.json",useCache:!0})}pollTournamentChallenge({challengeId:t,competitionId:e,token:n},i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.tournamentChallengeBaseUrl}/apis/v1/challenges/${t}/scoreboard`,interval:i,onData:r,onError:s,headers:{"x-p13n-auth":n},params:{competitionId:e,view:"ictv_scoreboard",platform:"fantasyictv_bbd",deviceType:"ictv"}})}};const At=t=>{var e,n;return void 0!==(null===(e=t.matchups)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.teams)};function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class yt{constructor(t){bt(this,"polling",{interval:6e4,task:null,lastResponseHash:null}),bt(this,"fantasyService",void 0),this.fantasyService=t}async refresh(t,e,n){this.stop(),await this.start(t,e,n)}stop(){this.polling.task&&(this.polling.task.stop(),this.polling.task=null)}removeLastResponseHash(){this.polling.lastResponseHash=null}async start(t,e,n){try{this.polling.task=this.fantasyService.pollFantasy(t,this.polling.interval,i=>{this.updateInterval(t,i.headers,e,n),this.processPolledData(i.data,e)},e=>{this.handlePollingError(e,t.swid),n(e)})}catch(t){Object(p.a)("FantasyPolling","pollFantasy",t)}}updateInterval(t,e,n,i){const r=this.getResponseHeaderPollingIntervalValue(e),s=this.getPanelConfigInterval(),a=r||s;a&&a!==this.polling.interval&&(console.log(`[Fantasy] Updating fantasy polling interval from ${this.polling.interval}ms to ${a}ms`),this.polling.interval=a,this.refresh(t,n,i))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[Fantasy] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.fan_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[FANTASY] Invalid fantasy polling interval from panel config: ${s}.`),null):1e3*a}processPolledData(t,e){const n=Object(L.b)(JSON.stringify(t));this.polling.lastResponseHash!==n?(this.polling.lastResponseHash=n,e(t)):console.log("[Fantasy] Fantasy Response hash is the same as last successful response - skipping update")}handlePollingError(t,e){Object(p.a)("FantasyPolling","handlePollingError",t,{swid:e?e.substring(0,8)+"...":"unknown",pollingInterval:this.polling.interval})}}function wt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Et{constructor(t){wt(this,"polling",{}),wt(this,"fantasyService",void 0),this.fantasyService=t}refresh(t,e,n,i){this.stop(t),this.polling[t]||(this.polling[t]={interval:6e4,lastResponseHash:null,task:null}),this.start(t,e,n,i)}stop(t){var e,n,i,r;null!==(e=this.polling[t])&&void 0!==e&&e.task&&(null===(n=this.polling[t])||void 0===n||null===(i=n.task)||void 0===i||null===(r=i.stop)||void 0===r||r.call(i),this.polling[t].task=null)}start(t,e,n,i){try{this.polling[t].task=this.fantasyService.pollLeagueManager(e,this.polling[t].interval,r=>{this.updateInterval(t,e,n,r.headers,i),this.processPolledData(t,r.data,n)},n=>{this.handlePollingError(n,t,e),i(n)})}catch(t){Object(p.a)("LeagueManagerPolling","pollLeagueManager",t)}}processPolledData(t,e,n){const i=Object(L.b)(JSON.stringify(e));this.polling[t].lastResponseHash!==i?(this.polling[t].lastResponseHash=i,n(e)):console.log("[Fantasy] League manager Response hash is the same as last successful response - skipping update")}updateInterval(t,e,n,i,r){var s;const a=this.getResponseHeaderPollingIntervalValue(i),o=this.getPanelConfigInterval(),l=a||o;var c;l&&l!==(null===(s=this.polling[t])||void 0===s?void 0:s.interval)&&(console.log(`[Fantasy] Updating league manager polling interval from ${null===(c=this.polling[t])||void 0===c?void 0:c.interval}ms to ${l}ms`),this.polling[t].interval=l,this.refresh(t,e,n,r))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[Fantasy] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.lm_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[FANTASY] Invalid league manager polling interval from panel config: ${s}.`),null):1e3*a}stopAll(){Object.keys(this.polling).forEach(t=>{this.stop(t)}),this.polling={}}handlePollingError(t,e,n){var i;Object(p.a)("LeagueManagerPolling","handlePollingError",t,{key:e,leagueId:null==n?void 0:n.leagueId,game:null==n?void 0:n.game,pollingInterval:null===(i=this.polling[e])||void 0===i?void 0:i.interval})}}function kt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ct{constructor(t){kt(this,"polling",{}),kt(this,"fantasyService",void 0),this.fantasyService=t}refresh(t,e,n,i){this.stop(t),this.polling[t]||(this.polling[t]={interval:6e4,lastResponseHash:null,task:null}),this.start(t,e,n,i)}stop(t){var e,n,i,r;null!==(e=this.polling[t])&&void 0!==e&&e.task&&(null===(n=this.polling[t])||void 0===n||null===(i=n.task)||void 0===i||null===(r=i.stop)||void 0===r||r.call(i),this.polling[t].task=null)}start(t,e,n,i){try{this.polling[t].task=this.fantasyService.pollTournamentChallenge(e,this.polling[t].interval,r=>{this.updateInterval(t,e,n,r.headers,i),this.processPolledData(t,r.data,n)},n=>{this.handlePollingError(n,t,e),i(n)})}catch(t){Object(p.a)("TournamentPolling","pollTournamentChallenge",t)}}updateInterval(t,e,n,i,r){var s;const a=this.getResponseHeaderPollingIntervalValue(i),o=this.getPanelConfigInterval(),l=a||o;var c;l&&l!==(null===(s=this.polling[t])||void 0===s?void 0:s.interval)&&(console.log(`[TOURNAMENT] Updating tournament polling interval from ${null===(c=this.polling[t])||void 0===c?void 0:c.interval}ms to ${l}ms`),this.polling[t].interval=l,this.refresh(t,e,n,r))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[TOURNAMENT] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.gambit_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[TOURNAMENT] Invalid tournament polling interval from panel config: ${s}.`),null):1e3*a}processPolledData(t,e,n){const i=Object(L.b)(JSON.stringify(e));this.polling[t].lastResponseHash!==i?(this.polling[t].lastResponseHash=i,n(e)):console.log("[TOURNAMENT] Tournament Response hash is the same as last successful response - skipping update")}stopAll(){Object.keys(this.polling).forEach(t=>{this.stop(t)}),this.polling={}}handlePollingError(t,e,n){var i;Object(p.a)("TournamentPolling","handlePollingError",t,{key:e,challengeId:null==n?void 0:n.challengeId,pollingInterval:null===(i=this.polling[e])||void 0===i?void 0:i.interval})}}const xt={id:"{969DDFA7-B575-4017-966C-ED83EC3EDF37}",anon:!1,profile:{createDate:1533061925808,lastUpdateDate:1762527083860,hasNotificationPreferences:!1,useSortGlobal:!0,settings:{videoAutoStart:{value:"1",createDate:1533061925808},hideSportsBetting:{value:"false",createDate:1757023536525},activeProducts:{value:"true",createDate:1533379743011}},isInsider:!0,isPremium:!0,lastName:"Janssen",firstName:"Megan",email:"megan.m.janssen@espn.com",userName:"meganjanssen25"},lastAccessDate:"2025-11-10T05:27:31Z",createDate:"2018-07-31T18:32:05Z",lastUpdateDate:"2025-11-07T14:51:23Z",bettingFeatures:[{name:"bettingContentEnabled",value:!0},{name:"bettingLinksEnabled",value:!1}],preferences:[{id:"1:549555067:1:2025",createDate:1742909253422,lastUpdateDate:1757380930299,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MoM",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:549555067,groupSize:16,groupName:"Fantasy Eng - Guillotine",groupManager:!0,draftDate:"1794416827000",draftType:1,draftStatus:1,leagueStatus:1,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=549555067&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=549555067&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_VALID",logoUrl:"https://upload.wikimedia.org/wikipedia/en/0/0d/Daenerys_Targaryen_with_Dragon-Emilia_Clarke.jpg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=549555067&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/549555067?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:7,isHidden:!0,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"4:1278583616:1:2025",createDate:1742915003927,lastUpdateDate:1756670657496,metaData:{entry:{entryId:4,entryMetadata:{teamName:"Megantron",teamAbbrev:"MEGA",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1278583616,groupSize:18,groupName:"Tarps OFF",groupManager:!1,draftDate:17557776e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1278583616&teamId=4",href:"https://fantasy.espn.com/football/league?leagueId=1278583616&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_VALID",logoUrl:"https://i.giphy.com/media/fZ91xzFtKWmoJSD4TK/giphy.gif",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1278583616&teamId=4&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1278583616?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B4%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772944:1,401772630:1,401772772:1,401772773:1,401772927:1,401772879:1,401772636:1,401772876:1}},currentLineup:{"-16026":16,16800:23,3043078:2,3052587:0,3121023:6,3123052:17,3139477:20,4241985:2,4242355:20,4362238:20,4372016:4,4426385:20,4429025:20,4612826:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:9,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1027557112:1:2025",createDate:1742911155496,lastUpdateDate:1756920410999,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MoM",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1027557112,groupSize:8,groupName:"Fantasy Platform Engineers",groupManager:!0,draftDate:17569188e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1027557112&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=1027557112&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/Solo/ESPN_Star_Wars_Qira-01.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1027557112&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1027557112?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772630:1,401772927:1,401772879:1,401772876:2,401772636:4}},currentLineup:{"-16009":16,3040151:6,3121023:20,3123052:17,3139477:20,3917792:7,4239993:20,4242335:2,4372016:4,4429615:4,4430807:2,4433970:0,4569987:23,4683062:20},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:10,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:40059468:1:2025",createDate:1742915689938,lastUpdateDate:1756774193047,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Lamb-da Functions",teamAbbrev:"LAMB",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:40059468,groupSize:8,groupName:"The Bean Queens",groupManager:!0,draftDate:17567712e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=40059468&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=40059468&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_UPLOAD",logoUrl:"https://mystique-api.fantasy.espn.com/apis/v1/domains/lm/images/bc9f0e30-8796-11f0-b6e4-9dd13c0fbbe2",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=40059468&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/40059468?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:2,401772772:1,401772773:1,401772927:3,401772876:1,401772636:1}},currentLineup:{"-16001":16,15818:4,3052587:0,3054850:20,3116365:20,3917792:20,4241389:20,4361307:6,4362081:17,4379399:2,4429025:23,4429160:2,4429615:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:11,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:2124806394:1:2025",createDate:1742912327647,lastUpdateDate:1757029916228,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Team Baron",teamAbbrev:"BARO",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:2124806394,groupSize:16,groupName:"Live Scoring",groupManager:!1,draftDate:1,draftType:2,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=2124806394&teamId=2",href:"https://fantasy.espn.com/football/league?leagueId=2124806394&seasonId=2025",draftTypeName:"Autopick"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/19.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=2124806394&teamId=2&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/2124806394?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772770:1,401772771:3,401772944:1,401772630:1,401772772:1,401772773:2,401772875:2,401772878:1,401772879:2,401772927:11,401772876:1}},currentLineup:{"-16012":16,"-16003":16,"-14012":19,"-14002":19,15818:4,2473037:17,2971573:17,3045138:23,3059915:2,3126368:18,3139477:0,3915411:2,3918298:20,4012556:2,4034779:23,4037457:2,4038941:0,4240472:6,4241985:2,4242369:23,4242557:23,4242558:6,4360797:23,4361432:23,4361496:18,4362087:21,4362477:4,4362921:4,4372414:23,4421446:2,4428331:4,4429025:4,4430723:6,4430968:2,4431611:20,4595342:6,4596602:2,4597703:23,4612826:4,4686612:4,4689988:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:12,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1678259:1:2025",createDate:1742913134199,lastUpdateDate:1755702318851,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Test Acct",teamAbbrev:"MEGA",leagueFormatTypeId:0,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1678259,groupSize:4,groupName:"BYE WEEK TEST!",groupManager:!0,draftDate:null,draftType:0,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1678259&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=1678259&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/DIS_Avengers_EndGame/DIS_Avengers_EndGame_A_2.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1678259&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1678259?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772769:1,401772630:2,401772927:2,401772876:1}},currentLineup:{2577417:0,3121023:6,4040715:20,4047646:4,4047650:4,4361579:2,4372019:2,4426354:4,4429615:4,4569987:2,4685016:2},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:13,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"8:1130440938:2:2025",createDate:1737632028020,lastUpdateDate:1759462119590,metaData:{entry:{entryId:8,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MINI",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1130440938,groupSize:8,groupName:"Interactive Platform Legends!",groupManager:!1,draftDate:1743012e6,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1130440938&teamId=8",href:"http://fantasy.espn.com/baseball/league?leagueId=1130440938&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/Solo/ESPN_Star_Wars_Qira-01.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1130440938&teamId=8&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1130440938?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B8%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{32157:13,32367:3,32685:13,32767:12,34945:5,34967:17,34995:5,36020:5,36071:13,36488:16,39895:0,40080:17,41179:2,41355:4,42433:13,42449:13,42796:17,4109109:1,4208281:16,4692526:13,5132011:16,5150939:13},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:13,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1335047630:2:2025",createDate:1742230557423,lastUpdateDate:1755632109653,metaData:{entry:{entryId:1,entryMetadata:{teamName:"UnDrafted",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1335047630,groupSize:10,groupName:"Undrafted; Not Set",groupManager:!0,draftDate:null,draftType:1,draftStatus:1,leagueStatus:1,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1335047630&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1335047630&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_UPLOAD",logoUrl:"https://mystique-api.fantasy.espn.com/apis/v1/domains/lm/images/5c82c630-212b-11f0-bf52-473646e3de99",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1335047630&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1335047630?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:17,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"cd9ccb60-2a84-11f0-a3e0-ffe8c80e5341",createDate:1762778889707,metaData:{entry:{entryUuid:"cd9ccb60-2a84-11f0-a3e0-ffe8c80e5341",lastAvailableDate:176819394e4,challengeId:"263",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png",darkLogoURL:"https://chui-assets-cdn.espn.com/149a15a7-10e7-421a-ae38-d7ff4df3f8de.png",lightLogoURL:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png"},gameUrl:"https://fantasy.espn.com/games/nfl-win-totals-2025",entryName:"Megan_Janssen2's Picks 1",challengeGroups:"",score:{eliminated:!1,overallScore:10,percentile:.73421348,rank:43043,record:{losses:2,wins:1}},scoreByGroup:"",scoringFormatId:1}},sortGlobal:1382,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"10:978432872:1:2025",createDate:1750808942792,lastUpdateDate:1753110440776,metaData:{entry:{entryId:10,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:7,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:978432872,groupSize:10,groupName:"San Francisco Gridiron Gauntlet League",groupManager:!1,draftDate:175080918e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=978432872&teamId=10",href:"https://fantasy.espn.com/football/league?leagueId=978432872&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/8.svg",restrictionType:5,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=978432872&teamId=10&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/978432872?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B10%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772770:1,401772771:1,401772944:1,401772630:1,401772773:2,401772875:2}},currentLineup:{"-16022":16,3050478:17,3116385:2,3915416:4,3916148:20,4241389:4,4361307:6,4361370:20,4428209:20,4429160:2,4431299:20,4431611:0,4567750:20,4568490:23,4569173:20,4882093:20},restrictionTypeName:"GAUNTLET"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:1398,isHidden:!0,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"9:2118520298:1:2025",createDate:1753457483090,lastUpdateDate:1753459839424,metaData:{entry:{entryId:9,entryMetadata:{teamName:"Megan's Monstrous Team",teamAbbrev:"MMT",leagueFormatTypeId:3,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:2118520298,groupSize:10,groupName:"Detroit Beginner H2H Points PPR League",groupManager:!1,draftDate:175345788e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=2118520298&teamId=9",href:"https://fantasy.espn.com/football/league?leagueId=2118520298&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/4.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=2118520298&teamId=9&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/2118520298?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B9%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772769:1,401772772:1,401772773:1,401772875:1,401772927:1,401772879:2,401772876:1}},currentLineup:{"-16016":16,16800:4,2977187:23,3052587:0,3123076:6,3925357:20,4360516:20,4360569:20,4362081:17,4362249:20,4429013:20,4429160:2,4429615:20,4430737:2,4569618:20,4595348:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:1402,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1028491758:5:2025",createDate:1747420135832,lastUpdateDate:1757663182317,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan Team 1",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=1",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StarWarsTheRiseOfSkywalker/rise-skywalker-r2d2.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{869:4,2529140:4,2529205:6,2998938:1,3058895:6,3058901:5,3146151:6,4432831:4,4433403:1},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1383,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"4:1028491758:5:2025",createDate:1747420173876,lastUpdateDate:1757663182341,metaData:{entry:{entryId:4,entryMetadata:{teamName:"Megan Team 4",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=4",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/fba/Jerseys-ESPN/fba-jerseys-31.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=4&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B4%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{2529130:6,2998928:4,3065570:1,3913881:6,4066533:1,4398674:5,4420318:4,4433402:4,4433630:6},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1384,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"3:1028491758:5:2025",createDate:1747420178168,lastUpdateDate:1757663182333,metaData:{entry:{entryId:3,entryMetadata:{teamName:"Megan Team 3",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=3",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/DIS_Avengers_EndGame/DIS_Avengers_EndGame_Rocket.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=3&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B3%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{1068:4,2529137:6,2987869:1,2987891:6,3904577:1,3913903:6,3917450:4,4281929:4,4433730:5},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1385,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:1028491758:5:2025",createDate:1747420181784,lastUpdateDate:1757663182325,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan Team 2",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=2",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StarsAndFlames/stars_flames-4.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=2&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{2490553:6,2491205:1,2566106:4,2988756:6,2999101:4,3142191:5,3149391:4,3904576:6,4065870:1},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1386,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"c71ef020-3681-11f0-9846-8ffc028f9549",createDate:1762778889707,metaData:{entry:{entryUuid:"c71ef020-3681-11f0-9846-8ffc028f9549",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 3",challengeGroups:[{groupSettings:{name:"Disney Only"}},{groupSettings:{name:"FIRE Core Team"}}],score:{eliminated:!0,overallScore:3,percentile:.63478545,rank:399442,record:{losses:1,wins:3}},scoreByGroup:{"4ff5631f-66c8-42a5-8ad9-1c3fc2eadd53":{eliminated:!0,overallScore:3,percentile:.63478545,rank:2,record:{losses:1,wins:3}},"7d4a3167-0f7f-3aa5-a193-10f5a79f89e0":{eliminated:!0,overallScore:3,percentile:.63478545,rank:19,record:{losses:1,wins:3}}},scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"c349a530-3681-11f0-bebc-3118dc9a49b7",createDate:1762778889707,metaData:{entry:{entryUuid:"c349a530-3681-11f0-bebc-3118dc9a49b7",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 2",challengeGroups:"",score:{eliminated:!0,overallScore:0,percentile:0,rank:897095,record:{losses:1,wins:0}},scoreByGroup:"",scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"90930280-3681-11f0-b2f3-0fd5099dfb7c",createDate:1762778889707,metaData:{entry:{entryUuid:"90930280-3681-11f0-b2f3-0fd5099dfb7c",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Confidence",challengeGroups:[{groupSettings:{name:"TMG - Season 6"}},{groupSettings:{name:"Disney Only (Confidence)"}},{groupSettings:{name:"Card Club - Pigskin"}}],score:{eliminated:!1,overallScore:783,percentile:.75568775,rank:27846,record:{losses:56,wins:90}},scoreByGroup:{"05b8d8ef-7176-3845-bade-4f8c2479afe7":{eliminated:!1,overallScore:748,percentile:.75568775,rank:12,record:{losses:48,wins:84}},"836c455b-5a75-3531-929f-fdcd7f714c9c":{eliminated:!1,overallScore:748,percentile:.75568775,rank:8,record:{losses:48,wins:84}},"54a6fab7-58b3-3495-91a4-3c11bb601a1c":{eliminated:!1,overallScore:783,percentile:.75568775,rank:78,record:{losses:56,wins:90}}},scoringFormatId:2}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"a33424f0-3681-11f0-b2f3-0fd5099dfb7c",createDate:1762778889707,metaData:{entry:{entryUuid:"a33424f0-3681-11f0-b2f3-0fd5099dfb7c",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Spread",challengeGroups:[{groupSettings:{name:"Disney Only (Spread)"}}],score:{eliminated:!1,overallScore:670,percentile:.64634846,rank:81970,record:{losses:71,wins:67}},scoreByGroup:{"f33eee68-29ff-3c16-bd20-31b9952753dd":{eliminated:!1,overallScore:670,percentile:.64634846,rank:118,record:{losses:71,wins:67}}},scoringFormatId:3}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"bdae4040-3681-11f0-9b45-3fc452c57dcd",createDate:1762778889707,metaData:{entry:{entryUuid:"bdae4040-3681-11f0-9b45-3fc452c57dcd",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 1",challengeGroups:[{groupSettings:{name:"Locks Only Survivor Pool- SZN 4"}}],score:{eliminated:!0,overallScore:2,percentile:.50711336,rank:539079,record:{losses:1,wins:2}},scoreByGroup:{"a00db401-c3ce-4729-8c0c-38c6aabae4a7":{eliminated:!0,overallScore:2,percentile:.50711336,rank:15,record:{losses:1,wins:2}}},scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"36343e50-365c-11f0-a8c2-3b962bf01277",createDate:1762778889707,metaData:{entry:{entryUuid:"36343e50-365c-11f0-a8c2-3b962bf01277",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Straight Up",challengeGroups:[{groupSettings:{name:"Disney Only (Standard)"}},{groupSettings:{name:"DEE Product and Technology Group"}},{groupSettings:{name:"ESPN Fantasy Group"}},{groupSettings:{name:"Product & Tech Group"}}],score:{eliminated:!1,overallScore:810,percentile:.67573397,rank:452404,record:{losses:56,wins:81}},scoreByGroup:{"d0731075-2901-4564-8aa8-02dd38c9c26b":{eliminated:!1,overallScore:810,percentile:.67573397,rank:8,record:{losses:56,wins:81}},"7bf7b02f-b9b1-40b6-8270-9d4a3b0ff222":{eliminated:!1,overallScore:810,percentile:.67573397,rank:207,record:{losses:56,wins:81}},"dad5e750-a47f-4527-90cb-1aca05a2bbe3":{eliminated:!1,overallScore:810,percentile:.67573397,rank:3,record:{losses:56,wins:81}},"96f8471c-d4e7-3ca8-b86e-2b012f127f39":{eliminated:!1,overallScore:810,percentile:.67573397,rank:379,record:{losses:56,wins:81}}},scoringFormatId:1}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"7:735183173:3:2026",createDate:1749773645351,lastUpdateDate:1749828448313,metaData:{entry:{entryId:7,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:3,groups:[{groupId:735183173,groupSize:10,groupName:"Philadelphia Pro H2H Points League",groupManager:!1,draftDate:174982758e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/basketball/fantasycast?leagueId=735183173&teamId=7",href:"https://fantasy.espn.com/basketball/league?leagueId=735183173&seasonId=2026",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fba/images/default_logos/14.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/basketball/team?leagueId=735183173&teamId=7&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fba/seasons/2026/segments/0/leagues/735183173?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B7%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FBA",name:"Fantasy Basketball 2026",description:"Fantasy Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/basketball/welcome",href:"https://www.espn.com/fantasy/basketball/",lineup:{proGameToNumPlayersStarting:{401810053:2,401810058:1,401810057:1,401810061:1}},currentLineup:{3202:3,3448:12,4251:11,6583:4,3136195:11,3908845:6,3934719:12,4279888:0,4395630:1,4432816:5,4433247:12,4433255:11,4433287:2},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:21},contentSourceId:10,sortGlobal:1390,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:424310183:3:2026",createDate:1749773698015,lastUpdateDate:1749829617368,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:3,groups:[{groupId:424310183,groupSize:10,groupName:"Memphis Pro H2H Points League",groupManager:!1,draftDate:174982848e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/basketball/fantasycast?leagueId=424310183&teamId=2",href:"https://fantasy.espn.com/basketball/league?leagueId=424310183&seasonId=2026",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fba/images/default_logos/1.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/basketball/team?leagueId=424310183&teamId=2&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fba/seasons/2026/segments/0/leagues/424310183?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FBA",name:"Fantasy Basketball 2026",description:"Fantasy Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/basketball/welcome",href:"https://www.espn.com/fantasy/basketball/",lineup:{proGameToNumPlayersStarting:{401810055:1,401810054:1,401810053:1,401810059:2,401810058:2}},currentLineup:{3468:0,6580:12,6583:4,3032977:3,3062679:2,3134908:11,3907497:5,3907822:12,4066383:11,4277956:1,4433621:11,4566434:6,4594327:12},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:21},contentSourceId:10,sortGlobal:1391,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1315471242:2:2025",createDate:1753897316090,lastUpdateDate:1759136303110,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1315471242,groupSize:10,groupName:"Maestro H2H Points",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1315471242&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1315471242&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1315471242&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1315471242?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{29155:13,30193:1,32129:4,32685:13,33148:13,33783:2,33837:13,33859:3,33950:13,35983:5,36581:13,39825:16,41405:13,42179:5,42598:0,4433874:16,4719337:5,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1403,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1689844356:2:2025",createDate:1753897335814,lastUpdateDate:1759136303136,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:1,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:0,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"ROTO",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1689844356,groupSize:10,groupName:"Maestro Roto",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1689844356&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1689844356&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1689844356&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1689844356?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,32129:4,32685:13,32796:13,33192:5,33837:13,33859:3,35002:12,36581:13,38309:0,39825:13,39832:16,40939:13,41610:5,41773:2,42403:16,42404:5,4109109:16,4719507:13},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1404,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:531018984:2:2025",createDate:1753897355273,lastUpdateDate:1759136303102,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:2,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_CATEGORY",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:531018984,groupSize:10,groupName:"Maestro H2H Each Category",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=531018984&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=531018984&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=531018984&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/531018984?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,30951:16,31127:16,32129:4,32685:13,32796:13,33837:13,33859:3,35394:13,35983:5,36581:13,36969:5,39825:13,39895:16,41610:5,41773:2,4717803:13,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1405,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1229401832:2:2025",createDate:1753897386460,lastUpdateDate:1759136303122,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:4,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:3,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_MOST_CATEGORIES",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1229401832,groupSize:10,groupName:"Maestro H2H Most Categories",groupManager:!0,draftDate:null,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1229401832&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1229401832&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1229401832&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1229401832?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,30951:16,31662:2,32129:4,32685:13,33837:13,33859:3,35983:5,36020:5,36581:13,39825:13,39832:13,39895:0,40939:13,4148749:16,4297835:16,4719337:5,4719507:13,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1406,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:420732386:2:2025",createDate:1753897407707,lastUpdateDate:1759136303134,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:5,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:4,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"TOTAL_SEASON_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:420732386,groupSize:10,groupName:"Maestro Season Points",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=420732386&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=420732386&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=420732386&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/420732386?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,31097:3,31267:13,32129:4,32512:2,32685:13,32796:13,33192:5,33837:13,36020:5,36581:13,38309:0,39825:13,39832:13,40939:16,42404:5,4719507:16,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1407,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:2046593148:2:2025",createDate:1755632123412,lastUpdateDate:1755831600704,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:2046593148,groupSize:4,groupName:"Undrafted; Scheduled",groupManager:!0,draftDate:null,draftType:4,draftStatus:1,leagueStatus:1,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=2046593148&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=2046593148&seasonId=2025",draftTypeName:"Salary Cap"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StadiumFoods-ESPN/stadium-foods_soft-pretzel.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=2046593148&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/2046593148?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1410,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:283659657:4:2026",createDate:1759161335134,lastUpdateDate:1759415709010,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:1,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:0,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"ROTO",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:4,groups:[{groupId:283659657,groupSize:6,groupName:"Roto Test League",groupManager:!1,draftDate:1,draftType:2,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/hockey/fantasycast?leagueId=283659657&teamId=2",href:"https://fantasy.espn.com/hockey/league?leagueId=283659657&seasonId=2026",draftTypeName:"Autopick"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fhl/images/default_logos/6.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/hockey/team?leagueId=283659657&teamId=2&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fhl/seasons/2026/segments/0/leagues/283659657?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FHL",name:"Fantasy Hockey 2026",description:"Fantasy Hockey",logoURL:"https://g.espncdn.com/s/fhllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/hockey/welcome",href:"https://www.espn.com/fantasy/hockey/",lineup:{proGameToNumPlayersStarting:{401802606:1,401802605:1,401802604:2}},currentLineup:{3101:3,5037:3,5349:3,2590852:3,2967072:7,3020225:5,3069341:4,3527554:7,3899937:3,3899972:4,3904177:7,3988803:4,4196914:5,4233594:3,4233875:3,4697386:4,4697397:3,4697449:4,4874740:7,5080145:7,5149170:6,5206628:3},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:35},contentSourceId:10,sortGlobal:1411,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0}],fantasyData:{totalFantasyLeagues:23,leaguesBySportLeague:{NFL:8,MLB:8,NBA:2,NHL:1,WNBA:4},totalChallengeEntries:7,challengeInformation:[{id:263,gameType:"PICKEM",challengeName:"Pigskin Win Totals",challengeAbbrev:"Pigskin Win Totals",scoringFormatIds:[1],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/149a15a7-10e7-421a-ae38-d7ff4df3f8de.png",logoDark:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png",logo1x1:"https://chui-assets-cdn.espn.com/10dfa661-6adc-41c2-b391-9ae64baf1b50.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/10dfa661-6adc-41c2-b391-9ae64baf1b50.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:1},{id:264,gameType:"CONTESTANT_POOL",challengeName:"Eliminator Challenge 2025",challengeAbbrev:"Eliminator Challenge",scoringFormatIds:[4],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",logoDark:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png",logo1x1:"https://chui-assets-cdn.espn.com/28fdbb06-fff0-45f4-a1fe-d09c1393302a.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/28fdbb06-fff0-45f4-a1fe-d09c1393302a.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:3},{id:265,gameType:"PICKEM",challengeName:"Pigskin Pick'em 2025",challengeAbbrev:"Pigskin Pick'em",scoringFormatIds:[1,3,2],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",logoDark:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png",logo1x1:"https://chui-assets-cdn.espn.com/e06aca34-f148-4f1e-87e0-4c1d7492cc42.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/e06aca34-f148-4f1e-87e0-4c1d7492cc42.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:3},{id:266,gameType:"PICKEM",challengeName:"College Pick'em 2025",challengeAbbrev:"College Pick'em",scoringFormatIds:[1,3,2],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/056a9567-dae4-4185-b4d6-a723df87f988.png",logoDark:"https://chui-assets-cdn.espn.com/780faa3b-eda2-4b06-a276-b218c586901c.png",logo1x1:"https://chui-assets-cdn.espn.com/c7f88874-19f6-4352-a54b-60f7d94bed2f.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/c7f88874-19f6-4352-a54b-60f7d94bed2f.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0},{id:269,gameType:"BRACKET",challengeName:"CFP Bracket Challenge",challengeAbbrev:"CFP Bracket Challenge",scoringFormatIds:[5],state:"LANDER",logoUrls:{logo:"https://chui-assets-cdn.espn.com/2fb0bf85-e01c-40a9-88b1-3421d30fe3b2.png",logoDark:"https://chui-assets-cdn.espn.com/09fec69d-94e1-4c8f-9bb4-0610009999dd.png",logo1x1:"https://chui-assets-cdn.espn.com/40159d72-8861-450f-926a-a493947b47b1.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/40159d72-8861-450f-926a-a493947b47b1.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0},{id:270,gameType:"PICKEM",challengeName:"Capital One Bowl Mania 2025",challengeAbbrev:"Capital One Bowl Mania",scoringFormatIds:[1,3,2],state:"LANDER",logoUrls:{logo:"https://chui-assets-cdn.espn.com/3862fdaa-aad9-417b-a471-7041697a1c7d.png",logoDark:"https://chui-assets-cdn.espn.com/3862fdaa-aad9-417b-a471-7041697a1c7d.png",logo1x1:"https://chui-assets-cdn.espn.com/a7cd3fde-d093-4375-917a-f983291d2481.jpeg",logo1x1Dark:"https://chui-assets-cdn.espn.com/a7cd3fde-d093-4375-917a-f983291d2481.jpeg"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0}],challengeScoreboardEnabled:!0,leagueScoreboardEnabled:{1:!0,2:!0,3:!0,4:!0,5:!0}}};function Bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var St=class{constructor(t,e,n,i={}){Bt(this,"fantasyItems",new _.a([])),Bt(this,"isDataLoading",new _.a(!1)),Bt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),Bt(this,"isLoadingTc",new _.a(!1)),Bt(this,"eventId",void 0),Bt(this,"delegate",void 0),Bt(this,"analyticsService",void 0),Bt(this,"fantasyService",void 0),Bt(this,"fantasyPolling",void 0),Bt(this,"leagueManagerPolling",void 0),Bt(this,"tournamentPolling",void 0),Bt(this,"errorState",new _.a("none")),Bt(this,"leagueSortOrder",new Map),Bt(this,"itemToLeagueKey",new Map),Bt(this,"useMockData",!1),Bt(this,"_promoData",null),Bt(this,"_fantasyLeagues",[]),Bt(this,"_tournamentChallenges",[]),Bt(this,"_promoItem",null),Bt(this,"_tcProcessingCount",0),this.useMockData=i.useMockData||!1,this.eventId=t,this.delegate=e,this.analyticsService=n,this.fantasyService=new gt,this.fantasyPolling=new yt(this.fantasyService),this.leagueManagerPolling=new Et(this.fantasyService),this.tournamentPolling=new Ct(this.fantasyService)}async init(){this.trackPanelView(),await this.fetchData()}handleFetchError(t,e="fetchData"){const n=e.startsWith("FantasyViewModel.")?e.slice("FantasyViewModel.".length):e;Object(p.a)("FantasyViewModel",n,t),this.isDataLoading.value=!1,this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure")}async fetchData(){try{this.isDataLoading.value=!0;if(!await this.delegate.userIsAuthenticated())return this.isDataLoading.value=!1,void this.append({id:"not-logged-in",type:"notLoggedIn"});this.fantasyItems.value.find(t=>"notLoggedIn"===t.type)&&(this.fantasyItems.value=[]);const t=await this.delegate.getUserSWID()||"",e=await this.delegate.getUserToken()||"";if(this.useMockData)return void await this.fetchMockData();await this.fantasyPolling.refresh({eventId:this.eventId,swid:t,jwt:e},this.processFantasy.bind(this),this.handleFetchError.bind(this))}catch(t){this.handleFetchError(t)}}onEngage(t){this.analyticsService.panelClick({type:"espnFantasy",name:"fantasy_item_clicked",metadata:{card:t}})}onAskLogin(){this.fantasyItems.value=[],this.delegate.onPanelEvent({type:"fantasy:request:login",payload:{onLoginSuccess:async()=>{await this.fetchData()}}})}cleanup(){this.fantasyPolling.stop(),this.fantasyPolling.removeLastResponseHash(),this.leagueManagerPolling.stopAll(),this.tournamentPolling.stopAll(),this.leagueSortOrder.clear(),this.itemToLeagueKey.clear(),this._fantasyLeagues=[],this._tournamentChallenges=[],this._promoItem=null,this._tcProcessingCount=0,this.isLoadingTc.value=!1,this.fantasyItems.value=[],this.hasEverSuccessfullyLoaded.value=!1}async trackPanelView(){try{await this.analyticsService.panelView("espnFantasy")}catch(t){Object(p.a)("FantasyViewModel","trackPanelView",t)}}getHidePickemsAndChallenges(){return!0===ge.getMaestroEventViewModel().getFeatureFlag({panelType:"espnFantasy",featureFlag:"hide_pickems"})}async processFantasy(t){try{const a=await this.delegate.getUserToken()||"";this.leagueManagerPolling.stopAll(),this.tournamentPolling.stopAll(),this._tcProcessingCount=0,this.isLoadingTc.value=!1;const o=this.getHidePickemsAndChallenges();this.leagueSortOrder.clear(),this.itemToLeagueKey.clear(),this._fantasyLeagues=[],this._tournamentChallenges=[];const l=new Set,c=t.preferences||[],u=c.some(t=>14===t.typeId),h=c.some(t=>14!==t.typeId);if(!c.length||u&&o&&!h){const t=await this.getPromoData();t&&(this._promoItem={id:"promo",type:"promo",background:t.fantasy.promotion.background,description:t.fantasy.promotion.description,logo:t.fantasy.promotion.logo,qrCode:t.fantasy.promotion.qrCode,title:t.fantasy.promotion.title})}for(let t=0;t<c.length;t++){var e,n,i,r,s;const u=c[t],h=(null===(e=u.metaData)||void 0===e?void 0:e.entry)||{},d=h.abbrev,f=h.seasonId,_=null===(n=h.groups)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.groupId,p=null===(r=h.groups)||void 0===r||null===(s=r[0])||void 0===s?void 0:s.draftDate;if(14===u.typeId&&!o&&u.id&&h.challengeId&&!l.has(u.id)){l.add(u.id),this._tcProcessingCount++;const t="tc-"+h.challengeId;this.tournamentPolling.refresh(t,{challengeId:String(h.challengeId),competitionId:this.eventId,token:a},t=>{this.parseTournamentChallenge(t),this._tcProcessingCount--,0===this._tcProcessingCount&&(this.isLoadingTc.value=!1,this.rebuildFantasyItems())},t=>{this.handleFetchError(t,"FantasyViewModel.processFantasy.tournamentChallenge"),this._tcProcessingCount--,0===this._tcProcessingCount&&(this.isLoadingTc.value=!1,this.rebuildFantasyItems())})}else{if(!(d&&f&&_&&h.entryId))continue;const e=`${d}-${_}-${f}`;this.leagueSortOrder.set(e,t),this.leagueManagerPolling.refresh(e,{game:d,leagueId:_,seasonId:f,token:a,proGameId:this.eventId,teamId:h.entryId},t=>{var n,i,r;if(!1===(null===(n=h.entryMetadata)||void 0===n?void 0:n.draftComplete))this.append(this.parseInactiveLeague(t,p),e);else if(void 0!==(null===(i=t.matchups)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.home)){const n=this.parseHeadToHead(t,u);if(n)for(const t of n)this.append(t,e)}else if(At(t)){const n=this.parseRoto(t,u);if(n)for(const t of n)this.append(t,e)}},t=>{this.handleFetchError(t,"FantasyViewModel.processFantasy.leagueManager")})}}this.isLoadingTc.value=this._tcProcessingCount>0,this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.isDataLoading.value=!1,this.rebuildFantasyItems()}catch(t){this.handleFetchError(t,"FantasyViewModel.processFantasy")}}parseRoto(t,e){var n;if(!(null!==(n=t.matchups)&&void 0!==n&&n.length&&t.leagueName&&t.scoringType&&t.gameId))return null;const i=[];for(const n of t.matchups){var r;if(null===(r=n.teams)||void 0===r||!r.length)continue;const a=n.teams[0];if(!a.logo||!t.sportLogo||!t.sportColor||void 0===a.points)continue;const o=a.roster||[],l=[],c=[];for(const t of o){var s;t.player&&(t.player.abbrevName&&t.player.headshot&&null!==(s=t.player.proTeam)&&void 0!==s&&s.triCode&&t.slot&&(l.push({athleteHeadshot:t.player.headshot,athleteAbbrevName:t.player.abbrevName,athletesSlot:t.slot,teamTriCode:t.player.proTeam.triCode,proGameStatusLines:t.player.proGameStatusLines||[]}),t.player.currentlyWatching&&void 0!==t.player.points&&c.push({abbrevName:t.player.abbrevName,points:t.player.points+" FPTS"})))}i.push({id:Object(L.b)(JSON.stringify(e)).toString(),type:"matchup-single",topPlayers:this.parseTopPlayers(t.topPlayers||[]),league:{color:t.sportColor,logo:t.sportLogo,subtitle:t.name,title:t.leagueName},team:{logo:a.logo,scoringType:t.scoringType.includes("SEASON")?"SEASON":t.scoringType,points:a.points},roster:l,activeAthletes:c})}return i}append(t,e){if(!t)return;if("notLoggedIn"===t.type)return void(this.fantasyItems.value=[t]);if("promo"===t.type&&(this._promoItem=t),e&&this.itemToLeagueKey.set(t.id,e),"matchup-pair"===t.type||"matchup-single"===t.type||"inactiveLeague"===t.type){const e=this._fantasyLeagues.findIndex(e=>e.id===t.id);-1!==e?this._fantasyLeagues[e]=t:this._fantasyLeagues.push(t),this._fantasyLeagues.sort((t,e)=>{var n,i;const r=this.itemToLeagueKey.get(t.id),s=this.itemToLeagueKey.get(e.id);return(void 0!==r&&null!==(n=this.leagueSortOrder.get(r))&&void 0!==n?n:Number.MAX_SAFE_INTEGER)-(void 0!==s&&null!==(i=this.leagueSortOrder.get(s))&&void 0!==i?i:Number.MAX_SAFE_INTEGER)})}const n=this._tournamentChallenges.findIndex(t=>t.id===e);if("fantasy-header"===t.type)-1!==n?this._tournamentChallenges[n].header=t:e&&this._tournamentChallenges.push({type:"fantasy-group",id:e,header:t,items:[]});else if("tournament-bracket-card"===t.type||"tournament-overflow-qr"===t.type)if(-1!==n){const e=this._tournamentChallenges[n],i=e.items.findIndex(e=>e.id===t.id);-1!==i?e.items[i]=t:e.items.push(t)}else e&&this._tournamentChallenges.push({type:"fantasy-group",id:e,header:{type:"fantasy-header",id:e+"-header",title:""},items:[t]});this.rebuildFantasyItems()}rebuildFantasyItems(){const t=[];this._tournamentChallenges.length>0&&t.push(...this._tournamentChallenges),this._fantasyLeagues.length>0&&t.push({type:"fantasy-group",id:"header-fantasy-leagues-group",header:{type:"fantasy-header",id:"header-fantasy-leagues",title:"Fantasy Leagues"},items:this._fantasyLeagues}),this._promoItem&&0===this._tournamentChallenges.length&&0===this._fantasyLeagues.length&&0===t.length&&!this.isLoadingTc.value&&t.push(this._promoItem),this.fantasyItems.value=t}parseHeadToHead(t,e){var n;if(!(null!==(n=t.matchups)&&void 0!==n&&n.length&&t.leagueName&&t.sportColor&&t.sportLogo&&t.gameId))return null;const i=[];for(const n of t.matchups){var r,s;if(!n.home||!n.away)continue;const h=[],d=[],f=n.home.roster||[],_=n.away.roster||[];for(let t=0;t<_.length;t++){var a,o,l,c,u;const e=_[t],i=f[t];e.player&&i.player&&(e.player.abbrevName&&e.player.headshot&&e.slot&&null!==(a=e.player.proTeam)&&void 0!==a&&a.triCode&&null!==(o=n.away)&&void 0!==o&&o.record&&i.player.abbrevName&&i.player.headshot&&i.slot&&null!==(l=i.player.proTeam)&&void 0!==l&&l.triCode&&null!==(c=n.home)&&void 0!==c&&c.record&&(h.push({away:{abbrevName:e.player.abbrevName,headshot:e.player.headshot,points:e.player.points,slot:e.slot,stats:e.player.proGameStatusLines||[],triCode:e.player.proTeam.triCode,projectedPoints:e.player.projectedPoints},home:{abbrevName:i.player.abbrevName,headshot:i.player.headshot,points:i.player.points,slot:i.slot,stats:i.player.proGameStatusLines||[],triCode:null===(u=i.player.proTeam)||void 0===u?void 0:u.triCode,projectedPoints:i.player.projectedPoints}}),i.player.currentlyWatching&&void 0!==i.player.points&&d.push({abbrevName:i.player.abbrevName,points:i.player.points+" FPTS"})))}i.push({id:Object(L.b)(JSON.stringify(e)).toString(),type:"matchup-pair",awayTeam:{logo:n.away.logo,name:n.away.name,points:"H2H_POINTS"===t.scoringType?String(n.away.points):n.away.score,projectedPoints:null!==(r=n.away.projectedPointsLive)&&void 0!==r?r:n.away.projectedPoints,record:n.away.record,winProbability:n.away.winProbability},homeTeam:{logo:n.home.logo,name:n.home.name,points:"H2H_POINTS"===t.scoringType?String(n.home.points):n.home.score,projectedPoints:null!==(s=n.home.projectedPointsLive)&&void 0!==s?s:n.home.projectedPoints,record:n.home.record,winProbability:n.home.winProbability},league:{color:t.sportColor,logo:t.sportLogo,subtitle:n.name,title:t.leagueName},roster:h,activeAthletes:d,topPlayers:this.parseTopPlayers(t.topPlayers||[])})}return i}parseTopPlayers(t){const e=[];for(const s of t){var n,i,r;if(!s.abbrevName||!s.headshot||null===(n=s.proTeam)||void 0===n||!n.triCode||void 0===s.points)continue;let t="";void 0!==s.percentRostered&&s.percentRostered>0&&null!==(i=s.playerStatus)&&void 0!==i&&i.startsWith("Rostered")&&(t=s.playerStatus),e.push({abbrevName:s.abbrevName,headshot:s.headshot,position:(null===(r=s.positions)||void 0===r?void 0:r.split(",")[0])||"",teamTriCode:s.proTeam.triCode,points:s.points,rosteredBy:t})}return e}parseInactiveLeague(t,e){if(!t.sportColor||!t.sportLogo||!t.leagueName)return null;let n=void 0;if(e){const t=new Date(Number(e));isNaN(t.getTime())||(n=t.getTime())}return{id:Object(L.a)(`${t.gameId}-inactive-${t.leagueName}`),leagueColor:t.sportColor,leagueLogo:t.sportLogo,leagueName:t.leagueName,type:"inactiveLeague",draftDate:n}}async getPromoData(){if(this._promoData)return this._promoData;try{return this._promoData=await this.fantasyService.getPromo(),this._promoData}catch(t){return Object(p.a)("FantasyViewModel","getPromoData",t),null}}async parseTournamentChallenge(t){var e;if(!t.id)return;const n=(null===(e=t.entries)||void 0===e?void 0:e.filter(t=>t.id))||[];if(0===n.length)return;const i={type:"fantasy-header",id:t.id+"-header",title:t.abbrev?"Your Top "+t.abbrev:"Tournament Challenge"};this.append(i,t.id);const r=this._tournamentChallenges.findIndex(e=>e.id===t.id);-1!==r&&(this._tournamentChallenges[r].items=[]);const s=n.length,a=n.slice(0,5);for(const e of a){var o,l;let n,i;const r=t.propositions||[];if(1===r.length&&e.picks){const t=r[0];if(t.competitionId&&String(t.competitionId)===this.eventId&&t.id&&t.outcomes){const r=e.picks.find(e=>e.propositionId===t.id);if(null!=r&&r.outcomeId){const e=t.outcomes.find(t=>t.id===r.outcomeId);null!=e&&e.name&&(n=e.name,i=e.primaryLogo)}}}const s={type:"tournament-bracket-card",id:e.id,name:e.name||"",rank:e.rank||0,score:e.score||0,percentile:Math.round(100*(e.percentile||0)),entryStatusIcon:e.entryStatusIcon||"",finalPick:e.finalPick?{propositionId:e.finalPick.propositionId,outcomeId:e.finalPick.outcomeId,primaryLogo:null===(o=e.finalPick.outcomePicked)||void 0===o?void 0:o.primaryLogo,secondaryLogo:null===(l=e.finalPick.outcomePicked)||void 0===l?void 0:l.secondaryLogo,result:e.finalPick.result}:{propositionId:"",outcomeId:""},isComplete:e.isComplete||!1,picks:e.picks,tournamentId:t.id,tournamentAbbrev:t.abbrev||"",tournamentLogo:t.logo||"",scoringPeriodLabel:t.scoringPeriodLabel||"",propositions:t.propositions,userPickName:n,userPickLogo:i,leagueColor:t.secondaryColor||"#000000"};this.append(s,t.id)}if(s>5&&"LIVE"===t.state){const e=await this.getPromoData(),n=!0===t.locked?"tc-live":"tc-pre",i=null==e?void 0:e[n];if(i){const e={type:"tournament-overflow-qr",id:t.id+"-overflow",background:i.promotion.background,logo:i.promotion.logo,qrCode:i.promotion.qrCode,title:i.promotion.title,description:i.promotion.description,tournamentId:t.id};this.append(e,t.id)}}}async fetchMockData(){this.hasEverSuccessfullyLoaded.value=!0,await this.processFantasy(xt),this.errorState.value="none",this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",setTimeout(()=>{this.fetchData()},100)}setDataToPanel(t){t.leagueManagerOverrideBaseUrl&&(this.fantasyService.leagueManagerOverrideBaseUrl=t.leagueManagerOverrideBaseUrl),t.fantasyOverrideBaseUrl&&(this.fantasyService.fantasyOverrideBaseUrl=t.fantasyOverrideBaseUrl),t.gambitOverrideBaseUrl&&(this.fantasyService.gambitOverrideBaseUrl=t.gambitOverrideBaseUrl)}};function Tt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jt=class{constructor(t){Tt(this,"networkManager",void 0),Tt(this,"eventId",void 0),this.eventId=t,this.networkManager=new T.b({externalBaseURL:"https://site.api.espn.com"})}pollShopData(t,e,n){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`/apis/site/v2/events/${this.eventId}/shop`,interval:t,method:T.a.GET,params:{deviceType:"ictv"},headers:{},onData:e,onError:n})}},qt=n(51);const Pt={shop:[{sections:[{title:"Chiefs Shop",items:[{type:"product",name:"Men's Kansas City Chiefs Patrick Mahomes Nike Red Game Player Jersey",image:{href:"https://fanatics.frgimages.com/kansas-city-chiefs/mens-kansas-city-chiefs-patrick-mahomes-nike-red-game-player-jersey_pi3453000_ff_3453170-8a4fb50f27b4aacd8c3b_full.jpg"},price:{displayRetail:"$119.99"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs-mahomes-jersey",link:{href:"https://fanatics.com/chiefs-mahomes-jersey",text:"Scan to shop"}}},{type:"product",name:"Kansas City Chiefs New Era 2024 AFC Conference Champions Locker Room 9FORTY Adjustable Hat - Red",image:{href:"https://fanatics.frgimages.com/kansas-city-chiefs/kansas-city-chiefs-new-era-2024-afc-conference-champions-locker-room-9forty-adjustable-hat-red_pi5595000_ff_5595784_full.jpg"},price:{displayRetail:"$34.99",displaySale:"$24.99"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs-hat",link:{href:"https://fanatics.com/chiefs-hat",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Chiefs merch",image:{href:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs",link:{href:"https://fanatics.com/chiefs",text:"Scan to browse all"}}}]},{title:"49ers Shop",items:[{type:"product",name:"Men's San Francisco 49ers Brock Purdy Nike Scarlet Game Player Jersey",image:{href:"https://fanatics.frgimages.com/san-francisco-49ers/mens-san-francisco-49ers-brock-purdy-nike-scarlet-game-player-jersey_pi5068000_ff_5068449_full.jpg"},price:{displayRetail:"$119.99"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers-purdy-jersey",link:{href:"https://fanatics.com/49ers-purdy-jersey",text:"Scan to shop"}}},{type:"product",name:"Men's San Francisco 49ers George Kittle Nike Scarlet Game Player Jersey",image:{href:"https://fanatics.frgimages.com/san-francisco-49ers/mens-san-francisco-49ers-george-kittle-nike-scarlet-game-player-jersey_pi4234000_ff_4234524_full.jpg"},price:{displayRetail:"$119.99",displayClearance:"$79.99"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers-kittle-jersey",link:{href:"https://fanatics.com/49ers-kittle-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all 49ers merch",image:{href:"https://a.espncdn.com/i/teamlogos/nfl/500/sf.png"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers",link:{href:"https://fanatics.com/49ers",text:"Scan to browse all"}}}]},{title:"NFL Shop",items:[{type:"product",name:"NFL Nike Official Authentic Game Football",image:{href:"https://fanatics.frgimages.com/nfl/nfl-nike-official-authentic-game-football_pi4759000_ff_4759291_full.jpg"},price:{displayRetail:"$99.99"},detail:{title:"NFL Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/nfl-football",link:{href:"https://fanatics.com/nfl-football",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all NFL merch",image:{href:"https://a.espncdn.com/i/teamlogos/leagues/500/nfl.png"},detail:{title:"NFL Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/nfl",link:{href:"https://fanatics.com/nfl",text:"Scan to browse all"}}}]}]}]},It={shop:[{sections:[{title:"Lakers Shop",items:[{type:"product",name:"Men's Los Angeles Lakers LeBron James Nike Purple Swingman Jersey - Icon Edition",image:{href:"https://fanatics.frgimages.com/los-angeles-lakers/mens-los-angeles-lakers-lebron-james-nike-purple-swingman-jersey-icon-edition_pi4548000_ff_4548764_full.jpg"},price:{displayRetail:"$129.99"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers-lebron-jersey",link:{href:"https://fanatics.com/lakers-lebron-jersey",text:"Scan to shop"}}},{type:"product",name:"Men's Los Angeles Lakers Anthony Davis Nike Gold Swingman Jersey - City Edition",image:{href:"https://fanatics.frgimages.com/los-angeles-lakers/mens-los-angeles-lakers-anthony-davis-nike-gold-swingman-jersey-city-edition_pi5129000_ff_5129446_full.jpg"},price:{displayRetail:"$129.99"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers-davis-jersey",link:{href:"https://fanatics.com/lakers-davis-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Lakers merch",image:{href:"https://a.espncdn.com/i/teamlogos/nba/500/lal.png"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers",link:{href:"https://fanatics.com/lakers",text:"Scan to browse all"}}}]}]}]},Nt={shop:[{sections:[{title:"Texas Football Shop",items:[{type:"product",name:"Texas Longhorns Champion University Tee - Burnt Orange",image:{href:"https://fanatics.frgimages.com/texas-longhorns/texas-longhorns-champion-university-tee-burnt-orange_pi4892000_ff_4892615_full.jpg"},price:{displayRetail:"$34.99"},detail:{title:"Texas Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-tee",link:{href:"https://fanatics.com/texas-tee",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Texas merch",image:{href:"https://a.espncdn.com/i/teamlogos/ncaa/500/251.png"},detail:{title:"Texas Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas",link:{href:"https://fanatics.com/texas",text:"Scan to browse all"}}}]},{title:"Texas A&M Shop",items:[{type:"product",name:"Texas A&M Aggies New Era Maroon 9FORTY Adjustable Hat",image:{href:"https://fanatics.frgimages.com/texas-am-aggies/texas-am-aggies-new-era-maroon-9forty-adjustable-hat_pi4156000_ff_4156429_full.jpg"},price:{displayRetail:"$29.99"},detail:{title:"Texas A&M Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-am-hat",link:{href:"https://fanatics.com/texas-am-hat",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Texas A&M merch",image:{href:"https://a.espncdn.com/i/teamlogos/ncaa/500/245.png"},detail:{title:"Texas A&M Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-am",link:{href:"https://fanatics.com/texas-am",text:"Scan to browse all"}}}]}]}]},zt={shop:[{sections:[],defaultItem:{detail:{disclaimer:"Visit shop.espn.com to explore more products and exclusive offers.",title:"Shop the ESPN Store",backgroundImage:"https://placedog.net/568x704"}}}]},Ot={shop:[{sections:[{title:"Team Shop",items:[{type:"product",name:"Premium Team Jersey - Official Merchandise",image:{href:"https://via.placeholder.com/400x400/0066cc/ffffff?text=Team+Jersey"},price:{displayRetail:"$89.99"},detail:{title:"Team Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/team-jersey",link:{href:"https://fanatics.com/team-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all team merch",image:{href:"https://via.placeholder.com/400x400/0066cc/ffffff?text=Team+Logo"},detail:{title:"Team Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/team",link:{href:"https://fanatics.com/team",text:"Scan to browse all"}}}]}]}]};function Rt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Dt{constructor(t){Rt(this,"polling",{interval:3e4,task:null,lastResponseHash:null}),Rt(this,"shopService",void 0),this.shopService=t}refresh(t,e){this.stop(),this.start(t,e)}stop(){this.polling.task&&(this.polling.task.stop(),this.polling.task=null)}removeLastResponseHash(){this.polling.lastResponseHash=null}start(t,e){try{this.polling.task=this.shopService.pollShopData(this.polling.interval,n=>{this.updateInterval(n.headers,t,e),this.processPolledData(n.data,t)},t=>this.handlePollingError(t,e))}catch(t){Object(p.a)("ShopPolling","pollShop",t),null==e||e()}}updateInterval(t,e,n){const i=this.getResponseHeaderPollingIntervalValue(t);i&&i!==this.polling.interval&&(console.log(`[SHOP] Updating shop polling interval from ${this.polling.interval}ms to ${i}ms`),this.polling.interval=i,this.refresh(e,n))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[SHOP] Invalid polling interval header received: ${e}.`),null):1e3*n}processPolledData(t,e){const n=Object(L.b)(JSON.stringify(t));this.polling.lastResponseHash!==n?(this.polling.lastResponseHash=n,e(t)):console.log("[SHOP] Shop Response hash is the same as last successful response - skipping update")}handlePollingError(t,e){Object(p.a)("ShopPolling","handlePollingError",t),null==e||e()}}function Mt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Lt extends m.a{constructor(t,e,n={}){super(),Mt(this,"sections",new _.a([])),Mt(this,"isDataLoading",new _.a(!0)),Mt(this,"errorState",new _.a("none")),Mt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),Mt(this,"promoData",new _.a(null)),Mt(this,"shopService",void 0),Mt(this,"analyticsService",void 0),Mt(this,"shopPolling",void 0),Mt(this,"useMockData",!1),Mt(this,"mockDataType","nfl"),Mt(this,"initialized",!1),this.shopService=new jt(t),this.analyticsService=e,this.shopPolling=new Dt(this.shopService),this.useMockData=n.useMockData||!1,this.mockDataType=n.mockDataType||"nfl"}init(){this.trackPanelView(),this.fetchNewData(),this.initialized=!0}cleanup(){this.shopPolling.stop(),this.initialized=!1}async trackPanelView(){try{var t;const e=(null===(t=ge.getMaestroEventViewModel().statsViewModel)||void 0===t?void 0:t.currentGameState.value)||"unknown";await this.analyticsService.panelView("espnShop",{game_state:[e]})}catch(t){Object(p.a)("ShopViewModel","trackPanelView",t)}}parsePriceToNumber(t){const e=t.replace(/[^0-9.,]/g,""),n=e.lastIndexOf(","),i=e.lastIndexOf(".");let r;return r=n>i?e.replace(/\./g,"").replace(",","."):i>n?e.replace(/,/g,""):-1!==n?e.replace(",","."):e,Number(r)||0}async trackItemClick(t,e,n){try{var i,r,s,a;let h=0,d=null;const f=(null===(i=ge.getMaestroEventViewModel().statsViewModel)||void 0===i?void 0:i.currentGameState.value)||"unknown";if(e&&Object(qt.a)(e)){var o,l,c,u;const t=null===(o=e.price)||void 0===o?void 0:o.displayRetail,n=(null===(l=e.price)||void 0===l?void 0:l.displayClearance)||(null===(c=e.price)||void 0===c?void 0:c.displaySale)||(null===(u=e.price)||void 0===u?void 0:u.displayRetail);if(n&&t){const e=this.parsePriceToNumber(t),i=this.parsePriceToNumber(n);h=e>0?Math.round(100*(1-i/e)):0,d=n}}await this.analyticsService.panelClick({type:"espnShop",name:"shop_item_clicked",metadata:{card:[t],game_state:[f],product:(null==n||null===(r=n.product)||void 0===r?void 0:r.id)||null,entity_type:[(null==n||null===(s=n.product)||void 0===s?void 0:s.type)||"unknown"],entity_name:[(null==n||null===(a=n.product)||void 0===a?void 0:a.shortDisplayName)||"unknown"],price:d,sale:[h+"%"]}})}catch(t){Object(p.a)("ShopViewModel","trackItemClick",t)}}refreshPolling(){try{if(this.useMockData)return;this.shopPolling.refresh(this.processShopData.bind(this),this.setTabLoadFailure.bind(this))}catch(t){Object(p.a)("ShopViewModel","refreshPolling",t),this.setTabLoadFailure()}}processShopData(t){try{var e;const n=null===(e=t.shop)||void 0===e?void 0:e[0],i=(null==n?void 0:n.sections)||[];if((null==i||!i.length)&&null!=n&&n.defaultItem)return this.errorState.value="emptyShop",this.sections.value=[],void(this.promoData.value=n.defaultItem);this.sections.value=i,this.errorState.value="none",this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value&&(this.isDataLoading.value=!1)}catch(t){Object(p.a)("ShopViewModel","processShopData",t),this.setTabLoadFailure()}}setTabLoadFailure(){this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.sections.value=[]),this.isDataLoading.value&&(this.isDataLoading.value=!1)}fetchNewData(){this.isDataLoading.value=!0;try{if(this.useMockData)return this.sections.value=[],void this.fetchMockData();this.refreshPolling()}catch(t){Object(p.a)("ShopViewModel","fetchNewData",t),this.setTabLoadFailure()}}fetchMockData(){let t;switch(this.mockDataType){case"nba":t=It;break;case"ncf":t=Nt;break;case"empty":t=zt;break;case"single":t=Ot;break;case"nfl":default:t=Pt}this.processShopData(t),this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",this.shopPolling.removeLastResponseHash(),setTimeout(()=>{this.refreshPolling()},100)}}var Ft=Lt,Ut=n(57),Vt=n(202);function Wt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ht extends m.a{constructor(t,e){super(),Wt(this,"streamState",new _.a(null)),Wt(this,"lastStreamStateHash",0),Wt(this,"directorState",new _.a(null)),Wt(this,"lastDirectorStateHash",0),Wt(this,"session",null),Wt(this,"analyticsService",void 0),Wt(this,"delegate",void 0),this.delegate=t,this.analyticsService=e}init(){this.analyticsService.panelView("multiviewPanel").catch(t=>{Object(p.a)("MultiviewViewModel","init.panelView",t)})}setDataToPanel(t){if(!this.session&&(t=>"string"==typeof t.apiKey&&t.apiKey.length>0&&"string"==typeof t.eventId&&t.eventId.length>0)(t))try{this.session=Object(Vt.createMultiViewSession)(t.apiKey,t.eventId),this.session.subscribeStream(t=>{const e=Object(L.b)(JSON.stringify(t));e!==this.lastStreamStateHash&&(this.lastStreamStateHash=e,this.streamState.value=t,this.delegate.onPanelEvent({type:"multiviewPanel:stream-state-changed",payload:t}))}),this.session.subscribeDirector(t=>{const e=Object(L.b)(JSON.stringify(t));e!==this.lastDirectorStateHash&&(this.lastDirectorStateHash=e,this.directorState.value=t,this.delegate.onPanelEvent({type:"multiviewPanel:director-state-changed",payload:t}))}),this.session.connect()}catch(t){const e=t instanceof Error?t.message:"Failed to initialize MultiView session";Object(p.a)("MultiviewViewModel","setDataToPanel",t),this.setError(e)}}toggleSource(t){var e;null===(e=this.session)||void 0===e||e.toggleSource(t)}selectLayout(t){var e;null===(e=this.session)||void 0===e||e.selectLayout(t)}retryDirector(){var t;null===(t=this.session)||void 0===t||t.retryDirector()}getTrackReference(t){var e,n;return null!==(e=null===(n=this.session)||void 0===n?void 0:n.getTrackReference(t))&&void 0!==e?e:null}cleanup(){var t;null===(t=this.session)||void 0===t||t.close(),this.session=null,this.streamState.value=null,this.directorState.value=null,this.setError(null)}}function $t(t,e){const n=t=>String(t).trim().split(".").map(t=>{const e=parseInt(t,10);return Number.isFinite(e)?e:0}),i=n(t),r=n(e),s=Math.max(i.length,r.length);for(let t=0;t<s;t++){var a,o;const e=null!==(a=i[t])&&void 0!==a?a:0,n=null!==(o=r[t])&&void 0!==o?o:0;if(e!==n)return e<n?-1:1}return 0}var Yt=n(29),Gt=n(203),Kt=n(41);function Xt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Jt extends m.a{constructor(t,e){super(),this.analyticsService=t,this.delegate=e,Xt(this,"handle",null),Xt(this,"overlayData",new _.a(null)),Xt(this,"willAppearParams",new _.a(null)),Xt(this,"overlayTimeout",null);try{this.handle=R.FoxSession.Companion.startStandalone(Object(Gt.createFirebaseProvider)())}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","constructor",t)}}init(){if(this.handle)try{this.setOverlayConfig(),this.setClientSideRules(),this.handle.subscribe(this.onOverlayData.bind(this))}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","init",t)}}async onOverlayData(t){var e;if(!t)return;const n=await this.getOverlayWillAppearCallbackParams();this.willAppearParams.value=n,n.canAppear?(this.overlayData.value=t,this.overlayTimeout&&clearTimeout(this.overlayTimeout),this.overlayTimeout=setTimeout(()=>{this.onDismiss(),this.isFocused()&&this.deliverFocus()},1e3*(null!==(e=null==t?void 0:t.durationSeconds)&&void 0!==e?e:5))):Object(p.b)("MaestroBroadcastOverlayViewModel","onOverlayData","Overlay will-appear callback prevented overlay from appearing, ignoring payload",{willAppearParams:n})}recordPanelView(t){var e;Object(p.b)("MaestroBroadcastOverlayViewModel","recordPanelView","Recording panel view for panelType="+t),null===(e=this.handle)||void 0===e||e.recordPanelView(t)}recordEngagement(t){var e;Object(p.b)("MaestroBroadcastOverlayViewModel","recordEngagement","Recording panel engagement for panelType="+t),null===(e=this.handle)||void 0===e||e.recordEngagement(t)}getOverlayWillAppearCallbackParams(){return new Promise(t=>{let e=!1;const n=n=>{e||(e=!0,clearTimeout(i),t((t=>{const e="object"==typeof t&&null!==t?t:{},n=e.suggestedPosition,i=n&&"object"==typeof n&&"number"==typeof n.x&&"number"==typeof n.y?{x:n.x,y:n.y}:void 0;return{canAppear:"boolean"==typeof e.canAppear?e.canAppear:c,canFocus:"boolean"==typeof e.canFocus?e.canFocus:u,suggestedPosition:i}})(n)))},i=setTimeout(()=>{Object(p.b)("MaestroBroadcastOverlayViewModel","getOverlayWillAppearCallbackParams","will-appear callback not invoked in time, applying PRD defaults"),n(void 0)},Jt.WILL_APPEAR_TIMEOUT_MS);this.delegate.onOverlayEvent({type:"will-appear",payload:{callback:t=>n(t)}})})}deinit(){var t,e,n;null===(t=this.handle)||void 0===t||t.dismissCurrent(),null===(e=this.handle)||void 0===e||e.unsubscribe(),null===(n=this.handle)||void 0===n||n.close(),this.handle=null,this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.willAppearParams.value=null}refresh(){this.setOverlayConfig(),this.setClientSideRules()}setClientSideRules(){const t=ge.getPageConfigs().reduce((t,e)=>{var n;return t.concat(null!==(n=e.clientRules)&&void 0!==n?n:[])},[]);var e;t.length&&(Object(p.b)("MaestroBroadcastOverlayViewModel","setClientSideRules","Setting client rules"),null===(e=this.handle)||void 0===e||e.setRules(JSON.stringify(t)))}setOverlayConfig(){var t;const e=ge.getGlobalConfig();if(!e)return void Object(p.c)("MaestroBroadcastOverlayViewModel","setOverlayConfig","Global Config not found. Can\t initialize Overlay handler");const n=ge.getSiteID(),i=ge.getPageConfigs().map(t=>{var e;return null===(e=t.page)||void 0===e?void 0:e._id}).filter(Boolean);Object(p.b)("MaestroBroadcastOverlayViewModel","setConfig","Setting Overlay config",{siteId:n,shards:e.shards,pageIds:i}),null===(t=this.handle)||void 0===t||t.setOverlayConfig(n,e.shards,i)}recordPanelData(t,e){var n;Object(p.b)("MaestroBroadcastOverlayViewModel","recordPanelData",`Recording panel data for panelType=${t}, data=${JSON.stringify(e)}`),null===(n=this.handle)||void 0===n||n.updatePanelData(t,JSON.stringify(e))}getOverlayBindableValue(t,e){var n,i;const r=null==t||null===(n=t.bindableProperties)||void 0===n?void 0:n.find(t=>e.includes(t.key));return null!==(i=null==r?void 0:r.value)&&void 0!==i?i:null}getOverlayText(t){var e;return null!==(e=this.getOverlayCtaText(t))&&void 0!==e?e:this.getOverlayBindableValue(t,["descriptionText"])}getOverlayCtaText(t){return this.getOverlayBindableValue(t,["ctaText"])}async trackOverlayView(){try{const t=this.overlayData.value;if(!t)return;const e={overlayId:t.overlayId,overlayName:t.overlayName,templateId:t.templateId||"unknown",templateName:t.templateName||"unknown"},n=this.getOverlayText(t);await this.analyticsService.overlayView(e,{trigger_type:t.triggerType.name,timecoded:"TIMECODED"===t.triggerType.name,overlay_text:n})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayView",t)}}async trackOverlayClick(){try{var t,e,n;const i=this.overlayData.value,r=null!==(t=null==i||null===(e=i.ctaData)||void 0===e||null===(n=e.find(t=>"panelType"===t.key))||void 0===n?void 0:n.value)&&void 0!==t?t:null,s=this.getOverlayText(i),a=this.getOverlayCtaText(i);await this.analyticsService.overlayClick(this.getAnalyticsOverlayData(),{action:"open_panel",panel_target:r,overlay_cta_text:a,overlay_text:s})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayClick",t)}}async trackOverlayDismiss(t){try{if(!t)return;const e={overlayId:t.overlayId,overlayName:t.overlayName,templateId:t.templateId||"unknown",templateName:t.templateName||"unknown"},n=this.getOverlayText(t);await this.analyticsService.overlayDismiss(e,{overlay_text:n})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayDismiss",t)}}getAnalyticsOverlayData(){var t,e,n,i;return{overlayId:(null===(t=this.overlayData.value)||void 0===t?void 0:t.overlayId)||"unknown",overlayName:(null===(e=this.overlayData.value)||void 0===e?void 0:e.overlayName)||"unknown",templateId:(null===(n=this.overlayData.value)||void 0===n?void 0:n.templateId)||"unknown",templateName:(null===(i=this.overlayData.value)||void 0===i?void 0:i.templateName)||"unknown"}}async onAppear(){var t;null!==(t=this.willAppearParams.value)&&void 0!==t&&t.canFocus&&ge.getMaestroEventViewModel().navigation.setFocus(Kt.a),await this.trackOverlayView(),this.delegate.onOverlayEvent({type:"did-appear",payload:null})}async onEngage(){if(!this.overlayData.value)return;let t;var e,n;"show_panel"===this.overlayData.value.ctaType&&(t=null===(e=this.overlayData.value.ctaData)||void 0===e||null===(n=e.find(t=>"panelType"===t.key))||void 0===n?void 0:n.value);t?(await this.trackOverlayClick(),this.delegate.onOverlayEvent({type:"did-engage",payload:{ctaType:"show_panel"===this.overlayData.value.ctaType?"show_panel":"unknown",ctaValue:t}}),this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.onDismiss()):Object(p.c)("MaestroBroadcastOverlayViewModel","onEngage","CTA value is missing for overlay engagement",{overlayData:this.overlayData.value})}onDismiss(){var t;const e=this.overlayData.value;null===(t=this.handle)||void 0===t||t.dismissCurrent(),this.overlayData.value=null,this.willAppearParams.value=null,this.delegate.onOverlayEvent({type:"did-dismiss",payload:null}),this.trackOverlayDismiss(e).catch(t=>{Object(p.a)("MaestroBroadcastOverlayViewModel","onDismiss",t)})}isFocused(){return ge.getMaestroEventViewModel().navigation.focusKey===Kt.a}setDataToOverlay(t){this.willAppearParams.value&&(this.willAppearParams.value={...this.willAppearParams.value,suggestedPosition:t.suggestedPosition})}onArrowPress(t){this.deliverFocus(t)}onBackPress(){this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.onDismiss(),this.deliverFocus("back")}deliverFocus(t){const e=ge.getMaestroEventViewModel();e.navigation.focusKey=null,requestAnimationFrame(()=>{e.navigation.pause(),this.delegate.startFocusManagement({fromTarget:"overlay",keyPress:t})})}onUpdatePlayerTimeCode(t){var e;null===(e=this.handle)||void 0===e||e.updateTimecode(t)}}function Zt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Xt(Jt,"WILL_APPEAR_TIMEOUT_MS",2e3);class Qt extends m.a{constructor(t=[],e=[],n,i){super(),Zt(this,"_eventIds",new _.a([])),Zt(this,"_pageIds",new _.a([])),Zt(this,"playerTimeCode",null),Zt(this,"analyticsService",void 0),Zt(this,"delegate",void 0),Zt(this,"keyPlaysViewModel",null),Zt(this,"fantasyViewModel",null),Zt(this,"betsViewModel",null),Zt(this,"statsViewModel",null),Zt(this,"shopViewModel",null),Zt(this,"builderPanelViewModel",null),Zt(this,"multiViewViewModel",null),Zt(this,"multiViewPanelViewModel",null),Zt(this,"foxStatsViewModel",null),Zt(this,"foxKeyPlaysViewModel",null),Zt(this,"panelManagerViewModel",void 0),Zt(this,"overlayManagerViewModel",void 0),Zt(this,"navigation",void 0),Zt(this,"authErrorService",void 0),Zt(this,"PANELS_LIFECYCLE_MAP",{builderBlockPanel:{cleanup:()=>{var t;null===(t=this.builderPanelViewModel)||void 0===t||t.cleanup(),this.builderPanelViewModel=null},init:()=>{this.builderPanelViewModel=new O.a(this.analyticsService)}},espnBet:{cleanup:()=>{var t;null===(t=this.betsViewModel)||void 0===t||t.cleanup(),this.betsViewModel=null},init:()=>{this.betsViewModel=new it(this.primaryEventId,this.delegate,this.analyticsService)}},espnFantasy:{cleanup:()=>{var t;null===(t=this.fantasyViewModel)||void 0===t||t.cleanup(),this.fantasyViewModel=null},init:()=>{this.fantasyViewModel=new St(this.primaryEventId,this.delegate,this.analyticsService)}},espnKeyPlays:{cleanup:()=>{var t;null===(t=this.keyPlaysViewModel)||void 0===t||t.cleanup(),this.keyPlaysViewModel=null},init:()=>{this.keyPlaysViewModel=new X(this.analyticsService)}},espnShop:{cleanup:()=>{var t;null===(t=this.shopViewModel)||void 0===t||t.cleanup(),this.shopViewModel=null},init:()=>{this.shopViewModel=new Ft(this.primaryEventId,this.analyticsService)}},espnStats:{cleanup:()=>{var t;null===(t=this.statsViewModel)||void 0===t||t.cleanup(),this.statsViewModel=null},init:()=>{this.statsViewModel=new mt(this.primaryEventId,this.delegate,this.analyticsService)}},foxKeyPlays:{cleanup:()=>{var t;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.deinit(),this.foxKeyPlaysViewModel=null},init:()=>{this.foxKeyPlaysViewModel=new Y(this.eventIds.value,this.delegate,this.analyticsService)},refresh:()=>{this.foxKeyPlaysViewModel&&this.foxKeyPlaysViewModel.refresh(this.eventIds.value)},onHide:()=>{var t,e;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.clearProgress(),null===(e=this.foxKeyPlaysViewModel)||void 0===e||e.pause()},onShow:()=>{var t,e;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.clearProgress(),null===(e=this.foxKeyPlaysViewModel)||void 0===e||e.resume()}},foxMultiView:{cleanup:()=>{var t;null===(t=this.multiViewViewModel)||void 0===t||t.cleanup(),this.multiViewViewModel=null},init:()=>{this.multiViewViewModel=new Ut.c(this.eventIds.value,this.delegate,this.analyticsService,this.authErrorService)},refresh:()=>{this.multiViewViewModel&&this.multiViewViewModel.refresh(this.eventIds.value)},onHide:()=>{var t;return null===(t=this.multiViewViewModel)||void 0===t?void 0:t.pause()},onShow:()=>{var t;return null===(t=this.multiViewViewModel)||void 0===t?void 0:t.resume()}},foxStats:{cleanup:()=>{var t;null===(t=this.foxStatsViewModel)||void 0===t||t.deinit(),this.foxStatsViewModel=null},init:()=>{this.foxStatsViewModel=new V(this.eventIds.value,this.analyticsService)},refresh:()=>{this.foxStatsViewModel&&this.foxStatsViewModel.refresh(this.eventIds.value)},onHide:()=>{var t;return null===(t=this.foxStatsViewModel)||void 0===t?void 0:t.pause()},onShow:()=>{var t;return null===(t=this.foxStatsViewModel)||void 0===t?void 0:t.resume()}},multiviewPanel:{cleanup:()=>{var t;null===(t=this.multiViewPanelViewModel)||void 0===t||t.cleanup(),this.multiViewPanelViewModel=null},init:()=>{this.multiViewPanelViewModel=new Ht(this.delegate,this.analyticsService),this.multiViewPanelViewModel.init()}},helloWorld:{cleanup:()=>{},init:()=>{}}}),this._pageIds.value=[...e],this._eventIds.value=[...t],this.delegate=n,this.analyticsService=i,this.panelManagerViewModel=new B,this.overlayManagerViewModel=new Jt(this.analyticsService,this.delegate),this.navigation=new v.b,this.authErrorService=new z(this.delegate)}startFocusManagement(t){return t?"overlay"===t.toTarget?this.focusOverlay():"sidebar"===t.toTarget?this.focusSidebar():void 0:(Object(p.c)("MaestroEventViewModel","startFocusManagement","startFocusManagement called without params. Defaulting to sidebar."),this.focusSidebar())}focusSidebar(){const t=this.navigation.focusKey;t&&this.navigation.isFocusableComponent(t)?this.navigation.setFocus(t):this.focusActivePanelNavigationButton(),requestAnimationFrame(()=>{this.navigation.resume()})}focusOverlay(){this.isOverlayShowing()?(this.navigation.setFocus(Kt.a),requestAnimationFrame(()=>{this.navigation.resume()})):Object(p.c)("MaestroEventViewModel","startFocusManagement","Attempting to focus overlay, but no overlay is currently showing.")}get primaryEventId(){return this.eventIds.value[0]||""}async initViewModels(){await this.syncPanelViewModelsFromConfig()}async syncPanelViewModelsFromConfig(){const t=ge.getPageConfigs(),e=e=>I.isPanelAvailableInAny(t,e),n=this.getPanelViewModelMap();for(const t in this.PANELS_LIFECYCLE_MAP){const{cleanup:i,init:r,refresh:s}=this.PANELS_LIFECYCLE_MAP[t];if(e(t)){if(n[t]&&s)s();else if(!n[t])try{r()}catch(e){console.warn(`Failed to initialize view model for panel "${t}". This panel will not be available. Error:`,e),i()}}else i()}}setActivePanel(t){const e=this.panelManagerViewModel.getIndex(t);null!==e?(this.panelManagerViewModel.setActivePanel(t),this.navigation.paused?this.navigation.focusKey="PANEL_NAV_BUTTON_"+e:this.focusActivePanelNavigationButton()):console.warn(`Panel type "${t}" not found.`)}focusActivePanelNavigationButton(){const t=this.panelManagerViewModel.currentPanel;let e=0;var n;t&&(e=null!==(n=this.panelManagerViewModel.getIndex(t))&&void 0!==n?n:0);const i="PANEL_NAV_BUTTON_"+e;this.navigation.isFocusableComponent(i)?this.navigation.setFocus("PANEL_NAV_BUTTON_"+e):console.warn(`Focusable component with key "${i}" not found. Cannot set focus to active panel's navigation button.`)}updatePlayerTimeCode(t){var e,n,i,r;const s=new Date(t);if(isNaN(s.getTime()))return console.warn("Invalid timestamp provided:",t),void console.warn("Make sure the timestamp is a valid number. \nhttps://developers.maestro.io/sdk/web/maestro-event-interface/state/updatePlayerTimeCode");this.playerTimeCode=t,null===(e=this.keyPlaysViewModel)||void 0===e||e.onUpdatePlayerTimeCode(this.playerTimeCode),null===(n=this.foxKeyPlaysViewModel)||void 0===n||n.onUpdatePlayerTimeCode(this.playerTimeCode),null===(i=this.statsViewModel)||void 0===i||i.onUpdatePlayerTimeCode(this.playerTimeCode),null===(r=this.foxStatsViewModel)||void 0===r||r.onUpdatePlayerTimeCode(this.playerTimeCode),this.overlayManagerViewModel.onUpdatePlayerTimeCode(this.playerTimeCode)}getPlayerTimeCode(){return this.playerTimeCode}getViewModelForPanel(t){var e;return null!==(e=this.getPanelViewModelMap()[t])&&void 0!==e?e:null}getPanelViewModelMap(){return{espnStats:this.statsViewModel,espnBet:this.betsViewModel,espnKeyPlays:this.keyPlaysViewModel,espnFantasy:this.fantasyViewModel,espnShop:this.shopViewModel,builderBlockPanel:this.builderPanelViewModel,foxKeyPlays:this.foxKeyPlaysViewModel,foxMultiView:this.multiViewViewModel,foxStats:this.foxStatsViewModel,multiviewPanel:this.multiViewPanelViewModel,helloWorld:null}}setDataToPanel(t){const e=Object.keys(t),n=this.getPanelViewModelMap();for(const i of e){const e=t[i];if(!e)continue;const r=n[i];r?r.setDataToPanel&&r.setDataToPanel(e):console.log(`[setDataToPanel] Panel '${i}' not initialized/supported. Data ignored.`)}}setDataToOverlay(t){this.overlayManagerViewModel.setDataToOverlay(t)}async deinit(){this.cleanupPanelViewModels(),this.panelManagerViewModel.cleanup(),this.overlayManagerViewModel.deinit(),this.navigation.destroy(),this.authErrorService.reset();try{await this.didHidePanel()}catch(t){Object(p.a)("MaestroEventViewModel","deinit.didHidePanel",t)}}updateKeyPlaysData(t){return this.keyPlaysViewModel?this.keyPlaysViewModel.setKeyPlays(t,this.playerTimeCode):Promise.resolve()}updateUserSettings(t){return w.getInstance().updateSettings(t),Promise.resolve()}didStartPlayingClip(t){this.keyPlaysViewModel&&(this.keyPlaysViewModel.lastPlayedClipIndex.value=t,this.keyPlaysViewModel.currentClipPlaybackProgress.value=0,this.keyPlaysViewModel.currentlyPlayingClipIndex.value=t,this.keyPlaysViewModel.clearLoadFailureStatus(t))}didStopPlayingClip(t){this.keyPlaysViewModel&&(this.keyPlaysViewModel.lastPlayedClipIndex.value=t,this.keyPlaysViewModel.currentlyPlayingClipIndex.value=null,this.keyPlaysViewModel.currentClipPlaybackProgress.value=null)}didFailToPlayClip(t){var e;null===(e=this.keyPlaysViewModel)||void 0===e||e.handleKeyPlayLoadFailure(t)}didUpdatePlaybackProgressOfClip(t,e){this.keyPlaysViewModel&&(this.keyPlaysViewModel.currentClipPlaybackProgress.value=e,this.keyPlaysViewModel.clearLoadFailureStatus(t))}async didShowPanel(){for(const e of Object.values(this.PANELS_LIFECYCLE_MAP)){var t;null===(t=e.onShow)||void 0===t||t.call(e)}}async didHidePanel(){for(const e of Object.values(this.PANELS_LIFECYCLE_MAP)){var t;null===(t=e.onHide)||void 0===t||t.call(e)}}currentEventDoesNotSupportKeyPlays(){this.keyPlaysViewModel&&(this.keyPlaysViewModel.errorState.value="unsupportedEvent")}getCurrentEventID(){const t=this._eventIds.value;return 0===t.length?null:1===t.length?t[0]:[...t]}getCurrentEventIDs(){return[...this._eventIds.value]}async refresh(t,e,n){this._eventIds.value=[...t],this._pageIds.value=[...e],this.delegate=n,this.authErrorService.setDelegate(n),await this.syncPanelViewModelsFromConfig(),this.panelManagerViewModel.setPanels(),this.overlayManagerViewModel.refresh()}getCurrentlyPlayingClipIndex(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.currentlyPlayingClipIndex.value)&&void 0!==t?t:null}getLastPlayedClipIndex(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.lastPlayedClipIndex.value)&&void 0!==t?t:null}getCurrentClipPlaybackProgress(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.currentClipPlaybackProgress.value)&&void 0!==t?t:null}getKeyPlaysCount(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.allItems.length)&&void 0!==t?t:0}get eventIds(){return this._eventIds}get pageIds(){return this._pageIds}deliverFocus(){this.navigation.pause(),this.delegate.startFocusManagement({fromTarget:"sidebar",keyPress:"left"})}isOverlayShowing(){return null!==this.overlayManagerViewModel.overlayData.value}cleanupPanelViewModels(){for(const t in this.PANELS_LIFECYCLE_MAP){const{cleanup:e}=this.PANELS_LIFECYCLE_MAP[t];e()}}getFeatureFlag({panelType:t,featureFlag:e}){var n,i,r;const s=ge.getPageConfig(),a=null==s||null===(n=s.panels)||void 0===n||null===(i=n.find(e=>e.panel_type===t))||void 0===i?void 0:i.renderer;if(null!=a&&a.client_settings){var o,l,c;const t=null==a||null===(o=a.client_settings)||void 0===o?void 0:o[e],n=null==t?void 0:t.default,i=Yt.version,r=null!==(l=(null!==(c=null==t?void 0:t.rules)&&void 0!==c?c:[]).filter(t=>{var e,n;if("bbd"!==t.platform)return!1;if(null==i||""===i)return!1;const r=String(null!==(e=t.since_version)&&void 0!==e?e:""),s=String(null!==(n=t.below_version)&&void 0!==n?n:""),a=String(i),o=""===r||$t(a,r)>=0,l=""===s||$t(a,s)<0;return o&&l}).pop())&&void 0!==l?l:null;if(r)return r.value;if(void 0!==n)return n}return null==a||null===(r=a.block_data)||void 0===r?void 0:r[e]}}var te=n(188),ee=n.n(te);function ne(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ie{static resetServerTimeCacheForTests(){ie.cachedServerTimeDiff=null,ie.serverTimeCachedAt=0,ie.serverTimeInFlight=null}constructor(){ne(this,"client",void 0),this.client=new S.a({baseURL:"https://insights.maestro.io",backoff:2,delay:1e3,retries:1})}isEnabled(){var t,e,n;const i=ge.getGlobalConfig();return null===(t=null==i||null===(e=i.bbd)||void 0===e||null===(n=e.analytics)||void 0===n?void 0:n.enabled)||void 0===t||t}async action(t){if(this.isEnabled())if(t.i_id)try{await this.client.post("/action",t)}catch(t){Object(p.a)("InsightsService","action",t)}else console.warn("InsightsService: Missing i_id in payload, skipping action:",t);else console.warn("InsightsService: Analytics is disabled in global config")}async batchAction(t){if(this.isEnabled())try{const e=await this.client.post("/action",t,{mode:"batch"});if("partial"===e.status){const n=new Error(`Batch action partially failed: ${e.failed} of ${t.length}`);Object(p.a)("InsightsService","batchActionPartialFailure",n)}}catch(t){Object(p.a)("InsightsService","batchAction",t)}else console.warn("InsightsService: Analytics is disabled in global config")}async getServerTime(){if(!this.isEnabled())return{time:Date.now(),diff:0};const t=Date.now();if(null!==ie.cachedServerTimeDiff&&t-ie.serverTimeCachedAt<6e4){return{time:Date.now()+ie.cachedServerTimeDiff,diff:ie.cachedServerTimeDiff}}if(ie.serverTimeInFlight)return ie.serverTimeInFlight;ie.serverTimeInFlight=this.fetchServerTime();try{return await ie.serverTimeInFlight}finally{ie.serverTimeInFlight=null}}async fetchServerTime(){const t=Date.now();try{const e=await this.client.get("/time",{_:`${Date.now()}-${this.randomId()}`,client_time:t}),n=Date.now();return ie.cachedServerTimeDiff=e.diff,ie.serverTimeCachedAt=n,{time:n+e.diff,diff:e.diff}}catch(t){return Object(p.a)("InsightsService","fetchServerTime",t),{time:Date.now(),diff:0}}}randomId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}}ne(ie,"cachedServerTimeDiff",null),ne(ie,"serverTimeCachedAt",0),ne(ie,"serverTimeInFlight",null);var re=n(64),se=n(13);function ae(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class oe{constructor(){ae(this,"currentTime",0),ae(this,"serverOffsetTime",0),ae(this,"insightsService",void 0),ae(this,"cacheManager",void 0),this.insightsService=new ie,this.cacheManager=new re.a}async getPayload(t,e){return this.currentTime=Date.now(),this.serverOffsetTime=await this.getDeviceOffset(),{...this.getPageInsights(e),...this.getDeviceInsights(),...this.getInsightsInsights(e),...this.getMetadataInsights(),...this.getReferrerInsights(),...this.getSessionInsights(),...this.getSiteInsights(e),...this.getUserInsights(),...this.getEventInsights(t)}}getEventInsights(t){const e=t.ontology;return{e_d:"maestro",e_m:Object.values(t.metadata||{}).length>0?JSON.stringify(t.metadata):null,e_t:this.currentTime+this.serverOffsetTime,e_u:se.d.location.href,e0:e.kingdom,e1:e.phylum,e2:e.class,e3:e.order,e4:e.family,e5:e.genus,e6:e.species,t:this.currentTime}}getPageInsights(t){return{p_c:"pages",p_id:null==t?void 0:t.page._id,p_n:null==t?void 0:t.page.name,p_s:null==t?void 0:t.page.slug,p_t:null==t?void 0:t.page.type}}getDevicePermanentID(){const t=se.b.getItem("mio:device:permanentId");if(t)return t;const e=this.randomId();return se.b.setItem("mio:device:permanentId",e),e}getDeviceCreated(){const t=this.cacheManager.getCache("mio:device:created");if(t)return Number(t);const e=(new Date).getTime();return this.cacheManager.setCache("mio:device:created",e.toString()),e}getTabID(){const t=se.c.getItem("mio:device:tabId");if(t)return t;const e=this.randomId();return se.c.setItem("mio:device:tabId",e),e}getDeviceInsights(){return{d_ct:this.getDeviceCreated(),d_nd:!1,d_np:se.d.navigator.platform,d_pid:this.getDevicePermanentID(),d_sh:se.d.screen.height,d_sw:se.d.screen.width,d_tid:this.getTabID(),d_tim:this.currentTime,d_tof:this.serverOffsetTime,d_ua:se.d.navigator.userAgent}}randomId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}async getDeviceOffset(){const t=Date.now(),{diff:e,time:n}=await this.insightsService.getServerTime(),i=Date.now();return(e-(i-t)-(i-n))/2}getInsightsInsights(t){return{i_id:t.insights._id}}getMetadataInsights(){return{m_iv:"1.00.0"}}getReferrerInsights(){return{r_d:"$direct",r_s:null,r_u:"$direct"}}getSessionID(){const t=se.c.getItem("mio:session:id");if(t)return t;const e=this.randomId();return se.c.setItem("mio:session:id",e),e}getSessionInsights(){return{se_id:this.getSessionID(),se_s:this.currentTime}}getSiteInsights(t){return{si_d:t.site.domainUrl,si_id:t.site._id,si_pid:t.site.package.id+"-sapphire",si_pv:t.site.package.version+"-sapphire",si_s:t.site.slug}}getUserInsights(){return{u_a:null,u_c:null,u_e:null,u_id:null,u_li:!1,u_n:null,u_nu:!1,u_s:null,u_u:null,u_un:null}}}function le(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ce=class{constructor(){le(this,"insightsService",void 0),le(this,"insightsPayloadBuilder",void 0),le(this,"SDKSessionId",""),le(this,"pageIdSessionIdMap",{}),le(this,"pinchBackSessionId",""),le(this,"pageSessionBeaconTimeoutId",null),le(this,"isPageSessionBeaconRunning",!1),le(this,"isPageSessionActive",!1),this.insightsService=new ie,this.insightsPayloadBuilder=new oe}isTestEnvironment(){return!1}async trackAction(t){if(this.isTestEnvironment())return;ge.getMaestroEventViewModel().delegate.trackAction(t.event);const e=await this.insightsPayloadBuilder.getPayload({ontology:{class:t.event.e2_class,family:t.event.e4_family,order:t.event.e3_order,kingdom:t.event.e0_kingdom,phylum:t.event.e1_phylum,genus:t.event.e5_genus,species:t.event.e6_species},metadata:t.event.metadata},t.pageConfig);await this.insightsService.action(e)}async trackMultiEventImpression(t){if(this.isTestEnvironment())return;const e=[];for(const n of t){ge.getMaestroEventViewModel().delegate.trackImpression(n.event);const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:n.event.e0_kingdom,phylum:n.event.e1_phylum,class:n.event.e2_class,order:n.event.e3_order,family:n.event.e4_family,genus:n.event.e5_genus,species:n.event.e6_species},metadata:n.event.metadata},n.pageConfig);e.push(t)}await this.insightsService.batchAction(e)}async trackImpression(t){if(this.isTestEnvironment())return;ge.getMaestroEventViewModel().delegate.trackImpression(t.event);const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:t.event.e0_kingdom,phylum:t.event.e1_phylum,class:t.event.e2_class,order:t.event.e3_order,family:t.event.e4_family,genus:t.event.e5_genus,species:t.event.e6_species},metadata:t.event.metadata},t.pageConfig);await this.insightsService.action(e)}isMultiEvent(){return ge.getMaestroEventViewModel().getCurrentEventIDs().length>1}async overlayView(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayViewSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayViewMultiEvent(t,n,e):void 0}async overlayViewMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_view",e0_kingdom:"overlay",e1_phylum:"view",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventImpression(i)}async overlayViewSingleEvent(t,e,n){await this.trackImpression({event:{name:"overlay_view",e0_kingdom:"overlay",e1_phylum:"view",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async panelView(t,e){const n=ge.getPageConfigs(),i=ge.getMaestroEventViewModel().overlayManagerViewModel;i&&i.recordPanelView(t);const r=n.filter(e=>{var n,i,r;const s=null===(n=e.panels)||void 0===n?void 0:n.find(e=>e.panel_type===t);return s&&!1!==(null===(i=s.renderer)||void 0===i||null===(r=i.supported_platforms)||void 0===r?void 0:r.bbd)});return 1===r.length?this.panelViewSingleEvent(t,r[0],e):this.isMultiEvent()&&r.length>1?this.panelViewMultiEvent(t,e,r):void 0}async panelViewMultiEvent(t,e,n){const i=[];for(const r of n){const n=this.getPanelDataFromPageConfig(t,r);i.push({event:{name:"panel_selected",e0_kingdom:"panel",e1_phylum:"view",e2_class:n.panel_type,e3_order:n.panel_id,e4_family:n.panel_name,metadata:{...e||{},...this.getBaseMetadataFromPageConfig(r)}},pageConfig:r})}await this.trackMultiEventImpression(i)}async panelViewSingleEvent(t,e,n){const i=this.getPanelDataFromPageConfig(t,e);await this.trackImpression({event:{name:"panel_selected",e0_kingdom:"panel",e1_phylum:"view",e2_class:i.panel_type,e3_order:i.panel_id,e4_family:i.panel_name,metadata:{...n||{},...this.getBaseMetadataFromPageConfig(e)}},pageConfig:e})}async overlayClick(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayClickSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayClickMultiEvent(t,n,e):void 0}async overlayClickSingleEvent(t,e,n){await this.trackAction({event:{name:"overlay_pressed",e0_kingdom:"overlay",e1_phylum:"engage",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async overlayClickMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_pressed",e0_kingdom:"overlay",e1_phylum:"engage",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventAction(i)}async overlayDismiss(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayDismissSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayDismissMultiEvent(t,n,e):void 0}async overlayDismissSingleEvent(t,e,n){await this.trackAction({event:{name:"overlay_dismissed",e0_kingdom:"overlay",e1_phylum:"dismiss",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async overlayDismissMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_dismissed",e0_kingdom:"overlay",e1_phylum:"dismiss",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventAction(i)}async panelClick(t){const e=ge.getMaestroEventViewModel().overlayManagerViewModel;e&&e.recordEngagement(t.type);const n=ge.getPageConfigs().filter(e=>{var n,i,r;const s=null===(n=e.panels)||void 0===n?void 0:n.find(e=>e.panel_type===t.type);return s&&!1!==(null===(i=s.renderer)||void 0===i||null===(r=i.supported_platforms)||void 0===r?void 0:r.bbd)});return 1===n.length?this.panelClickSingleEvent(t,n[0]):this.isMultiEvent()&&n.length>1?this.panelClickMultiEvent(t,n):void 0}async panelClickSingleEvent(t,e){const n=this.getPanelDataFromPageConfig(t.type,e);await this.trackAction({event:{name:t.name,e0_kingdom:"panel",e1_phylum:"engage",e2_class:n.panel_type,e3_order:n.panel_id,e4_family:n.panel_name,metadata:{...this.getBaseMetadataFromPageConfig(e),...t.metadata}},pageConfig:e})}async panelClickMultiEvent(t,e){const n=[];for(const i of e){const e=this.getPanelDataFromPageConfig(t.type,i);n.push({event:{name:t.name,e0_kingdom:"panel",e1_phylum:"engage",e2_class:e.panel_type,e3_order:e.panel_id,e4_family:e.panel_name,metadata:{...this.getBaseMetadataFromPageConfig(i),...t.metadata}},pageConfig:i})}await this.trackMultiEventAction(n)}async trackMultiEventAction(t){if(this.isTestEnvironment())return;const e=[];for(const n of t){ge.getMaestroEventViewModel().delegate.trackAction(n.event);const t=await this.insightsPayloadBuilder.getPayload({ontology:{class:n.event.e2_class,family:n.event.e4_family,order:n.event.e3_order,kingdom:n.event.e0_kingdom,phylum:n.event.e1_phylum,genus:n.event.e5_genus,species:n.event.e6_species},metadata:n.event.metadata||{}},n.pageConfig);e.push(t)}await this.insightsService.batchAction(e)}getBaseMetadataFromPageConfig(t){if(!t)return console.warn("Page Config not found. Could not extract metadata."),{league:"",airing:"",event:"",sport:""};const e=t.page.metadata,n="airing"===(null==e?void 0:e.external_field_4)&&e.external_field_1||"",i="event"===(null==e?void 0:e.external_field_4)&&e.external_field_1||"unknown",r=(null==e?void 0:e.external_field_2)||"";return{league:(null==e?void 0:e.external_field_3)||"",airing:n,event:i,sport:r}}getPanelDataFromPageConfig(t,e){if(!e)return console.warn("Page Config not found. Could not extract panel data."),{panel_id:"",panel_name:"",panel_type:""};const n=e.panels.find(e=>e.panel_type===t);return n?{panel_id:n._id,panel_name:n.panel_name||"",panel_type:n.panel_type||""}:(console.warn(`Panel of type ${t} not found in Page Config.`),{panel_id:"",panel_name:"",panel_type:""})}async SDKSessionStart(t){if(!t.length)throw new Error("No Page Configs found for SDKSessionStart. Cannot start session without page context.");return this.SDKSessionId=Math.random().toString(36).substring(2,15),t.length>1?this.SDKMultiEventSessionStart(t):this.SDKSingleEventSessionStart(t[0])}async SDKMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"sdk"},metadata:{version:Yt.version}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","SDKMultiEventSessionStart",t)}}async SDKSingleEventSessionStart(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"sdk"},metadata:{version:Yt.version}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","SDKSingleEventSessionStart",t)}}async pageSessionStart(t){if(!t.length)throw new Error("No Page Configs found for pageSessionStart. Cannot start session without page context.");t.forEach(t=>{this.pageIdSessionIdMap[t.page._id]=Math.random().toString(36).substring(2,15)}),this.isPageSessionActive=!0,t.length>1?await this.pageMultiEventSessionStart(t):await this.pageSingleEventSessionStart(t[0]),this.scheduleNextBeacon()}async pageSingleEventSessionStart(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id]}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","pageSingleEventSessionStart",t)}}async pageMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id]}},n);e.push(t)}await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pageMultiEventSessionStart",t)}}async pageSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for pageSessionEnd. Cannot end session without page context.");try{t.length>1?await this.pageMultiEventSessionEnd(t):await this.pageSingleEventSessionEnd(t[0])}finally{t.forEach(t=>{delete this.pageIdSessionIdMap[t.page._id]}),0===Object.keys(this.pageIdSessionIdMap).length&&(this.isPageSessionActive=!1,this.pageSessionBeaconTimeoutId&&(clearTimeout(this.pageSessionBeaconTimeoutId),this.pageSessionBeaconTimeoutId=null))}}async pageSingleEventSessionEnd(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id]}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","pageSingleEventSessionEnd",t)}}async pageMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id]}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pageMultiEventSessionEnd",t)}}async pinchBackSessionStart(t){if(!t.length)throw new Error("No Page Configs found for pinchBackSessionStart. Cannot start session without page context.");return this.pinchBackSessionId=Math.random().toString(36).substring(2,15),t.length>1?this.pinchBackMultiEventSessionStart(t):this.pinchBackSingleEventSessionStart(t[0])}async pinchBackSingleEventSessionStart(t){try{const e=this.getBaseMetadataFromPageConfig(t),n=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"pinchback"},metadata:{...e,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(n)}catch(t){Object(p.a)("AnalyticsService","pinchBackSingleEventSessionStart",t)}}async pinchBackMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=this.getBaseMetadataFromPageConfig(n),i=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"pinchback"},metadata:{...t,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(i)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pinchBackMultiEventSessionStart",t)}}async pinchBackSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for pinchBackSessionEnd. Cannot end session without page context.");try{t.length>1?await this.pinchBackMultiEventSessionEnd(t):await this.pinchBackSingleEventSessionEnd(t[0])}finally{this.pinchBackSessionId=""}}async pinchBackSingleEventSessionEnd(t){try{const e=this.getBaseMetadataFromPageConfig(t),n=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"pinchback"},metadata:{...e,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(n)}catch(t){Object(p.a)("AnalyticsService","pinchBackSingleEventSessionEnd",t)}}async pinchBackMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=this.getBaseMetadataFromPageConfig(n),i=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"pinchback"},metadata:{...t,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(i)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pinchBackMultiEventSessionEnd",t)}}async SDKSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for SDKSessionEnd. Cannot end session without page context.");try{if(t.length>1)return this.SDKMultiEventSessionEnd(t);const e=ge.getPageConfig();if(!e)return;await this.SDKSingleEventSessionEnd(e)}finally{this.SDKSessionId=""}}deinit(){this.pageSessionBeaconTimeoutId&&(clearTimeout(this.pageSessionBeaconTimeoutId),this.pageSessionBeaconTimeoutId=null)}async SDKSingleEventSessionEnd(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"sdk"},metadata:{version:Yt.version}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","SDKSingleEventSessionEnd",t)}}async SDKMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"sdk"},metadata:{version:Yt.version}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","SDKMultiEventSessionEnd",t)}}scheduleNextBeacon(){var t,e;if(!this.isPageSessionActive)return;const n=ge.getGlobalConfig(),i=(null==n||null===(t=n.bbd)||void 0===t||null===(e=t.analytics)||void 0===e?void 0:e.beacon_interval)||240;this.pageSessionBeaconTimeoutId=setTimeout(async()=>{await this.sendSessionBeacon()},1e3*i)}async sendSessionBeacon(){if(!this.isPageSessionBeaconRunning&&this.isPageSessionActive){this.isPageSessionBeaconRunning=!0;try{await this.sessionBeacon()}catch(t){Object(p.a)("AnalyticsService","sendSessionBeacon",t)}finally{this.isPageSessionBeaconRunning=!1,this.isPageSessionActive&&this.scheduleNextBeacon()}}}async sessionBeacon(){if(this.isMultiEvent()){const t=ge.getPageConfigs();return this.multiEventSessionBeacon(t)}const t=ge.getPageConfig();if(t)return this.singleEventSessionBeacon(t)}async singleEventSessionBeacon(t){const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"beacon",class:"frequent"},metadata:{paywall_gated:!1,viewer_id:this.insightsPayloadBuilder.getDevicePermanentID(),is_billable:!1,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(e)}async multiEventSessionBeacon(t){const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"beacon",class:"frequent"},metadata:{paywall_gated:!1,viewer_id:this.insightsPayloadBuilder.getDevicePermanentID(),is_billable:!1,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(t)}return await this.insightsService.batchAction(e)}};const ue={_id:"6274067af74b66a544018dac",button:{borderRadius:"rounded",textCapitalization:"uppercase"},colors:{accentPrimary:"#FFFFFF",accentSecondary:"#3C3F47",accentTertiary:"#0C0C0E",surface1:"#080A0C",surface2:"#12141A",surface3:"#1B1E26",surface4:"#242833",surface5:"#363C4D",surface6:"#3E4759",highlightPrimary:"#FFFFFF",highlightSecondary:"#9A9EA9",highlightTertiary:"#0A0C0F",alertConfirmation:"#43D48F",alertWarning:"#F58B00",alertError:"#FF0000",text100:"#F8F9FA",text200:"#C2C5CB",text300:"#8D919D",text400:"#5C606B",text500:"#0C0C0E"},creator:"016901e60000000000000000",name:"Dark Mode",type:"classic",mode:"dark",owner:"016901e60000000000000000",typography:{body:"BentonSans-Medium",headline:"BentonSans-Medium"}},he={body:"var(--font-tertiary)",headline:"var(--font-primary)",title:"var(--font-secondary)"},de={body:"BentonSans",headline:"BentonSansBold",title:"BentonSansMedium"},fe=()=>{var t;const e=ge.getPageConfig();return(null==e||null===(t=e.theme)||void 0===t?void 0:t.colors)||ue.colors},_e=()=>Object(j.b)(ge.getSiteID())?he:de;function pe(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class me{constructor(t){pe(this,"renderer",void 0),pe(this,"siteID",""),pe(this,"maestroEventViewModel",null),pe(this,"pageConfigs",[]),pe(this,"globalConfig",null),pe(this,"globalConfigPoller",null),pe(this,"_analyticsService",null),pe(this,"isProdEnv",!0),pe(this,"activePanelUnmountFn",null),pe(this,"activeOverlayUnmountFn",null),this.renderer=t}get analyticsService(){return this._analyticsService||(this._analyticsService=new ce),this._analyticsService}static getInstance(){if(!me.instance){const t=new l;me.instance=new me(t)}return me.instance}async userDidStartWatchingEvent({eventId:t,pageId:e,userSettings:n,delegate:i,useProdEnv:r=!0}){this.isProdEnv=r;const s=this.getSiteID();if(!s||""===s.trim())throw new Error("siteID must be set before calling userDidStartWatchingEvent.");const a=Array.isArray(t)?t:t?[t]:[],o=Array.isArray(e)?e:e?[e]:[];if(0===a.length&&0===o.length)throw new Error("Either eventId or pageId must be provided to load the page configuration.");const l=new I(s,this.isProdEnv),c=[...this.pageConfigs];let u=[];if(o.length>0){const t=await l.fetchPageConfigsByPageIds(s,o);u=t.filter(t=>null!==t)}else{const t=await l.fetchPageConfigsByMetadata(s,a);u=t.filter(t=>null!==t)}if(0===u.length)throw new Error(`Could not determine page configuration for siteId: ${s}, pageId: ${o.join(",")} and eventId: ${a.join(",")}.`);if(this.pageConfigs=u,this.globalConfigPoller||(this.globalConfigPoller=l.pollGlobalConfig(t=>{this.globalConfig=t})),n&&w.getInstance().updateSettings(n),this.maestroEventViewModel){const t=u.filter(t=>!c.some(e=>e.page._id===t.page._id)),e=c.filter(t=>!u.some(e=>e.page._id===t.page._id));return e.length>0&&await this.analyticsService.pageSessionEnd(e),t.length>0&&await this.analyticsService.pageSessionStart(t),await this.maestroEventViewModel.refresh(a,o,i),this.maestroEventViewModel}return await this.analyticsService.SDKSessionStart(this.pageConfigs),this.maestroEventViewModel=new Qt(a,o,i,this.analyticsService),await this.maestroEventViewModel.initViewModels(),await this.analyticsService.pageSessionStart(this.pageConfigs),await this.enableOverlays(),(()=>{const t=fe(),e=_e();Object.keys(t).forEach(e=>{document.documentElement.style.setProperty("--sdk-"+e,t[e])}),Object.keys(e).forEach(t=>{document.documentElement.style.setProperty("--sdk-font-"+t,e[t])})})(),this.maestroEventViewModel}async enableOverlays(){this.activeOverlayUnmountFn&&this.activeOverlayUnmountFn();const t=(()=>{const t=document.getElementById("maestro__sdk__overlay");if(t)return t;const e=document.createElement("div");return e.id="maestro__sdk__overlay",document.body.appendChild(e),e})();this.activeOverlayUnmountFn=await this.renderer.renderOverlay(t.id)}async userDidStopWatchingEvent(t){if(this.activePanelUnmountFn&&await this.activePanelUnmountFn(),this.activeOverlayUnmountFn){this.activeOverlayUnmountFn(),this.activeOverlayUnmountFn=null;const t=document.getElementById("maestro__sdk__overlay");t&&document.body.removeChild(t)}await this.analyticsService.pageSessionEnd(this.pageConfigs),this.maestroEventViewModel&&(await this.maestroEventViewModel.deinit(),this.maestroEventViewModel=null),await this.analyticsService.SDKSessionEnd(this.pageConfigs),this.analyticsService.deinit(),this.pageConfigs=[],this.globalConfig=null,this.globalConfigPoller&&(this.globalConfigPoller.stop(),this.globalConfigPoller=null),(()=>{const t=fe(),e=_e();Object.keys(t).forEach(t=>{document.documentElement.style.removeProperty("--sdk-"+t)}),Object.keys(e).forEach(t=>{document.documentElement.style.removeProperty("--sdk-font-"+t)})})()}configure(t){this.setSiteID(t.siteID),t.userSettings&&w.getInstance().updateSettings(t.userSettings),Object(p.b)("MaestroWebSDK","configure","SDK configured",{configParams:t})}setSiteID(t){if(!t||""===t.trim())throw new Error("Site ID must be provided");this.siteID=t}getSiteID(){return this.siteID}getIsProdEnv(){return this.isProdEnv}getMaestroEventViewModel(){if(!this.maestroEventViewModel)throw new Error("No Maestro Event View Model set");return this.maestroEventViewModel}async renderPanel(t){await this.analyticsService.pinchBackSessionStart(this.pageConfigs);const e=await this.renderer.renderPanel(t);let n=!1;const i=async()=>{n||(n=!0,e(),await this.analyticsService.pinchBackSessionEnd(this.pageConfigs),this.activePanelUnmountFn===i&&(this.activePanelUnmountFn=null))};return this.activePanelUnmountFn=i,i}getPageConfig(){var t;return null!==(t=this.pageConfigs[0])&&void 0!==t?t:null}getPageConfigs(){return this.pageConfigs}getGlobalConfig(){return this.globalConfig}}pe(me,"instance",void 0);const ve=me.getInstance();var ge=e.default=ve},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return f}));var i=n(29),r=n(13);const s=[/bbd-web-sdk\.us-central1-dev\.gcp\.maestro\.io/];let a=null,o=[],l=!1;const c=async()=>{if(!a&&!l&&Object(r.a)()){l=!0;try{const{BrowserClient:t,defaultStackParser:e,defaultIntegrations:c,makeFetchTransport:u}=await Promise.resolve().then(n.bind(null,316)),h=null!==s.find(t=>t.test(r.d.location.href));a=new t({dsn:"https://91444a71cbaefc62e8dc813f22bad3bf@o4506894189330432.ingest.us.sentry.io/4509946717470720",transport:u,stackParser:e,integrations:c.filter(t=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(t.name)),tracesSampleRate:h?1:.1,release:i.version,environment:h?"development":"production",enabled:!/localhost/.test(r.d.location.href)}),o.forEach(({error:t,extra:e})=>{var n;null===(n=a)||void 0===n||n.captureException(t,e)}),o=[]}catch(t){console.error("[maestro-web-sdk] Failed to load Sentry:",t)}finally{l=!1}}};const u="[maestro-web-sdk]";function h(t,e,n,i){((t,e)=>{a?a.captureException(t,e):(o.push({error:t,extra:e}),c())})(n,{context:`${t}.${e}`,...i}),i?console.error(`${u}[${t}] ${e}:`,n,i):console.error(`${u}[${t}] ${e}:`,n)}function d(t,e,n,i){i?console.info(`${u}[${t}] ${e}:`,n,i):console.info(`${u}[${t}] ${e}:`,n)}function f(t,e,n,i){i?console.warn(`${u}[${t}] ${e}:`,n,i):console.warn(`${u}[${t}] ${e}:`,n)}},function(t,e,n){"use strict";var i=n(0),r=n.n(i);function s(){return(s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class o extends r.a.Component{constructor(t){super(t),a(this,"state",{failed:!1}),a(this,"handleError",()=>{this.setState({failed:!0})})}componentDidUpdate(t){t.src!==this.props.src&&this.state.failed&&this.setState({failed:!1})}render(){return this.state.failed?(console.warn("Image failed to load:",this.props.src),null):this.props.src?r.a.createElement("img",s({alt:this.props.alt||"Image"},this.props,{onError:this.handleError})):(console.warn("Image source is empty"),null)}}e.a=o},function(t,e,n){"use strict";function i(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}));class r{constructor(t){i(this,"listeners",[]),i(this,"_value",void 0),this._value=t}get value(){return this._value}set value(t){this._value=t,this.notify()}subscribe(t){return this.listeners.push(t),()=>{this.listeners=this.listeners.filter(e=>e!==t)}}notify(){this.listeners.forEach(t=>t(this._value))}}},,,function(t,e,n){"use strict";var i=n(49);e.a=i.b},function(t,e,n){"use strict";var i=n(36);e.a=i.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return a}));const i=()=>"undefined"!=typeof window,r={getItem:t=>i()?localStorage.getItem(t):null,setItem:(t,e)=>{i()&&localStorage.setItem(t,e)},removeItem:t=>{i()&&localStorage.removeItem(t)},get length(){return i()?localStorage.length:0},key:t=>i()?localStorage.key(t):null},s={getItem:t=>i()?sessionStorage.getItem(t):null,setItem:(t,e)=>{i()&&sessionStorage.setItem(t,e)}},a={get location(){return i()?window.location:{href:""}},get navigator(){return i()?window.navigator:{userAgent:"",platform:""}},get screen(){return i()?window.screen:{height:0,width:0}}}},function(t,e,n){"use strict";(function(t){function i(t){return t&&t.Math==Math?t:void 0}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a}));const r="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof t&&i(t)||function(){return this}()||{};function s(){return r}function a(t,e,n){const i=n||r,s=i.__SENTRY__=i.__SENTRY__||{};return s[t]||(s[t]=e())}}).call(this,n(43))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i={ESPN_KEY_PLAYS:"espnKeyPlays",ESPN_STATS:"espnStats",ESPN_BETS:"espnBet",ESPN_FANTASY:"espnFantasy",ESPN_SHOP:"espnShop",HELLO_WORLD:"helloWorld",FOX_KEY_PLAYS:"foxKeyPlays",FOX_MULTI_VIEW:"foxMultiView",FOX_STATS:"foxStats",MULTI_VIEW_PANEL:"multiviewPanel",BUILDER_BLOCK_PANEL:"builderBlockPanel"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}));const i=t=>t.toLowerCase().trim().replace(/[\s\W-]+/g,"-").replace(/^-+|-+$/g,"");function r(t){let e=0;for(let n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n),e&=e}return e}},function(t,e,n){"use strict";var i=n(0),r=n.n(i),s=n(48);e.a=({children:t})=>{const e=Object(i.useRef)(null),{setRef:n,removeRef:a}=Object(s.a)();return Object(i.useEffect)(()=>{const t=e.current;return t&&n(t),()=>{t&&a(t)}},[n,a]),r.a.createElement("div",{className:"focusable-item",ref:e},t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return g})),n.d(e,"h",(function(){return v})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return u})),n.d(e,"k",(function(){return _})),n.d(e,"l",(function(){return c})),n.d(e,"m",(function(){return m})),n.d(e,"n",(function(){return p}));const i=Object.prototype.toString;function r(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}function s(t,e){return i.call(t)===`[object ${e}]`}function a(t){return s(t,"ErrorEvent")}function o(t){return s(t,"DOMError")}function l(t){return s(t,"DOMException")}function c(t){return s(t,"String")}function u(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function h(t){return s(t,"Object")}function d(t){return"undefined"!=typeof Event&&g(t,Event)}function f(t){return"undefined"!=typeof Element&&g(t,Element)}function _(t){return s(t,"RegExp")}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function m(t){return h(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t){return"number"==typeof t&&t!=t}function g(t,e){try{return t instanceof e}catch(t){return!1}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return _})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return o})),n.d(e,"h",(function(){return h})),n.d(e,"i",(function(){return a})),n.d(e,"j",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return m}));const i=Object.prototype.toString;function r(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(t,Error)}}function s(t,e){return i.call(t)===`[object ${e}]`}function a(t){return s(t,"String")}function o(t){return null===t||function(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}(t)||"object"!=typeof t&&"function"!=typeof t}function l(t){return s(t,"Object")}function c(t){return"undefined"!=typeof Event&&p(t,Event)}function u(t){return"undefined"!=typeof Element&&p(t,Element)}function h(t){return s(t,"RegExp")}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function f(t){return l(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function _(t){return"number"==typeof t&&t!=t}function p(t,e){try{return t instanceof e}catch(t){return!1}}function m(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var i=n(0);function r(t){if(!t)return;const e=t.getBoundingClientRect();t.style.maxHeight=window.innerHeight-e.top+"px"}function s(){const t=Object(i.useRef)(null),e=Object(i.useCallback)(()=>{r(t.current)},[]);Object(i.useEffect)(()=>(window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]);return Object(i.useCallback)(e=>{t.current=e,r(e)},[])}function a(t){const e=()=>{r(t())};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return o}));var i=n(211),r=n(31),s=n(19),a=n(24);n(46);function o(t,e,n){if(!(e in t))return;const i=t[e],r=n(i);"function"==typeof r&&function(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,l(t,"__sentry_original__",e)}catch(t){}}(r,i),t[e]=r}function l(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){r.a&&a.c.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function c(t){if(Object(s.b)(t))return{message:t.message,name:t.name,stack:t.stack,...h(t)};if(Object(s.c)(t)){const e={type:t.type,target:u(t.target),currentTarget:u(t.currentTarget),...h(t)};return"undefined"!=typeof CustomEvent&&Object(s.d)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function u(t){try{return Object(s.a)(t)?Object(i.a)(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function h(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function d(t){return function t(e,n){if(function(t){if(!Object(s.f)(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(e)){const i=n.get(e);if(void 0!==i)return i;const r={};n.set(e,r);for(const i of Object.keys(e))void 0!==e[i]&&(r[i]=t(e[i],n));return r}if(Array.isArray(e)){const i=n.get(e);if(void 0!==i)return i;const r=[];return n.set(e,r),e.forEach(e=>{r.push(t(e,n))}),r}return e}(t,new Map)}},function(t,e,n){"use strict";(function(t){function i(t){return t&&t.Math==Math?t:void 0}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a}));const r="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof t&&i(t)||function(){return this}()||{};function s(){return r}function a(t,e,n){const i=n||r,s=i.__SENTRY__=i.__SENTRY__||{};return s[t]||(s[t]=e())}}).call(this,n(43))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(44),r=n(64),s=n(38);function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const o={GET:"GET",POST:"POST",PUT:"PUT",DELETE:"DELETE"};e.b=class{constructor(t={},e){a(this,"cacheManager",void 0),a(this,"maestroClient",void 0),a(this,"externalClient",void 0),a(this,"pollingTasks",void 0),a(this,"localStorage",void 0),this.pollingTasks=new Map,this.cacheManager=t.cacheManager||new r.a(t.defaultCacheDuration),this.maestroClient=t.networkClient||new i.a({baseURL:"https://api.maestro.io",retries:3,delay:1e3,backoff:2}),this.externalClient=t.externalNetworkClient||new i.a({baseURL:t.externalBaseURL||"",retries:3,delay:1e3,backoff:2}),this.localStorage=e||"undefined"!=typeof globalThis&&globalThis.localStorage||{length:0,clear:()=>{},getItem:()=>null,key:()=>null,removeItem:()=>{},setItem:()=>{}}}setAuthentication(t,e){this.maestroClient.setAuthentication(t,e)}async withCache(t,e,n){const i=this.cacheManager.produceCacheKey(JSON.stringify({endpoint:t.endpoint,params:t.params,data:null}));if(e){const t=this.cacheManager.getCache(i);if(t)return t}const r=await n();return e&&this.cacheManager.setCache(i,r),r}handleError(t){if(t.response){var e;const n=t.response.status,i=(null===(e=t.response.data)||void 0===e?void 0:e.message)||t.message;throw 401===n||403===n?new s.a(n,i,t.response.data):404===n?new s.d(i):n>=500?new s.e(n,i):new s.b(n,i)}throw t.request?new s.c("Network request failed"):t}async maestroApiRequest({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,maestroDefaultHeaders:a=null,skipResponseBodyDeserialization:l=!1}){const c={"x-maestro-maestro-kit-flavor":"MaestroKit_Web",...r};a&&(c["x-maestro-client-id"]=a.siteId,c.Authorization="Bearer "+a.jwt,c["Content-type"]="application/json");const u=e===o.GET&&s,h=async()=>{let r;if(e===o.GET)r=await this.maestroClient.get(t,n,c);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);r=await this.maestroClient.post(t,i)}return l&&!r&&(r={}),r};try{return await this.withCache({endpoint:t,params:n},u,h)}catch(t){return this.handleError(t)}}async externalApiRequest({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,skipResponseBodyDeserialization:a=!1}){const l=e===o.GET&&s,c=async()=>{let s;if(e===o.GET)s=await this.externalClient.get(t,n,r);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);s=await this.externalClient.post(t,i,n,r)}return a&&!s&&(s={}),s};try{return await this.withCache({endpoint:t,params:n},l,c)}catch(t){return this.handleError(t)}}async externalApiRequestWithHeaders({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,skipResponseBodyDeserialization:a=!1}){const l=e===o.GET&&s,c=this.cacheManager.produceCacheKey(JSON.stringify({endpoint:t,params:n,data:null}));if(l){const t=this.cacheManager.getCache(c);if(t)return{data:t,headers:{}}}try{let s;if(e===o.GET)s=await this.externalClient.getWithHeaders(t,n,r);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);s=await this.externalClient.postWithHeaders(t,i,n,r)}return a&&!s.data&&(s.data={}),l&&this.cacheManager.setCache(c,s.data),s}catch(t){return this.handleError(t)}}pollMaestroApiRequest({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},maestroDefaultHeaders:a=null,skipResponseBodyDeserialization:l=!1,onData:c,onError:u}){const h=`${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var d;this.pollingTasks.has(h)&&(null===(d=this.pollingTasks.get(h))||void 0===d||d.controller.abort(),this.pollingTasks.delete(h));const f=new AbortController,_=f.signal;return(async()=>{for(;!_.aborted;){try{const e=await this.maestroApiRequest({endpoint:t,method:n,params:i,data:r,headers:s,maestroDefaultHeaders:a,skipResponseBodyDeserialization:l,useCache:!1});c(e)}catch(t){u&&u(t)}_.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(h,{controller:f,interval:e}),{stop:()=>{var t;this.pollingTasks.has(h)&&(null===(t=this.pollingTasks.get(h))||void 0===t||t.controller.abort(),this.pollingTasks.delete(h))}}}pollExternalApiRequest({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},skipResponseBodyDeserialization:a=!1,onData:l,onError:c}){const u=`external-${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var h;this.pollingTasks.has(u)&&(null===(h=this.pollingTasks.get(u))||void 0===h||h.controller.abort(),this.pollingTasks.delete(u));const d=new AbortController,f=d.signal;return(async()=>{for(;!f.aborted;){try{const e=await this.externalApiRequest({endpoint:t,method:n,params:i,data:r,headers:s,skipResponseBodyDeserialization:a,useCache:!1});l(e)}catch(t){c&&c(t)}f.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(u,{controller:d,interval:e}),{stop:()=>{var t;this.pollingTasks.has(u)&&(null===(t=this.pollingTasks.get(u))||void 0===t||t.controller.abort(),this.pollingTasks.delete(u))}}}pollExternalApiRequestWithHeaders({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},skipResponseBodyDeserialization:a=!1,onData:l,onError:c}){const u=`external-headers-${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var h;this.pollingTasks.has(u)&&(null===(h=this.pollingTasks.get(u))||void 0===h||h.controller.abort(),this.pollingTasks.delete(u));const d=new AbortController,f=d.signal;return(async()=>{for(;!f.aborted;){try{const e=await this.externalApiRequestWithHeaders({endpoint:t,method:n,params:i,data:r,headers:s,skipResponseBodyDeserialization:a,useCache:!1});l(e)}catch(t){c&&c(t)}f.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(u,{controller:d,interval:e}),{stop:()=>{var t;this.pollingTasks.has(u)&&(null===(t=this.pollingTasks.get(u))||void 0===t||t.controller.abort(),this.pollingTasks.delete(u))}}}stopAllPolling(){for(const[t,{controller:e}]of this.pollingTasks.entries())e.abort(),this.pollingTasks.delete(t)}clearAllCache(){const t=this.localStorage.length;for(let e=0;e<t;e++){const t=this.localStorage.key(e);t&&t.startsWith("maestro-cache-")&&this.localStorage.removeItem(t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return a}));var i=n(31),r=n(14);const s=["debug","info","warn","error","log","assert","trace"],a={};function o(t){if(!("console"in r.a))return t();const e=r.a.console,n={},i=Object.keys(a);i.forEach(t=>{const i=a[t];n[t]=e[t],e[t]=i});try{return t()}finally{i.forEach(t=>{e[t]=n[t]})}}const l=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return i.a?s.forEach(n=>{e[n]=(...e)=>{t&&o(()=>{r.a.console[n](`Sentry Logger [${n}]:`,...e)})}}):s.forEach(t=>{e[t]=()=>{}}),e}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s}));var i=n(6);const r=(t,e,n)=>{try{const i=new URL(t);if("static-media.fox.com"!==i.hostname)return t;const r=i.searchParams.has("fit"),s=i.searchParams.has("downsize");return r||s?t:(i.searchParams.set("downsize",`${e}:${n}`),i.toString())}catch(e){return Object(i.a)("url","applyFoxCdnImageResize",e),t}},s=(t,e,n)=>{try{const i=new URL(t);return i.searchParams.set("w",e.toString()),i.searchParams.set("h",n.toString()),i.toString()}catch(e){return Object(i.a)("url","setImageDimensions",e),t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(8);function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class s{constructor(){r(this,"_isLoading",new i.a(!1)),r(this,"_error",new i.a(null))}get isLoading(){return this._isLoading}get error(){return this._error}setLoading(t){this._isLoading.value=t}setError(t){this._error.value=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return u}));var i=n(205),r=n(18),s=n(40);function a(t,e,n){if(!(e in t))return;const i=t[e],r=n(i);if("function"==typeof r)try{l(r,i)}catch(t){}t[e]=r}function o(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function l(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,o(t,"__sentry_original__",e)}function c(t){return t.__sentry_original__}function u(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function h(t){if(Object(r.d)(t))return{message:t.message,name:t.name,stack:t.stack,...f(t)};if(Object(r.f)(t)){const e={type:t.type,target:d(t.target),currentTarget:d(t.currentTarget),...f(t)};return"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function d(t){try{return Object(r.c)(t)?Object(i.c)(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function f(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function _(t,e=40){const n=Object.keys(h(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(s.d)(n[0],e);for(let t=n.length;t>0;t--){const i=n.slice(0,t).join(", ");if(!(i.length>e))return t===n.length?i:Object(s.d)(i,e)}return""}function p(t){return function t(e,n){if(Object(r.i)(e)){const i=n.get(e);if(void 0!==i)return i;const r={};n.set(e,r);for(const i of Object.keys(e))void 0!==e[i]&&(r[i]=t(e[i],n));return r}if(Array.isArray(e)){const i=n.get(e);if(void 0!==i)return i;const r=[];return n.set(e,r),e.forEach(e=>{r.push(t(e,n))}),r}return e}(t,new Map)}},function(t,e,n){"use strict";var i,r=n(189),s=Object.prototype.toString,a=(i=Object.create(null),function(t){var e=s.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())});function o(t){return t=t.toLowerCase(),function(e){return a(e)===t}}function l(t){return Array.isArray(t)}function c(t){return void 0===t}var u=o("ArrayBuffer");function h(t){return null!==t&&"object"==typeof t}function d(t){if("object"!==a(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var f=o("Date"),_=o("File"),p=o("Blob"),m=o("FileList");function v(t){return"[object Function]"===s.call(t)}var g=o("URLSearchParams");function A(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),l(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}var b,y=(b="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return b&&t instanceof b});t.exports={isArray:l,isArrayBuffer:u,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return t&&("function"==typeof FormData&&t instanceof FormData||"[object FormData]"===s.call(t)||v(t.toString)&&"[object FormData]"===t.toString())},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&u(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:h,isPlainObject:d,isUndefined:c,isDate:f,isFile:_,isBlob:p,isFunction:v,isStream:function(t){return h(t)&&v(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:A,merge:function t(){var e={};function n(n,i){d(e[i])&&d(n)?e[i]=t(e[i],n):d(n)?e[i]=t({},n):l(n)?e[i]=n.slice():e[i]=n}for(var i=0,r=arguments.length;i<r;i++)A(arguments[i],n);return e},extend:function(t,e,n){return A(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,n,i){t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)},toFlatObject:function(t,e,n){var i,r,s,a={};e=e||{};do{for(r=(i=Object.getOwnPropertyNames(t)).length;r-- >0;)a[s=i[r]]||(e[s]=t[s],a[s]=!0);t=Object.getPrototypeOf(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:o,endsWith:function(t,e,n){t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;var i=t.indexOf(e,n);return-1!==i&&i===n},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var n=new Array(e);e-- >0;)n[e]=t[e];return n},isTypedArray:y,isFileList:m}},function(t){t.exports=JSON.parse('{"name":"@maestro_io/maestro-web-sdk","private":false,"version":"6.0.2","type":"commonjs","license":"MIT","main":"dist/maestro-web-sdk.umd.js","module":"dist/maestro-web-sdk.esm.js","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/maestro-web-sdk.esm.js","require":"./dist/maestro-web-sdk.umd.js","default":"./dist/maestro-web-sdk.esm.js"}},"sideEffects":["*.css"],"engines":{"node":">=22"},"scripts":{"dev":"nodemon","sdk-only":"webpack-dev-server --config webpack/webpack.dev.js","lint":"eslint src --ext .ts,.tsx --ignore-pattern \'**/*.test.*\'","test":"jest","build":"webpack --config webpack/webpack.prod.js && tsc --emitDeclarationOnly --declarationDir dist/types && dts-bundle --name @maestro_io/maestro-web-sdk --main dist/types/src/index.d.ts --out ../../index.d.ts && rm -rf dist/types","types":"tsc -b","analyze":"ANALYZE=true webpack --config webpack/webpack.prod.js","format":"prettier --write .","format:check":"prettier --check ."},"devDependencies":{"@babel/core":"7.12.3","@babel/plugin-proposal-class-properties":"7.12.1","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"7.12.1","@babel/preset-react":"7.12.1","@babel/preset-typescript":"7.12.1","@lessthan3/maestro-fox-domain":"4.0.20-218","@types/enzyme-adapter-react-16":"^1.0.6","@types/jest":"24.0.25","@types/node":"^22.0.0","@types/prop-types":"^15.7.10","@types/react":"16.14.34","@types/react-dom":"16.9.18","@typescript-eslint/eslint-plugin":"2.34.0","@typescript-eslint/parser":"2.34.0","babel-jest":"26.6.3","babel-loader":"8","css-loader":"5","dts-bundle":"^0.7.3","dotenv":"^16.6.1","enzyme":"3.11.0","enzyme-adapter-react-16":"1.15.7","eslint":"6.8.0","eslint-config-prettier":"6.0.0","eslint-plugin-react":"7.20.0","file-loader":"^6.2.0","globals":"^10","html-webpack-plugin":"4","husky":"^6.0.0","identity-obj-proxy":"^3.0.0","jest":"26.6.3","nodemon":"^3.1.9","prettier":"2.0.5","react":"16.14.0","react-dom":"16.14.0","react-test-renderer":"16.14.0","style-loader":"2","tsconfig-paths-webpack-plugin":"^4.2.0","typescript":"^4","webpack":"4","webpack-bundle-analyzer":"3.9.0","webpack-cli":"3.3.12","webpack-dev-server":"3.11.2"},"dependencies":{"@rive-app/webgl2":"^2","@sentry/browser":"7.68.0","axios":"^0.27.2","firebase":"^11.1.0","prop-types":"15.8.1"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","react-dom":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"resolutions":{"sockjs-client":"1.5.1","cheerio":"0.22.0","@sentry/replay":"0.6.14"}}')},function(t,e,n){"use strict";var i=n(53).a,r=n(1),s=n.n(r),a=n(83),o={insert:"head",singleton:!1},l=(s()(a.a,o),a.a.locals,n(328)),c=n(0),u=n.n(c);function h(){return(h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}class d extends u.a.Component{render(){const{children:t,focused:e,focusKey:n,parentFocusKey:r,preferredChildFocusKey:s,forgetLastFocusedChild:a,trackChildren:o,autoRestoreFocus:l,blockNavigationOut:c,hasFocusedChild:d,focusable:f,onEnterPress:_,onEnterRelease:p,onBackPress:m,onArrowPress:v,onBecameFocused:g,onBecameBlurred:A,realFocusKey:b,setFocus:y,navigateByDirection:w,stealFocus:E,onUpdateFocus:k,onUpdateHasFocusedChild:C,...x}=this.props;return u.a.createElement(i,h({className:"action-button T05_ALT"},x),t)}}var f=Object(l.a)()(d);e.a=f},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},function(t,e,n){"use strict";var i=n(7),r=n(0),s=n.n(r);function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l extends s.a.Component{constructor(t){super(t),o(this,"mounted",!1),o(this,"state",{loaded:!1}),o(this,"onLoad",()=>{this.mounted&&this.setState({loaded:!0})}),this.state={loaded:!1}}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}render(){return s.a.createElement(s.a.Fragment,null,!this.state.loaded&&s.a.createElement(i.a,a({crossOrigin:"anonymous"},this.props,{src:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCACQALgDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+O4tkcn0/z79ev/161Mg3dv8AD64/rjp3oAC3b3+n6e/8+negAB/z/Prn/DgUAG736cflyP5Z/CgA3Hpn/wDWOf65/WgYBvQ+n6H+eR396BBuzjnn6/55Geo+vU5oANxznPIoANx9cf8A18/j3Iz160AG73H8vftjsPy+goAM/wCfzx/9b/8AXQAu7/Pv0z9ff3+mABM/5/8Arfl9KAFLHue3+eP89u4FACbj69P0HP5D/PWgAzznJ57/AP16ADd/n36c9s9j6980ALuOePXOP8849B0oATJ9enT24oACxHOfT/Ae3f8AzzQAbvU/rj6D/wCsPwoAMn8+vv8AX/HrQBX3fTpj19c9Tx0IP/1qBgW9+vX3/wA/yoEG70PX16/rz2/HFAxSx554znr+X5f0oEJn8x+f/wCr6UDDceuen/6v6UCDd/8AX/n29eD6/SgYbvc/X8uc+nA60ALuPr0/z/kdKADcT39vw/r7fn1OaAE3HjnpjH8vzoEG737d+Tzx9aBiZ/l9OPfpwP8APagQu7pz7cH05oGLvP8AnOfXHXI46j6d6AE3die2Ov4/p/n1oAN2O/4E/U+vPP8AKgA3YPXB6/59aADcfX8vp7e39fegA3c8n9cHP/6qADd1Pr1/qP06fhQIN2e/t/n/AD9epyALuP8An/PrzmgZW3H1/wA//qoAM5/Hn/Pbv9fSgQm739Md/Tt/n8qBjtx/yAP88UtNQ/r+rCZ9/wDPt+fb29qYBu9/19un0PUj0HXvQAbj1z/nP9O/4+9AC7++eOvtx69Py9e1ABuOMf5GPf8AxoA77RfCayxR3Wps+JAHS0RihCHlfPcfMCw5MabWUYDODuRQR2cGm6fagCCzt48dGESmT8ZGBkY+7MTQBbeNJBtdEdem11DD06EEUAYd74a0m8BP2cW0hHElriLBznmMAwtz1zHk88gnNAzgdX8O3ulAzA/arQHHnxgq0YPQTR/N5YyMB1LR5xllZlWgDnN3p/nj3/DP4UAG7/OPxxj36460CDd05/Dt6/rj8aBhu568/wCf8KAF3f5P6f047mj+tgE3f5+vr6/4HnjFABuzznOefr/nOPb8BQAZz/n/ABoAN3/1vz7fyx+lAEG4+v8An+nXHHFABuP6f4/55oATcfX/AD0/rQAbsd+n+fx6fjjHajQA3f4+3H+f50AG7oO/Pr/kUABP+fr/AJHWgBdx9f8APOP5/nR/X9fcB23hDRUvZH1G6USQ28gjgiYZWScBXLsDwViBTavIZ25xsIYC56jQIKACgAoAayq6srAMrAqysAQykYIIPBBBwQeCKAPFvEWmjStSlhjVhbSbZ7XIJAR/vRhj18qQMnUnYEZjk0DMLdjvyfb0oAXcev8A9b/Pt+fWgPxE3H1/z/j/AJ70AGeB+Yo/UA3Z6H8v88ZoAXcRzn/PvQAm/wBwPp/P/wCv29uy0D+v6/r8w3Ed/wDPvTD+u5X3Y+n/AOruMfh2pf1/XyAXd/n3/Xrjkd6P6/r+rgJu9/1P1ph8g3H1/L/Ofr/9agA3e/6/57/rQGobvfHX8c+/f8aA8hd/8vT0/wDrnjt+FL+v6/rzATPX9aYX/r+r9z3Tw7YjT9ItIiMSSxi5n9fNnAcqR28tNkX/AADPJJJANygQUAFABQAUAYmv6UmradLDj/SI1aW1fHzLMqnCZ/uTAeW46chsbkXAB4USfp/Tn9KWgw3ev+f8/n+Zo0D+vv8A6/rcXcfX/J7f/q/wo0ATd/L9O3+fr2p6AG457/y//V/jR/WoBn/D/wDXil/Xp94XDd7++c/5/wAj0p6BqLuPqaWgFfd3z/n8aNAE3H3/AM9x/j6e1GnoH+Qu4nP5/wA+9MA3c+4+v8/z6YpAJuPr/np+f8u1GgBuz6f/AK/85/8ArUABbn/P+effr0o/HUCxap591bQnpNPDEevSSRUPA5PXH8u1H9f1+If1/X9aH0eBjgcAcADtTELQAUAFABQAUANYkKxUbmCkhem4gcDPueKAPmtpCzMzYyxLEehJJ4HUAc4FLqNDd34c8+v09Pw6Uaf1/X4gG739vT/Pb/OKNA/r5i7un9P8+5+maNg+QmfwpgG4+v8An29/15paB/X9f8EXceuaNAE3H1P+f8/pRoBBuPr7f57/AOfSjQBN34n/AD9D059fSjQP6/q39feG7tx/nPH8/wAelGgBu/z+n8/1o/r9WHqG7/J/+v8AT8KNP60DUN3H+foP8/1oHcXdx1/z/X/OKNBE9pP9nurWYn5YbiGU/SORG+vReMfhQB9LgggEHIPII5BB6EGmIWgAoAKACgAoAQkAEk4ABJJ6ADkk/SgD5kmkV5ZXUbVeR3VfRWbIGBwMAjpSK16f1/WozcfX/Pr9ffrRp/X9fkINx/z/AJ/KjQLibs9+v+f6fpQFxd3+f8/Sj+vmO/8AX9f1+IFj74+uf89aP67CDefX8/8AP8/ejToAm73/AM9KBkG7/OP8/wD1+/agP63/AK/rQTefX6f5/wA/kaNNf6/r+uwg3H1/yf8AGj+vu/r/ADC/9foKW/z/AJ6f0/KjTT+v6/q4f1/Wv/BDd/k+/b6f59KNBhux6fTtRp/XmFw3Z/P/AD+P+PFH/B/r+vzDb+v6/wCHOk8KaXBrOrpaXQdrdYJ55VjfYxCKqL8w5A8yVOnJ6dM0aC6HvdrCba3gt97SeREkKyN990jUIjPjgyFAN7AAM+5gqghQxFigAoAKACgAoAr3UH2m2nt/MaITxPC0iAF0SRSjlM8B9pOxiGCthirAbSAeB+KtKh0bV5LS23i3aGGeISNvcLIpRwWwNw82OTBPIBxzjNIdzm93T/P+evejQf8AX9f1+Iu70/z/APX4oD+v6+8TP+f89KP6/wCHF/X/AAwbv0/n2/8Arf8A6qNB3At15o0F8v6/4cXf2z/k/wCTiiw/kG78P5f5H0o6Bf8Ar7itmjQLilv/AK/+etH9ff8AMX9eX9f8AN35f/r74o03H/X9bibv8f8AP1/X8KNA/rzDd6/55o0/r+vmAbv8/rRoFw3flz/hRp/X9f16hc9E+GpB1q7B+9/Zc2Pcfa7Mt+u3rz1x3o6iPbKYgoAKACgAoAKACgDxH4kkDXLXHB/sqAn/AMC73H48c57AUmNHnu7tn8v8/n/jRoP+v6/r/gGfejQLi7j60aB/X9fqJu9Sfzo0C/l+P/AF3Hv09/8AP+frRp/wwX8ugm7v+f8An/PPvRp/X5Brp/W4u71/z/npQBW3++KAf9fl/X9MXcfyoC/9f1YN/P8An/P/AOr2oDtp/X9dbBu/n/8Ar/lRp/Xb+tg+Qbvx/wA/jRoF/L9P63DcfX/J/pRp/X9bgG7/AD/n1o03C52XgK9S18SWiu2xbyKe0yem+RPMiUn/AG5YY0A/vsKEwZ9C0yQoAKACgAoAKACgD558eXyXfiS7VGDLZpDZgggjfEu+Zep5SeSRGHGGUgj1Xf8Ar+upS06f8McduP8ASloH9f18hC3v/n/P609A/r+t+n9MUPjv/WjT+v6/rQPUN35/5z1o0+QCbv8AP50aBf8Ar+v+GF3H/P8An3o0C4bv8/59qPw/rQCvu7f4/l19T/Klp/X9f8AP6/r+thN2Oh/SndB/Wwu73/X/AD9KV0H9f1/XmJu/z/n/ADij/MLsXd/nt6Yx+lAX8v6/rqG7/P8An0/SjT+v60C4Bv8AP/16en/AC4qyMjK6MUdSGVlbayspDBlYYIYEAhhggjINHYL+R6n4O8Zavd61Z6dql8Z7W4SWGPfDbq3niMvCXmSJZXLFDGNznc8i7snBBcT8j2umIKACgAoAKAPFfGHjTV7PWb3TtLvfItrdYoHKwwO/nmMNPslkiaRCrP5eVIKvGWQjOaLjPK2kZ2Z3dmd2LM7MWZmbkszE5ZmJyWJJJOSc0h/10G7v8e1Gn9f1/wAEL+X9eX9ai7v85+vv/n6ZpBcTd7/j/jj2p6Bf/gff26i7v8+/r+n09qWn9f1YNf6/rzDd+HP+f8+9GgXDd/L/AD7UBt0/4cTf74H+e/6UAV93v/n+VGgf15hu/n/9Y/nRdB/X3f5i7vf/AD/n/PoaBf8Ar+v68uxux+v/ANf8KNAv/X9f8OG7/H8aNPwC/wDX9XDf0/z/APX/AF+tAeQbu3v/AJ5o0C/+Wv8AX+YbuO9A7/f/AF/X5m/4Vfb4k0Q5xnUrRf8AvqUJjnPXOB/k00J/1/XmfVFMkKACgAoAKAPlXxRIW8R652xql6vXP3J3X+gI9BxzS0/r7ijC3e9LQL7Buxij+v68wv27Cbvfp/8Aro+QC7vwo0C/kG40f1/X9feFw3elH9f1/XULhu/+t0oC/r/XcN3H+fT/AD/WjT+v1C/3/wBP8yvu/wA8f5/z9KLhcN2OPz/H9KNAuG7vn8fr/n/PWjQP6/r+vIN3+fxouh6Bv9/8/wA/89aBBu/z/n6//Wo0DTsG7/PPaj7h3/r+ugbvU9ef84oF9/8Al5HQeFBv8S6EOf8AkKWbdR/BMr9+3y8jqRwOaYX8j6vpkhQAUAFABQB8neKsr4k11WHP9q3zfg9w7r+akEfXip6lf1/X6mDu/XrRoF9tv8g3etGnYExN2P8AP0ov/X9f5hf+v6Qu7/P9KNAv5XE3fh/+rn/PSj+v6/r5hf8Ary/ryFDf596P66h/X9f8OG7/AD+nb0/xo0/r+uof1/X6ib+/9OvH+f50B/X9P1/4cg3f0/z/ACoVgv5Cbz7/AP1v8/56UB8hd3v+v+fw6UB8vw/roJu6fT1/z60f1/X9dB/IN3f9f8P/AK1H9f0gF3e9HUX9f1cN/v8A5x0o0/UPl5irudgigszEKqqNzMxOAoUZJJPAA5J4FAX/AK/zPZfB/wAPdbsdU0zWNRa0tobdzcNaeZJJebjC4jRkWLyEId1L/vyyAMNu4Yqgb/r5nuNBIUAFABQAUAeGeL/h7rl5qmp6vp5tLmC4c3K2qyOl5u8tfMRY3iELsXU7Ns+58gbQxxSKTPGySpKkFWBIKkEEEcEEcEEdCCMjvSuguG7n/P8An/PWi4XDd7/T/P8An+lAw3//AFv/AK30/wAaBBu/Pp/WjQd/IN+e/wDn/Io/r+v68g+Qbv8AP5Yo0F+AbvX/AD3o0D+tivu9D7/5/LjtQP8Ay6/1uG76/j/n3oC6Ddnv/n/P/wCv1AE3f59qLiuG7/PH+fSgdySJJJpEigjkmlkYIkUaNJJIx6KqIC7MT/CASaAuekaH8MNe1MJNqGzR7ViCRcAyXroepW0Ujyzxgi5lgcHBEbCnYVz2HRPAfh3Q2imitWvLyIhlvL5hPIrjBDRRAJbRFGGY3SHzV4JlYgGnYR2dAgoAKACgAoAKACgDidc8AeHdcaSd7d7G9lJZ7uxYRNI5YszSwsHt5WdiTI5iEz55lFFh3PH9c+GPiDTN0tgE1m2GebVSl4qgZy9o7EsT0AtpbhieqqDSsO55xIJInaOZHjkjYo8cisjo6nBVkYBlYHgggEHORUh8hu7+f+e/5U9B6Bv/AM/5557/AI0v6/roL+v66BuPt9P1/P8AWmP+vl/XQN3+fTvQIN3v2xQPQr7v/wBX+fpRcLhu9evHv6/WgP6/r/hxN34/5/z0oC/9f1/w5e0/T9Q1WcW2m2dxeznkpbxNIVH96QgbY055eQqg7sM0fIL/ANf1/X6euaD8Iruby5/EF4trEQGaxsystyf9iW5Ia3hPXPki54OA6nkOwrnsWj+G9F0GIR6ZYQwNjDXBXzLuTPXzLmTdMQeuwMI1yQiKOKYjcoEFABQAUAFABQAUAFABQAUAFAGBrXhnRPEEZTU7GKWTbtS6QeVeRY+75dymJNqnny3Lwk/fjYcUDvY8c174R39v5k+gXa30Iyy2V2VhvFA6JHPhbadveQWnHHzHqrdh3PJr6wvtLuGtdQtLizuF5MVxE8bEdAy7gA6H+F0LI3VWIpev9f1/THdf1/X9eRS3f45/z/k0Bfy/r/gChv8AP4H/ABzRcPz/AK/rUN359/50XC+xX3e/+f0pBdCbvf05/wA9v8igD1zwN8N5dbji1bW/MttKfElrbITHc365BEjNjMFm4+66kTTqd0JjjKTPSXcTf9bn0Np+m2GlW62unWcFnboABHBGqAkcbnYfNI56tJIzOxJLMSSaYi9QIKACgAoAKACgAoAKACgAoAKACgAoAKACgChqGmafqtu1rqVnb3tuwP7ueNX2kjG+Nj88UgH3ZImSRTyrAjNAHzt46+HM2gpJqujmW60kZa4hfL3GnA8b2Ycz2vYykeZCP9duXM1S12KTPKN3+f8APP8An3oGJu9/8/596Xy/r8A/r+kQbvf/ADxRcNP6X6HoPw58KjxPrYe6TdpWmCO6vRj5bh2Y/ZrI9eLhkdpeObeGZAyO6MGtfkDZ9aKqoqoiqiIoVEUBVVVGFVVGAqqAAAAAAMCqIHUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFADWVXVkdVdHUq6MAysrDDKynIZWBIIIIIODxQB8k/ETwuPDGuH7MpGmakr3ViAPlhw/+kWYPf7O7IU/6YSwhizbyZenoUn/XyOA3/j3/AM/5/KkPRAD/2Q==",alt:"Player Headshot Loading"})),s.a.createElement(i.a,a({crossOrigin:"anonymous",onLoad:this.onLoad,alt:"Athlete Thumbnail",style:{...this.props.style||{},display:this.state.loaded?"block":"none"}},this.props)))}}var c=l;e.a=c},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));var i=n(4);class r{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}
282
+ function et(t){return t&&t._delegate?t._delegate:t}}).call(this,n(43),n(61))},function(t,e,n){"use strict";n.r(e),n.d(e,"PanelEvent",(function(){})),n.d(e,"IMaestroEventDelegate",(function(){})),n.d(e,"IMaestroEvent",(function(){return f.a})),n.d(e,"IMaestroKeyPlaysResponse",(function(){return ee.a})),n.d(e,"MaestroPanelType",(function(){return A.a})),n.d(e,"SDKEventConfigParams",(function(){return h.SDKEventConfigParams})),n.d(e,"SDKStopEventParams",(function(){return h.SDKStopEventParams})),n.d(e,"StartClientFocusManagementParams",(function(){})),n.d(e,"StartSDKFocusManagementParams",(function(){return d.StartSDKFocusManagementParams})),n.d(e,"OverlayData",(function(){return d.OverlayData})),n.d(e,"OverlayEvent",(function(){}));var i=n(0),r=n.n(i),s=n(65),a=n.n(s);function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var l=class{constructor(){o(this,"renderersMap",new Map)}async renderOverlay(t){if(this.renderersMap.has(t)){this.renderersMap.get(t).unmount(),this.renderersMap.delete(t)}const e=await this.getRenderer(t),i=n(200).default,s=n(283).default;return e.render(r.a.createElement(i,null,r.a.createElement(s,null))),()=>{this.renderersMap.has(t)&&this.renderersMap.get(t)===e&&(e.unmount(),this.renderersMap.delete(t))}}async renderPanel(t){if(this.renderersMap.has(t)){this.renderersMap.get(t).unmount(),this.renderersMap.delete(t)}const e=await this.getRenderer(t),i=n(200).default,s=n(282).default;return e.render(r.a.createElement(i,null,r.a.createElement(s,null))),()=>{this.renderersMap.has(t)&&this.renderersMap.get(t)===e&&(e.unmount(),this.renderersMap.delete(t))}}async getRenderer(t){if(this.renderersMap.has(t))return this.renderersMap.get(t);const e=document.getElementById(t);if(!e)throw new Error(`Element with id ${t} not found`);const n=a.a;let i="function"==typeof n.createRoot?n.createRoot:null;if(i||(i=await async function(){try{const{createRoot:t}=await import("react-dom/client");return"function"==typeof t?t:null}catch{return null}}()),i){const n=i(e),r={render:t=>{n.render(t)},unmount:()=>{n.unmount(),e.innerHTML=""}};return this.renderersMap.set(t,r),r}if("function"==typeof n.render){const i={render:t=>{n.render(t,e)},unmount:()=>{"function"==typeof n.unmountComponentAtNode&&n.unmountComponentAtNode(e),e.innerHTML=""}};return this.renderersMap.set(t,i),i}throw new Error("Maestro Web SDK: No supported ReactDOM API found. Use React 18+ with react-dom (createRoot on ReactDOM or react-dom/client), or ensure react-dom/client resolves in your bundler.")}};const c=!0,u=!1;var h=n(69),d=n(60),f=n.n(d),_=n(8),p=n(6),m=n(26),v=n(54);const g={panels:{bets:{hidePanel:!1,hideWagers:!1},stats:{hidePanel:!1},keyPlays:{hidePanel:!1},fantasy:{hidePanel:!1}}};var A=n(15);function b(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const y={[A.a.ESPN_BETS]:"bets",[A.a.ESPN_STATS]:"stats",[A.a.ESPN_KEY_PLAYS]:"keyPlays",[A.a.ESPN_FANTASY]:"fantasy",[A.a.ESPN_SHOP]:"shop"};class w{constructor(){b(this,"_settings",void 0),this._settings=new _.a(g)}static getInstance(){return w.instance||(w.instance=new w),w.instance}get settings(){return this._settings}getCurrentSettings(){return this._settings.value}updateSettings(t){if(!this.validateSettings(t))return void console.warn("Invalid user settings provided, using default setting");const e=this.mergeSettings(this._settings.value,t);this._settings.value=e}getPanelSettings(t){var e;return null===(e=this._settings.value.panels)||void 0===e?void 0:e[t]}isPanelHidden(t){const e=this.mapPanelTypeToSettingsKey(t);if(!e)return!1;const n=this.getPanelSettings(e);return!0===(null==n?void 0:n.hidePanel)}shouldHideWagers(){const t=this.getPanelSettings("bets");return!0===(null==t?void 0:t.hideWagers)}resetToDefaults(){this._settings.value=g}validateSettings(t){if(!t||"object"!=typeof t)return!1;if(t.panels&&"object"!=typeof t.panels)return!1;if(t.panels)for(const[e,n]of Object.entries(t.panels)){if(n&&"object"!=typeof n)return!1;if(n)for(const[t,i]of Object.entries(n))if(void 0!==i&&"boolean"!=typeof i)return console.warn(`Invalid setting value for ${e}.${t}: expected boolean, got ${typeof i}`),!1}return!0}mergeSettings(t,e){const n={panels:{...t.panels}};if(e.panels)for(const[t,i]of Object.entries(e.panels))if(i){const e={...n.panels[t]};for(const[t,n]of Object.entries(i))void 0!==n&&(e[t]=n);n.panels[t]=e}return n}mapPanelTypeToSettingsKey(t){return t in y?y[t]:null}}function E(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function k(t){var e,n;return!1!==(null===(e=t.renderer)||void 0===e||null===(n=e.supported_platforms)||void 0===n?void 0:n.bbd)}function C(t,e){const n=e.reduce((t,e)=>t.concat(e.panels||[]),[]).filter(e=>e.panel_type===t);return 0!==n.length&&n.some(k)}function x(t,e){for(const n of e)for(const e of n.panels||[])if(e.panel_type===t&&k(e))return e.panel_name||"";return""}b(w,"instance",void 0);class B{getAvailablePanelsFromConfig(){const t=ge.getPageConfigs(),e=new Set,n=[];for(const i of t)if(i&&Array.isArray(i.panels)&&0!==i.panels.length)for(const r of i.panels){const i=r.panel_type;i&&Object.values(A.a).includes(i)&&(e.has(i)||C(i,t)&&(e.add(i),n.push({type:i,title:x(i,t)})))}return this.sortPanelsByOrder(n,t)}resolvePanelOrders(t){const e=new Map;for(const n of t)if(n&&Array.isArray(n.panels))for(const t of n.panels){const n=t.panel_type;if(!n||"number"!=typeof t.order)continue;const i=e.get(n);(void 0===i||t.order<i)&&e.set(n,t.order)}return e}sortPanelsByOrder(t,e){const n=this.resolvePanelOrders(e);return t.map((t,e)=>({panel:t,index:e,order:n.get(t.type)})).sort((t,e)=>void 0!==t.order&&void 0!==e.order?t.order-e.order||t.index-e.index:void 0!==t.order?-1:void 0!==e.order?1:t.index-e.index).map(t=>t.panel)}constructor(){E(this,"_panels",new _.a([])),E(this,"_currentPanel",new _.a(null)),E(this,"_panelWidth",new _.a(0)),E(this,"settingsManager",void 0),E(this,"settingsUnsubscribe",null),this.settingsManager=w.getInstance(),this.setPanels(),this.subscribeToSettingsChanges()}setPanels(){const t=this.filterPanels(),e=ge.getIsProdEnv();t.length||e?this._panels.value=t:this._panels.value=[{type:"helloWorld",title:"HELLO WORLD"}],this.updateActivePanel()}subscribeToSettingsChanges(){this.settingsUnsubscribe=this.settingsManager.settings.subscribe(()=>{this.setPanels()})}filterPanels(){return this.getAvailablePanelsFromConfig().filter(t=>!this.settingsManager.isPanelHidden(t.type))}updateActivePanel(){!this.currentPanel&&this.panels[0]&&(this.currentPanel=this.panels[0].type),this.panels.length>0&&this._currentPanel.value&&!this.panels.find(t=>t.type===this._currentPanel.value)&&(this._currentPanel.value=this.panels[0].type)}cleanup(){this.settingsUnsubscribe&&(this.settingsUnsubscribe(),this.settingsUnsubscribe=null),this._panels.value=[],this._currentPanel.value=null,this._panelWidth.value=0}get panels(){return this._panels.value}get panelsObservable(){return this._panels}get currentPanel(){return this._currentPanel.value}set currentPanel(t){this._currentPanel.value=t}get currentPanelObservable(){return this._currentPanel}get panelWidthObservable(){return this._panelWidth}setPanelWidth(t){this._panelWidth.value!==t&&(this._panelWidth.value=t)}setActivePanel(t){t!==this.currentPanel&&void 0!==this.panels.find(e=>e.type===t)&&(this.currentPanel=t,this.updateActivePanel())}getIndex(t){const e=this.panels.findIndex(e=>e.type===t);return-1!==e?e:null}getPanelType(t){var e;return(null===(e=this.panels[t])||void 0===e?void 0:e.type)||null}get panelTypeToLeft(){if(!this.currentPanel)return null;const t=this.getIndex(this.currentPanel);return null===t||0===t?null:this.getPanelType(t-1)}get panelTypeToRight(){if(!this.currentPanel)return null;const t=this.getIndex(this.currentPanel);return null===t||t===this.panels.length-1?null:this.getPanelType(t+1)}getUnlistedPanels(){const t=ge.getPageConfigs(),e=new Set,n=[];for(const i of t)if(i&&Array.isArray(i.panels))for(const t of i.panels)t.panel_type&&!Object.values(A.a).includes(t.panel_type)&&(e.has(t.panel_type)||(e.add(t.panel_type),n.push({type:t.panel_type,title:t.panel_name||""})));return n}}var S=n(44),T=n(23),j=n(50);function q(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class P{constructor(t,e){q(this,"configObservable",new _.a(null)),q(this,"client",void 0),this.client=new T.b({externalNetworkClient:new S.a({backoff:2,baseURL:Object(j.a)(t,e),delay:1e3,retries:5})})}async fetchPageConfigByMetadata(t,e){try{return await this.client.externalApiRequest({endpoint:`/pages/sites/${t}/metadata/${e}.json`})}catch(t){return Object(p.a)("StaticService","fetchPageConfigByMetadata",t),Promise.resolve(null)}}fetchPageConfig({siteId:t,metadataValue:e,pageId:n}){return n?this.fetchPageConfigById(t,n):e?Array.isArray(e)?this.fetchPageConfigsByMetadata(t,e).then(t=>{var e;return null!==(e=t.find(Boolean))&&void 0!==e?e:null}):this.fetchPageConfigByMetadata(t,e):Promise.resolve(null)}fetchPageConfigsByMetadata(t,e){return Promise.all(e.map(e=>this.fetchPageConfigByMetadata(t,e)))}fetchPageConfigsByPageIds(t,e){return Promise.all(e.map(e=>this.fetchPageConfigById(t,e)))}async fetchPageConfigById(t,e){try{return await this.client.externalApiRequest({endpoint:`/pages/sites/${t}/pages/${e}.json`})}catch(t){return Object(p.a)("StaticService","fetchPageConfigById",t),Promise.resolve(null)}}static isPanelAvailable(t,e){var n;return null==t||null===(n=t.panels)||void 0===n?void 0:n.some(t=>{var n,i;return t.panel_type===e&&!1!==(null===(n=t.renderer)||void 0===n||null===(i=n.supported_platforms)||void 0===i?void 0:i.bbd)})}static isPanelAvailableInAny(t,e){return t.some(t=>P.isPanelAvailable(t,e))}pollGlobalConfig(t){const e=24e4+Math.floor(12e4*Math.random());return this.client.pollExternalApiRequest({endpoint:"/config/global.json",interval:e,onData:t,onError:t=>{Object(p.a)("StaticService","pollGlobalConfig",t)}})}}var I=P;function N(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class z{constructor(t){this.delegate=t,N(this,"awaitingHeaderRefresh",!1),N(this,"attempts",0)}setDelegate(t){this.delegate=t}notifyAuthError(t,e="Unauthorized"){this.awaitingHeaderRefresh||this.attempts>=3||(this.attempts+=1,this.awaitingHeaderRefresh=!0,this.delegate.onPanelEvent({type:"general:error",payload:{message:e,code:401,details:t}}))}headersRefreshed(){this.awaitingHeaderRefresh=!1}reset(){this.attempts=0,this.awaitingHeaderRefresh=!1}}var O=n(63),R=n(37);function D(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class M{constructor(){var t,e;D(this,"handle",void 0);const n=null===R.FoxStatsHandle||void 0===R.FoxStatsHandle||null===(t=R.FoxStatsHandle.Companion)||void 0===t||null===(e=t.startStandalone)||void 0===e?void 0:e.call(t);this.handle=null!=n?n:{setConfig:()=>{},updateTimecode:()=>{},updateListings:()=>{},subscribe:()=>{},pause:()=>{},resume:()=>{},retry:()=>{},close:()=>{}}}setConfig(t,e,n,i,r){const s=i&&Object.keys(i).length>0?Object.entries(i).map(([t,e])=>[t,e]):void 0;this.handle.setConfig(t,e,n,s,r)}updateTimecode(t){this.handle.updateTimecode(t)}subscribe(t){this.handle.subscribe(t)}pause(){this.handle.pause()}resume(){this.handle.resume()}retry(){this.handle.retry()}close(){this.handle.close()}}var L=n(16);function F(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function U(t){return null==t.headers||"object"==typeof t.headers&&!Array.isArray(t.headers)&&Object.entries(t.headers).every(([t,e])=>"string"==typeof t&&"string"==typeof e)}class V extends m.a{constructor(t,e){super(),this.eventIds=t,F(this,"isDataLoading",new _.a(!0)),F(this,"statsItems",new _.a([])),F(this,"errorState",new _.a("none")),F(this,"hasEverSuccessfullyLoaded",new _.a(!1)),F(this,"multiEventModeActive",new _.a(!1)),F(this,"isViewingDetails",new _.a(!1)),F(this,"focusRestoreSignal",new _.a(null)),F(this,"pendingFocusRestoreEventId",null),F(this,"handle",null),F(this,"analyticsService",void 0),F(this,"lastStatsHash",null),F(this,"foxPaths",[]),F(this,"hasConfig",!1),F(this,"bifrost",null),F(this,"paused",!1),this.analyticsService=e,this.handle=new M}async onPanelView(){try{await this.analyticsService.panelView(A.a.FOX_STATS)}catch(t){Object(p.a)("FoxStatsViewModel","onPanelView",t)}}onKMPData(t){if(this.isDataLoading.value=t.isLoading,!(t.isError||t.events.length||this.hasEverSuccessfullyLoaded.value||t.isLoading&&this.hasConfig))return this.errorState.value="unpopulatedEvent",void this.setError(null);if(t.isError)return void(this.hasEverSuccessfullyLoaded.value?console.warn("[FoxStatsViewModel] Received error state from KMP adapter after previously successful load. Retaining existing data and error state."):this.errorState.value="tabLoadFailure");if(0===t.events.length){var e;if(this.isViewingDetails.value&&!t.isLoading)this.isViewingDetails.value=!1,this.statsItems.value=[],this.hasEverSuccessfullyLoaded.value=!1,this.lastStatsHash=null,null===(e=this.handle)||void 0===e||e.retry();return}const n=Object(L.b)(JSON.stringify(t.events));if(n!==this.lastStatsHash){if(this.lastStatsHash=n,this.multiEventModeActive.value=t.events.length>1,this.statsItems.value=t.events,this.hasEverSuccessfullyLoaded.value||(this.hasEverSuccessfullyLoaded.value=!0),this.errorState.value&&(this.errorState.value="none"),this.pendingFocusRestoreEventId&&!this.isViewingDetails.value&&t.events.length>1){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}else console.log("[FoxStatsViewModel] Received events from KMP adapter, but they are identical to the current events. Skipping update.")}refresh(t){this.eventIds=[...t],this.lastStatsHash=null,this.bifrost&&this.applyBifrostConfig(this.eventIds,this.bifrost)}openStatsDetailForEvent(t){this.pendingFocusRestoreEventId=t,this.isViewingDetails.value=!0,this.bifrost&&this.applyBifrostConfig([t],this.bifrost)}onUpdatePlayerTimeCode(t){null!=t&&this.handle&&(this.isViewingDetails.value&&(this.lastStatsHash=null),this.handle.updateTimecode(t))}setDataToPanel(t){try{const n=t.bifrostAPIRequest;var e;if(function(t){if(!t||"object"!=typeof t)return!1;const e=t;if("string"!=typeof e.url||""===e.url.trim())return!1;const n=e.paths;if(null==n||"object"!=typeof n)return!1;if(Array.isArray(n))return!(0===n.length||!n.every(t=>Array.isArray(t)&&t.length>=2&&"string"==typeof t[0]&&"string"==typeof t[1]))&&U(e);const i=Object.values(n);return!(0===i.length||!i.every(t=>"string"==typeof t))&&U(e)}(n))this.applyBifrostConfig(this.eventIds,n),this.bifrost=n,this.foxPaths=n.paths,this.hasConfig=!0,"unpopulatedEvent"===this.errorState.value&&(this.errorState.value="none"),null===(e=this.handle)||void 0===e||e.subscribe(this.onKMPData.bind(this))}catch(t){const e=t instanceof Error?t.message:"Failed to set panel data";Object(p.a)("FoxStatsViewModel","setDataToPanel",t),this.multiEventModeActive.value||this.hasEverSuccessfullyLoaded.value||this.setError(e)}}async onEngage(t){await this.trackStatsCardAction(t)}onSeeAllStats(t){this.openStatsDetailForEvent(t),this.trackStatsExpandAction(t)}onExpandableCardToggle(t,e){this.trackStatsCardAction(t,e?"expand":"collapse")}async trackStatsExpandAction(t){try{var e;const a=null!==(n=this.foxPaths,i=t,e=Array.isArray(n)?null===(s=n.find(t=>t[1]===i))||void 0===s?void 0:s[0]:null===(r=Object.entries(n).find(([,t])=>t===i))||void 0===r?void 0:r[0])&&void 0!==e?e:t;await this.analyticsService.panelClick({type:"foxStats",name:"stats_item_clicked",metadata:{event_name:"stats_expand",entity_id:a}})}catch(t){Object(p.a)("FoxStatsViewModel","trackStatsExpandAction",t)}var n,i,r,s}async trackStatsCardAction(t,e){try{await this.analyticsService.panelClick({type:"foxStats",name:"stats_item_clicked",metadata:{card:[t],...e?{action:e}:{}}})}catch(t){Object(p.a)("FoxStatsViewModel","trackStatsCardAction",t)}}applyBifrostConfig(t,e){var n;const i=e||this.bifrost;if(!i)return;const r=function(t,e=[]){const n=Array.isArray(t)?t.filter(t=>e.includes(t[0])):Object.entries(t).filter(([t])=>e.includes(t)).map(([t,e])=>[t,e]),i=new Set;return n.filter(([,t])=>!i.has(t)&&(i.add(t),!0))}(i.paths,t);null===(n=this.handle)||void 0===n||n.setConfig(i.url,r,i.method,i.headers,this.getBifrostPollingIntervalMs())}getBifrostPollingIntervalMs(){const t=ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_STATS,featureFlag:"bifrost_polling_interval"});if(null==t)return;const e=parseFloat(String(t));return Number.isFinite(e)&&e>0?1e3*e:void 0}returnToStatsSummary(t=!1){this.isViewingDetails.value&&(t&&this.trackStatsCardAction("back"),this.isViewingDetails.value=!1,this.bifrost&&this.applyBifrostConfig(this.eventIds,this.bifrost))}pause(){var t;this.paused||this.isBackgroundPollingEnabled()||(null===(t=this.handle)||void 0===t||t.pause(),this.paused=!0)}resume(){var t;this.paused&&(null===(t=this.handle)||void 0===t||t.resume(),this.paused=!1)}isBackgroundPollingEnabled(){return!1!==ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_STATS,featureFlag:"background_polling"})}deinit(){var t;null===(t=this.handle)||void 0===t||t.close(),this.handle=null,this.lastStatsHash=null,this.multiEventModeActive.value=!1,this.errorState.value="none",this.hasEverSuccessfullyLoaded.value=!1}clearTabLoadFailure(){var t;this.lastStatsHash=null,null===(t=this.handle)||void 0===t||t.retry()}}function W(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class H{constructor(){W(this,"handle",void 0),this.handle=R.FoxKeyPlaysHandle.Companion.startStandalone()}setConfig(t,e,n,i){const r=n&&Object.keys(n).length>0?Object.entries(n).map(([t,e])=>[t,e]):void 0;this.handle.setConfig(t,e,r,i)}updateListings(t){this.handle.updateListings(t)}subscribe(t){this.handle.subscribe(t)}notifyKeyPlaySelected(t){this.handle.onKeyPlaySelected(t)}updateProgress(t,e,n){this.handle.updateProgress(t,e,n)}updateTimecode(t){this.handle.updateTimecode(t)}clearProgress(){this.handle.clearProgress()}pause(){this.handle.pause()}resume(){this.handle.resume()}retry(){this.handle.retry()}close(){this.handle.close()}}function $(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Y extends m.a{constructor(t,e,n){super(),this.eventIds=t,this.delegate=e,this.analyticsService=n,$(this,"events",new _.a([])),$(this,"errorState",new _.a(null)),$(this,"isViewingDetails",new _.a(!1)),$(this,"selectedEventId",new _.a(null)),$(this,"focusRestoreSignal",new _.a(null)),$(this,"adapter",void 0),$(this,"hasEverSuccessfullyLoaded",!1),$(this,"hasConfig",!1),$(this,"lastEventsHash",null),$(this,"pendingFocusRestoreEventId",null),$(this,"paused",!1),this.adapter=new H}getPageConfigForEventById(t,e,n){var i;return null!==(i=Boolean(t.find(t=>{var i,r;return null!==(i=null==t||null===(r=t.panels)||void 0===r?void 0:r.some(i=>{var r,s,a;return i.panel_type===e&&(null===(r=t.page.metadata)||void 0===r?void 0:r.external_field_1)===n&&!0===(null===(s=i.renderer)||void 0===s||null===(a=s.supported_platforms)||void 0===a?void 0:a.bbd)}))&&void 0!==i&&i})))&&void 0!==i&&i}filterEventIdsForBbdPanel(t,e,n){const i=[];for(const r of n){this.getPageConfigForEventById(t,e,r)&&i.push(r)}return i}refresh(t){this.eventIds=[...t],this.lastEventsHash=null;const e=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);this.adapter.updateListings(e)}setDataToPanel(t){try{if((e=t.keyPlaysAPIRequest)&&"object"==typeof e&&"string"==typeof e.url&&""!==e.url.trim()&&"string"==typeof e.method&&["GET","POST"].includes(e.method.toUpperCase())&&(!e.headers||"object"==typeof e.headers&&!Array.isArray(e.headers))&&(!e.refresh||e.refresh&&"number"==typeof e.refresh.max_age_ms&&e.refresh.max_age_ms>0)){this.adapter.setConfig(t.keyPlaysAPIRequest.url,t.keyPlaysAPIRequest.method,t.keyPlaysAPIRequest.headers,this.getKeyPlayPollingIntervalMs()),this.hasConfig=!0,"unpopulatedEvent"===this.errorState.value&&(this.errorState.value=null);const e=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);this.adapter.updateListings(e),this.adapter.subscribe(this.onKMPData.bind(this))}if((t=>t&&"object"==typeof t&&"string"==typeof t.listing_id&&"string"==typeof t.key_play_id&&"number"==typeof t.progress)(t.keyPlaysProgressUpdate)){const e=t.keyPlaysProgressUpdate;this.adapter.updateProgress(e.listing_id,e.key_play_id,e.progress)}}catch(t){const e=t instanceof Error?t.message:"Failed to set panel data";Object(p.a)("FoxKeyPlaysViewModel","setDataToPanel",t),this.hasEverSuccessfullyLoaded||this.setError(e)}var e}openKeyPlaysDetailForEvent(t){this.pendingFocusRestoreEventId=t,this.isViewingDetails.value=!0,this.selectedEventId.value=t}onSeeAllKeyPlays(t){this.openKeyPlaysDetailForEvent(t),this.trackKeyPlaysPanelClick({name:"key_plays_item_clicked",metadata:{event_name:"keyplays_expand",entity_id:t}})}returnToSummary(t=!1){if(this.isViewingDetails.value&&(t&&this.trackKeyPlaysPanelClick({name:"key_plays_item_clicked",metadata:{card:["back"]}}),this.isViewingDetails.value=!1,this.selectedEventId.value=null,this.pendingFocusRestoreEventId)){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}clearProgress(){this.adapter.clearProgress()}async onPanelView(){try{await this.analyticsService.panelView(A.a.FOX_KEY_PLAYS)}catch(t){Object(p.a)("FoxKeyPlaysViewModel","onPanelView",t)}}onKMPData(t){if(!(t.isError||t.events.length||this.hasEverSuccessfullyLoaded||t.isLoading&&this.hasConfig))return void(this.errorState.value="unpopulatedEvent");if(t.isError)return void(this.hasEverSuccessfullyLoaded?console.warn("[FoxKeyPlaysViewModel] Received error state from KMP adapter after previously successful load. Retaining existing data and error state."):this.errorState.value="tabLoadFailure");if(0===t.events.length){if(this.isViewingDetails.value&&!t.isLoading){this.isViewingDetails.value=!1,this.selectedEventId.value=null,this.events.value=[],this.hasEverSuccessfullyLoaded=!1,this.lastEventsHash=null,this.adapter.retry();const t=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);t.length>0&&this.adapter.updateListings(t)}return}const e=Object(L.b)(JSON.stringify(t.events));if(e!==this.lastEventsHash){if(this.lastEventsHash=e,this.events.value=t.events,this.emitListOfKeyPlays(t.events),this.hasEverSuccessfullyLoaded||(this.hasEverSuccessfullyLoaded=!0),this.errorState.value&&(this.errorState.value=null),this.error.value&&this.setError(null),this.pendingFocusRestoreEventId&&!this.isViewingDetails.value&&t.events.length>1){const t=this.pendingFocusRestoreEventId;this.pendingFocusRestoreEventId=null,this.focusRestoreSignal.value=t}}else console.log("[FoxKeyPlaysViewModel] Received events from KMP adapter, but they are identical to the current events. Skipping update.")}emitListOfKeyPlays(t){const e=[];for(const o of t)for(const t of null!==(n=o.sections)&&void 0!==n?n:[]){var n;for(const n of null!==(i=t.keyPlays)&&void 0!==i?i:[]){var i,r,s,a;e.push({listing_id:null!==(r=n.listingId)&&void 0!==r?r:o.id,key_play_id:n.keyPlayId,start_time:null!==(s=n.startTime)&&void 0!==s?s:"",end_time:null!==(a=n.endTime)&&void 0!==a?a:""})}}this.delegate.onPanelEvent({type:"fox:list-of-key-plays",payload:{listOfKeyPlays:e}}),this.overlayManager.recordPanelData(A.a.FOX_KEY_PLAYS,{totalKeyPlays:e.length})}pause(){this.paused||this.isBackgroundPollingEnabled()||(this.adapter.pause(),this.paused=!0)}resume(){this.paused&&(this.adapter.resume(),this.paused=!1)}isBackgroundPollingEnabled(){return!1!==ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_KEY_PLAYS,featureFlag:"background_polling"})}deinit(){this.adapter.close(),this.lastEventsHash=null,this.hasEverSuccessfullyLoaded=!1,this.errorState.value=null}getKeyPlayPollingIntervalMs(){const t=ge.getMaestroEventViewModel().getFeatureFlag({panelType:A.a.FOX_KEY_PLAYS,featureFlag:"keyplay_polling_interval"});if(null==t)return;const e=Number(t);return Number.isFinite(e)&&e>0?1e3*e:void 0}onUpdatePlayerTimeCode(t){this.isViewingDetails.value&&(this.lastEventsHash=null),this.adapter.updateTimecode(t)}clearTabLoadFailure(){this.lastEventsHash=null,this.adapter.retry();const t=this.filterEventIdsForBbdPanel(ge.getPageConfigs(),A.a.FOX_KEY_PLAYS,this.eventIds);t.length>0&&this.adapter.updateListings(t)}onKeyPlayEnter(t){var e;const n=null!==(e=t.listingId)&&void 0!==e?e:this.eventIds[0];if(!n)return;this.adapter.notifyKeyPlaySelected(t.keyPlayId);const i={listing_id:n,key_play_id:t.keyPlayId,...t.startTime&&{start_time:t.startTime},...t.endTime&&{end_time:t.endTime}};this.delegate.onPanelEvent({type:"fox:key-play:selected",payload:i}),this.trackKeyPlaysPanelClick({name:"key_play_clicked",metadata:{event_name:"keyplay_click",key_play_type:this.getKeyPlayType(t),key_play_id:t.keyPlayId,sport_uri:this.getKeyPlaySportUri(t),description:this.getKeyPlayDescription(t),entity_id:n}})}getKeyPlayType(t){var e,n;const i=t;return null!==(e=null!==(n=i.keyPlayType)&&void 0!==n?n:i.key_play_type)&&void 0!==e?e:null}getKeyPlayDescription(t){var e,n;const i=t;return null!==(e=null!==(n=i.description)&&void 0!==n?n:i.title)&&void 0!==e?e:null}getKeyPlaySportUri(t){var e,n;const i=t;return null!==(e=null!==(n=i.sportEventUri)&&void 0!==n?n:i.sport_event_uri)&&void 0!==e?e:null}async trackKeyPlaysPanelClick(t){try{await this.analyticsService.panelClick({type:"foxKeyPlays",...t})}catch(e){Object(p.a)("FoxKeyPlaysViewModel","trackKeyPlaysPanelClick",e,{...t})}}get overlayManager(){return ge.getMaestroEventViewModel().overlayManagerViewModel}}var G=n(25);function K(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var X=class{constructor(t){K(this,"currentlyPlayingClipIndex",new _.a(null)),K(this,"lastPlayedClipIndex",new _.a(null)),K(this,"currentClipPlaybackProgress",new _.a(null)),K(this,"errorState",new _.a("unpopulatedEvent")),K(this,"failedClips",new _.a({})),K(this,"items",new _.a([])),K(this,"filteredItems",new _.a([])),K(this,"analyticsService",void 0),K(this,"loadFailureRetryTimeouts",new Map),this.analyticsService=t}cleanup(){for(const t of this.loadFailureRetryTimeouts.values())clearTimeout(t);this.loadFailureRetryTimeouts.clear()}onUpdatePlayerTimeCode(t){this.filterItemsByPlayerTimeCode(t),this.cleanErrors()}filterItemsByPlayerTimeCode(t){if(!t)return void(this.filteredItems.value=this.items.value);const e=[];for(const n of this.items.value){const i=n.items.filter(e=>this.shouldShowKeyPlay(e,t));i.length>0&&e.push({title:n.title,items:i})}this.filteredItems.value=e}shouldShowKeyPlay(t,e){if(!t.wallClock||!e)return!0;const n=new Date(e);return new Date(t.wallClock)<=n}isCurrentlyPlaying(t){return t===this.currentlyPlayingClipIndex.value}async setKeyPlays(t,e){null!==t?(this.items.value=this.parseNetworkResponse(t),this.filterItemsByPlayerTimeCode(e),this.cleanErrors()):this.errorState.value="tabLoadFailure"}cleanErrors(){"tabLoadFailure"===this.errorState.value&&(this.errorState.value=null),"unpopulatedEvent"===this.errorState.value&&this.allItems.length&&(this.errorState.value=null),this.filteredItems.value.length||(this.errorState.value="unpopulatedEvent")}async playKeyPlay(t){const e=this.allItems[t];if(!e)return void console.warn("Key play not found at index:",t);ge.getMaestroEventViewModel().delegate.playClip(t),this.analyticsService.panelClick({type:"espnKeyPlays",name:"key_play_clicked",metadata:{action:"play clip",clip:e.clipID,key_play:e.description}})}async init(){await this.analyticsService.panelView("espnKeyPlays")}parseNetworkResponse(t){var e,n;const i=Object.values((null===(e=t.entities)||void 0===e?void 0:e.team)||{}),r=Object.values((null===(n=t.entities)||void 0===n?void 0:n.athlete)||{}),s=i.find(t=>"home"===t.homeAway),a=i.find(t=>"away"===t.homeAway),o=[],l=[];for(const e of t.sections){for(const t of e.items){const n=t.team?i.find(e=>e.id===t.team):void 0,l=t.athlete?r.find(e=>e.id===t.athlete):void 0,c=null!=n&&n.logoRef?Object(G.b)(n.logoRef,184,144):void 0,u=null!=l&&l.headshot?Object(G.b)(l.headshot,184,144):void 0,h="headshot"!==t.thumbnailType&&t.thumbnail?Object(G.b)(t.thumbnail,184,144):void 0,d=t.homeScore?t.homeScore:"0",f=t.awayScore?t.awayScore:"0",_=t.scoringPlay?parseInt(d):void 0,p=t.scoringPlay?parseInt(f):void 0,m={id:`${e.title||""}-${t.clipID}`,description:t.description?t.description:"",homeTeamName:s?s.shortName:"",awayTeamName:a?a.shortName:"",homeTeamScore:_,awayTeamScore:p,clipID:t.clipID,teamImageUrl:c,playerImageUrl:u,thumbnailImageUrl:h,section:e.title,wallClock:t.wallClock};o.push(m)}if(o.length){const t=e.title,n=l.find(e=>e.title===t);n?n.items.push(...o):l.push({title:t,items:[...o]}),o.length=0}}return l}get allItems(){return this.items.value.reduce((t,e)=>t.concat(e.items),[])}clipID(t){if(this.allItems[t])return this.allItems[t].clipID}handleKeyPlayLoadFailure(t){const e=this.clipID(t);if(e){const n=this.loadFailureRetryTimeouts.get(e);void 0!==n&&(clearTimeout(n),this.loadFailureRetryTimeouts.delete(e));const i=this.failedClips.value;i[e]="recentFailure",this.failedClips.value=i;const r=setTimeout(()=>{if(this.loadFailureRetryTimeouts.delete(e),"recentFailure"===this.loadFailureStatus(t)){const t=this.failedClips.value;t[e]="nonRecentFailure",this.failedClips.value=t}},5e3);this.loadFailureRetryTimeouts.set(e,r)}}loadFailureStatus(t){const e=this.clipID(t);return this.failedClips.value&&e?this.failedClips.value[e]:"noFailure"}clearLoadFailureStatus(t){const e=this.clipID(t);e&&this.failedClips&&(this.failedClips.value={...this.failedClips.value,[e]:"noFailure"})}async userRequestedNewKeyPlaysData(){const t=ge.getMaestroEventViewModel();await t.delegate.userRequestedNewKeyPlaysData()}};function J(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Z=class{getOverrideHeaders(t){return{...(null==t?void 0:t.headers)||{}}}getPersonalizedRequestHeaders(t){return this.overridePersonalized?this.getOverrideHeaders(this.overridePersonalized):{"x-p13n-auth":t}}getNonPersonalizedRequestHeaders(){return this.overrideNonPersonalized?this.getOverrideHeaders(this.overrideNonPersonalized):{}}constructor(t){J(this,"networkManager",void 0),J(this,"overridePersonalized",null),J(this,"overrideNonPersonalized",null),this.networkManager=new T.b({externalBaseURL:t.getBettingAPIBaseURL()})}async getNonPersonalizedBets(t){return this.networkManager.externalApiRequest({endpoint:this.nonPersonalizedBetsEndpoint(t),method:T.a.GET,params:{deviceType:"ictv"},headers:this.getNonPersonalizedRequestHeaders()})}async getPersonalizedBets(t,e,n){return this.networkManager.externalApiRequest({endpoint:this.personalizedBetsEndpoint(t),method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n)})}async getPersonalizedBetsWithHeaders(t,e,n){return this.networkManager.externalApiRequestWithHeaders({endpoint:this.personalizedBetsEndpoint(t),method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n)})}pollPersonalizedBets(t,e,n,i,r,s){return this.networkManager.pollExternalApiRequest({endpoint:this.personalizedBetsEndpoint(t),interval:i,method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n),onData:r,onError:s})}pollPersonalizedBetsWithHeaders(t,e,n,i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:this.personalizedBetsEndpoint(t),interval:i,method:T.a.GET,params:{swid:e,deviceType:"ictv"},headers:this.getPersonalizedRequestHeaders(n),onData:r,onError:s})}nonPersonalizedBetsEndpoint(t){return this.overrideNonPersonalized?this.overrideNonPersonalized.endpoint:`/site/v2/events/${t}/odds`}personalizedBetsEndpoint(t){return this.overridePersonalized?this.overridePersonalized.endpoint:`/personalized/site/v2/events/${t}/odds`}};const Q={event:{id:"401815534",sport:"basketball",league:"nba",date:"2026-05-28T00:00:00Z",gameState:"in",title:null,recent:!0,bets:{provider:{id:"45",name:"ESPN BET",priority:1},odds:[{id:"ml-1",displayName:"Moneyline",type:"moneyline",state:"live",values:[{odds:"-180",team:"7",type:"home"},{odds:"+155",team:"21",type:"away"}]},{id:"spread-1",displayName:"Spread",type:"spread",state:"live",values:[{line:"-4.5",odds:"-110",team:"7",type:"home"},{line:"+4.5",odds:"-110",team:"21",type:"away"}]},{id:"total-1",displayName:"Total",type:"total",state:"live",values:[{line:"218.5",odds:"-110",type:"over"},{line:"218.5",odds:"-110",type:"under"}]}]},competitions:[{id:"401815534",status:{displayValue:"Q3 4:32"},competitors:[{id:"7",athletes:[]},{id:"21",athletes:[]}],odds:[{id:"ml-1",displayName:"Moneyline",type:"moneyline",state:"live",values:[{odds:"-180",team:"7",type:"home"},{odds:"+155",team:"21",type:"away"}]}]}],featured:[{id:"mkt-featured-001",text:"Nikola Jokic Over 28.5 Points",type:"default",status:"live",points:"28.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",selections:[{id:"sel-feat-001",displayName:"Over 28.5",odds:{current:"-125"}}]},{id:"mkt-featured-002",text:"Devin Booker Over 24.5 Points",type:"default",status:"live",points:"24.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",selections:[{id:"sel-feat-002",displayName:"Over 24.5",odds:{current:"-115"}}]},{id:"mkt-featured-003",text:"Jamal Murray Over 6.5 Assists",type:"default",status:"live",points:"6.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",selections:[{id:"sel-feat-003",displayName:"Over 6.5",odds:{current:"+105"}}]},{id:"mkt-featured-004",text:"Bradley Beal Over 15.5 Points",type:"default",status:"live",points:"15.5",icon:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",iconDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",selections:[{id:"sel-feat-004",displayName:"Over 15.5",odds:{current:"-130"}}]}],links:[{href:"https://espnbet.com/sport/basketball/organization/nba/event/401815534"}]},entities:{teams:{7:{id:"7",displayName:"Denver Nuggets",abbreviation:"DEN",shortDisplayName:"Nuggets",logo:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",logoDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png",score:"78",favored:!0,favoredAtOpen:!0,displayOrder:2},21:{id:"21",displayName:"Phoenix Suns",abbreviation:"PHX",shortDisplayName:"Suns",logo:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",logoDark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png",score:"72",favored:!1,favoredAtOpen:!1,displayOrder:1}}},promotion:{title:"Bet on ESPN BET",description:"Place your bets on this game",logo:"https://a.espncdn.com/i/espnbet/espnbet-logo.png",qrCode:"https://a.espncdn.com/i/espnbet/qr-code-espnbet.png"},disclaimers:{gambling:"Must be 21+. Gambling problem? Call 1-800-GAMBLER."},betsModule:{defaultTab:"live",upcoming:[{id:"dk-bet-100",type:"STRAIGHT",displayName:"Straight",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"-110",startTime:"2026-05-29T01:00:00Z",closedAtTime:null,legCount:1,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-100",marketId:"mkt-200",marketSelectionId:"sel-100",marketType:"TOTAL",status:"PENDING",selectionText:"Over 218.5",marketText:"Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"upcoming",currentPoints:null,targetPoints:218.5}]}]}],live:[{id:"dk-bet-101",type:"PARLAY",displayName:"4 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+1079",startTime:"2026-05-28T00:00:00Z",closedAtTime:null,legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Dual Screen Monday Night",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-101",marketId:"mkt-201",marketSelectionId:"sel-101",marketType:"MONEYLINE",status:"PENDING",selectionText:"Dallas Cowboys",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-102",marketId:"mkt-202",marketSelectionId:"sel-102",marketType:"TOTAL",status:"WIN",selectionText:"Over 31.5",marketText:"Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"live",currentPoints:32,targetPoints:31.5},{id:"sel-103",marketId:"mkt-203",marketSelectionId:"sel-103",marketType:"MONEYLINE",status:"PENDING",selectionText:"Detroit Lions",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-104",marketId:"mkt-204",marketSelectionId:"sel-104",marketType:"TOTAL",status:"PENDING",selectionText:"Under 100",marketText:"J. Gibbs Receiving Yards",type:"UNDER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:10,targetPoints:100}]}]},{id:"dk-bet-108",type:"PARLAY",displayName:"3 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+720",startTime:"2026-05-28T01:30:00Z",closedAtTime:null,legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815600",displayName:"Celtics @ Knicks",guid:"7ef0e9ab-2f44-42e4-8c89-d46a81155600",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815600"},teams:null,cehEvent:null,legs:[{id:"sel-108-1",marketId:"mkt-208-1",marketSelectionId:"sel-108-1",marketType:"MONEYLINE",status:"PENDING",selectionText:"Boston Celtics",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null}]},{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:null,cehEvent:null,legs:[{id:"sel-108-2",marketId:"mkt-208-2",marketSelectionId:"sel-108-2",marketType:"TOTAL",status:"PENDING",selectionText:"Nikola Jokic Over 28.5",marketText:"Player Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:24,targetPoints:28.5},{id:"sel-108-3",marketId:"mkt-208-3",marketSelectionId:"sel-108-3",marketType:"TOTAL",status:"PENDING",selectionText:"Devin Booker Over 24.5",marketText:"Player Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:20,targetPoints:24.5}]}]},{id:"dk-bet-109",type:"PARLAY",displayName:"2 Leg Parlay",betStatus:"OPEN",outcome:"PENDING",betDisplayStatement:"to win",odds:"+425",startTime:"2026-05-28T02:30:00Z",closedAtTime:null,legCount:2,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815601",displayName:"Lakers @ Warriors",guid:"c9e5e891-a26f-46f7-a0b8-c415de147601",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815601"},teams:null,cehEvent:null,legs:[{id:"sel-109-1",marketId:"mkt-209-1",marketSelectionId:"sel-109-1",marketType:"MONEYLINE",status:"PENDING",selectionText:"Golden State Warriors",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:null,targetPoints:null},{id:"sel-109-2",marketId:"mkt-209-2",marketSelectionId:"sel-109-2",marketType:"TOTAL",status:"PENDING",selectionText:"Over 224.5",marketText:"Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"live",currentPoints:168,targetPoints:224.5}]}]}],settled:[{id:"dk-bet-102",type:"PARLAY",displayName:"3 Pick Parlay",betStatus:"LOST",outcome:"LOSS",betDisplayStatement:"loss",odds:"+850",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:"7b3729c9-a1f2-4e8b-9c3d-5f6a7b8c9d0e",links:{gamecast:"https://www.espn.com/nba/game/_/gameId/401815534"},teams:[{id:"7",teamName:"Denver Nuggets",homeAway:"away",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/den.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/den.png"}},{id:"21",teamName:"Phoenix Suns",homeAway:"home",logo:{light:"https://a.espncdn.com/i/teamlogos/nba/500/phx.png",dark:"https://a.espncdn.com/i/teamlogos/nba/500-dark/phx.png"}}],cehEvent:null,legs:[{id:"sel-201",marketId:"mkt-301",marketSelectionId:"sel-201",marketType:"MONEYLINE",status:"LOSS",selectionText:"Suns to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-202",marketId:"mkt-302",marketSelectionId:"sel-202",marketType:"TOTAL",status:"WIN",selectionText:"Over 24.5",marketText:"Devin Booker Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:31,targetPoints:24.5},{id:"sel-203",marketId:"mkt-303",marketSelectionId:"sel-203",marketType:"TOTAL",status:"WIN",selectionText:"Over 9.5",marketText:"Nikola Jokic Total Rebounds",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:14,targetPoints:9.5}]}]},{id:"dk-bet-103",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"WON",outcome:"WIN",betDisplayStatement:"won",odds:"+450",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-w-1",marketType:"TOTAL",status:"WIN",selectionText:"Over 215.5",marketText:"Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:220,targetPoints:215.5},{id:"sel-w-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 22.5",marketText:"Devin Booker Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:28,targetPoints:22.5}]}]},{id:"dk-bet-104",type:"PARLAY",displayName:"4 Pick Parlay",betStatus:"WON",outcome:"LOSS",overrideOutcome:"GHOST_WIN",betDisplayStatement:"ghost win",odds:"+1450",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-g-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Nuggets to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-g-2",marketType:"TOTAL",status:"LOSS",selectionText:"Over 35.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:33,targetPoints:35.5},{id:"sel-g-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:8,targetPoints:6.5},{id:"sel-g-4",marketType:"TOTAL",status:"WIN",selectionText:"Over 200.5",marketText:"Total Game Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:218,targetPoints:200.5}]}]},{id:"dk-bet-105",type:"PARLAY",displayName:"4 Pick Parlay",betStatus:"WON",outcome:"WIN",betDisplayStatement:"early exit win",odds:"+960",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:4,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:"EARLY_EXIT",rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-e-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Suns to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-e-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 14.5",marketText:"Devin Booker Total Rebounds",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:17,targetPoints:14.5},{id:"sel-e-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 4.5",marketText:"Bradley Beal Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:7,targetPoints:4.5},{id:"sel-e-4",marketType:"TOTAL",status:"WIN",selectionText:"Over 12.5",marketText:"Aaron Gordon Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:18,targetPoints:12.5}]}]},{id:"dk-bet-106",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"PUSH",outcome:"PUSH",betDisplayStatement:"push",odds:"+200",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-p-1",marketType:"TOTAL",status:"PUSH",selectionText:"Over 28.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:28.5,targetPoints:28.5},{id:"sel-p-2",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:9,targetPoints:6.5}]}]},{id:"dk-bet-107",type:"PARLAY",displayName:"2 Pick Parlay",betStatus:"VOID",outcome:"VOID",betDisplayStatement:"void",odds:"+1000",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:2,icon:null,isNoAction:!0,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-v-1",marketType:"MONEYLINE",status:"VOID",selectionText:"Game canceled",marketText:"Moneyline",type:"MONEYLINE",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-v-2",marketType:"TOTAL",status:"VOID",selectionText:"Under 10.5",marketText:"Bradley Beal Total Points",type:"UNDER",icon:null,iconDark:null,url:null,marketStatus:"settled",currentPoints:null,targetPoints:null}]}]},{id:"dk-bet-110",type:"PARLAY",displayName:"3 Pick Parlay",betStatus:"WON",outcome:"LOSS",overrideOutcome:"GHOST_LEG_PARLAY",betDisplayStatement:"ghost leg parlay",odds:"+620",startTime:null,closedAtTime:"2026-05-27T04:30:00Z",legCount:3,icon:"https://a.espncdn.com/i/espnbet/sgp_icon.png",isNoAction:!1,earlyExitStatus:null,rewardInfo:{type:"NONE"},events:[{id:"401815534",displayName:"Nuggets @ Suns",guid:null,links:null,teams:null,cehEvent:null,legs:[{id:"sel-gl-1",marketType:"MONEYLINE",status:"WIN",selectionText:"Nuggets to Win",marketText:"Moneyline",type:"MONEYLINE",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:null,targetPoints:null},{id:"sel-gl-2",marketType:"TOTAL",status:"LOSS",selectionText:"Over 35.5",marketText:"Nikola Jokic Total Points",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_grey_x_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_grey_x_icon.png",url:null,marketStatus:"settled",currentPoints:33,targetPoints:35.5},{id:"sel-gl-3",marketType:"TOTAL",status:"WIN",selectionText:"Over 6.5",marketText:"Jamal Murray Total Assists",type:"OVER",icon:"https://a.espncdn.com/i/espnbet/mybets_green_check_icon.png",iconDark:"https://a.espncdn.com/i/espnbet/dark/mybets_green_check_icon.png",url:null,marketStatus:"settled",currentPoints:8,targetPoints:6.5}]}]}],containsEvent:!0}};function tt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const et=t=>"object"==typeof t&&null!==t&&"event"in t&&"object"==typeof t.event;class nt extends m.a{constructor(t,e,n,i={}){super(),tt(this,"betsItems",new _.a([])),tt(this,"isDataLoading",new _.a(!0)),tt(this,"errorState",new _.a("none")),tt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),tt(this,"hideWagers",new _.a(!1)),tt(this,"eventId",void 0),tt(this,"delegate",void 0),tt(this,"betsService",void 0),tt(this,"analyticsService",void 0),tt(this,"pollingInterval",void 0),tt(this,"pollingTask",null),tt(this,"lastNonPersonalizedResponseHash",null),tt(this,"lastPersonalizedResponseHash",null),tt(this,"useMockData",!1),tt(this,"userSettingsManager",void 0),tt(this,"settingsSubscription",null),tt(this,"initialized",!1),this.eventId=t,this.delegate=e,this.betsService=new Z(e),this.analyticsService=n,this.pollingInterval=3e4,this.useMockData=i.useMockData||!1,this.userSettingsManager=w.getInstance(),this.hideWagers.value=this.userSettingsManager.shouldHideWagers(),this.settingsSubscription=this.userSettingsManager.settings.subscribe(()=>{this.updateHideWagersFromSettings()}),this.betsService=new Z(e)}async init(){this.trackPanelView(),await this.fetchNewData(),this.refreshPolling(),this.initialized=!0}cleanup(){this.stopPolling(),this.settingsSubscription&&(this.settingsSubscription(),this.settingsSubscription=null),this.initialized=!1}async trackPanelView(){try{const t=this.getUserBetCounts();await this.analyticsService.panelView("espnBet",t)}catch(t){Object(p.a)("BetsViewModel","trackPanelView",t)}}async trackCardClick(t,e){try{const n={...this.getUserBetCounts(),card:t,bet_type:e||null};await this.analyticsService.panelClick({type:"espnBet",name:"bets_item_clicked",metadata:n})}catch(n){Object(p.a)("BetsViewModel","trackCardClick",n,{cardType:t,betType:e})}}getUserBetCounts(){try{let t=0,e=0;for(const n of this.betsItems.value)if("userBets"===n.type){const i=n;e=[...i.data.bets.live,...i.data.bets.settled,...i.data.bets.upcoming].length,t=i.data.bets.live.length;break}return{in_game_bets:t,total_bets:e}}catch(t){return Object(p.a)("BetsViewModel","getUserBetCounts",t),{in_game_bets:0,total_bets:0}}}refreshPolling(){this.stopPolling(),this.useMockData||this.betsService.overridePersonalized||(this.pollingTask={stop:()=>{}},this.pollWithInterval())}async getUserCredentials(){return{swid:await this.delegate.getUserSWID()||"",jwt:await this.delegate.getUserToken()||""}}updatePollingInterval(t){const e=this.getResponseHeaderPollingIntervalValue(t),n=this.getPanelConfigInterval(),i=e||n;i&&i!==this.pollingInterval&&(this.pollingInterval=i,console.log(`[BET] Updating polling interval to ${this.pollingInterval} milliseconds`),this.refreshPolling())}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnBet"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.odds_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[BET] Invalid polling interval from panel config: ${s}.`),null):1e3*a}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[BET] Invalid polling interval header received: ${e}.`),null):1e3*n}async pollWithInterval(){try{const{swid:t,jwt:e}=await this.getUserCredentials();this.pollingTask=this.betsService.pollPersonalizedBetsWithHeaders(this.eventId,t,e,this.pollingInterval,t=>{this.updatePollingInterval(t.headers),this.processPolledData(t.data)},this.handlePollingError.bind(this))}catch(t){Object(p.a)("BetsViewModel","pollWithInterval",t)}}processPolledData(t){const e=Object(L.b)(JSON.stringify(t));if(et(t)){if(this.lastPersonalizedResponseHash===e&&this.hasEverSuccessfullyLoaded.value)return void console.log("[BET] Response hash is the same as last successful response - skipping update");this.lastPersonalizedResponseHash=e}else{if(this.lastNonPersonalizedResponseHash===e&&this.hasEverSuccessfullyLoaded.value)return void console.log("[BET] Response hash is the same as last successful response - skipping update");this.lastNonPersonalizedResponseHash=e}this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.processBetsData(t)}processBetsData(t){var e;const n=[];if(!Object.keys(t).length)return;if("golf"===(et(t)?null===(e=t.event)||void 0===e?void 0:e.sport:t.sport)){const e=this.processGolfOddsData(t);e&&n.push(e)}else{const e=this.processSixPackData(t);e&&n.push(e)}const i=this.processLocationDisclaimer(t);i&&n.push(i);const r=this.processUserBetsData(t);r&&n.push(r);const s=this.processHotProps(t);s&&n.push(s);const a=this.processPromoCode(t);a&&n.push(a);const o=this.processGamblingMessage(t);o&&n.push(o),this.betsItems.value=n}processLocationDisclaimer(t){var e;return et(t)&&null!==(e=t.disclaimers)&&void 0!==e&&e.location?{type:"locationDisclaimer",id:"locationDisclaimer",data:{text:t.disclaimers.location}}:null}processPromoCode(t){var e;if(!et(t)||!t.promotion)return null;const n=(t.promotion.title||"").trim(),i=(t.promotion.description||"").trim(),r=(t.promotion.logo||"").trim(),s=(t.promotion.qrCode||"").trim(),a=(t.promotion.backgroundImage||"").trim();return n&&i&&r&&s&&a?{type:"promo",data:{title:n,description:i,logo:r,qrCode:s,backgroundImage:a},id:"promo-"+((null===(e=t.event)||void 0===e?void 0:e.id)||t.id)}:null}processGamblingMessage(t){var e;return et(t)&&null!==(e=t.disclaimers)&&void 0!==e&&e.gambling?{type:"gamblingMessage",id:"gamblingMessage",data:{text:t.disclaimers.gambling}}:null}processSixPackData(t){var e,n,i,r,s,a,o,l,c,u;const h=et(t),d=null===(e=t.entities)||void 0===e?void 0:e.teams,f=h?null===(i=t.event)||void 0===i||null===(r=i.bets)||void 0===r?void 0:r.odds:null===(n=t.bets)||void 0===n?void 0:n.odds,_=f&&((p=f).length>0&&"displayName"in p[0])?f:void 0;var p;const m=h?null===(s=t.event)||void 0===s?void 0:s.gameState:t.gameState,v=h?null===(a=t.event)||void 0===a?void 0:a.sport:t.sport,g=h?null===(o=t.event)||void 0===o?void 0:o.id:t.id,A=h?"soccer"===(null===(l=t.event)||void 0===l?void 0:l.sport):"soccer"===t.sport;if(!(_&&m&&v&&g&&d))return null;const b=Object.values(d);let y,w;for(const t of Object.values(d)){const e=_.find(t=>"pointSpread"===t.type);e&&(e.values.some(e=>e.team===t.id&&"home"===e.type)?w=t:e.values.some(e=>e.team===t.id&&"away"===e.type)&&(y=t))}if(!w||!y)switch(console.warn("Could not determine home/away teams from odds, using first two teams"),b.length){case 0:throw new Error("No teams found in response");case 1:w=b[0],y=b[0];break;case 2:w=b[0],y=b[1];break;default:w=b[0],y=b[1],console.warn(`Warning: Unexpected team count (${b.length}) in six pack response`)}if(!y||!w)throw new Error("Could not determine home or away team from response");const E="in"===m,k=A&&!E?null===(x=w.favoredAtOpen)||void 0===x||x:null===(C=w.favored)||void 0===C||C;var C,x;const B=A&&!E?null!==(T=y.favoredAtOpen)&&void 0!==T&&T:null!==(S=y.favored)&&void 0!==S&&S;var S,T;let j="",q="",P="",I="",N="",z="",O="",R="",D="",M="",L="",F="",U="",V="",W="",H="",$="";const Y=new Set,G=[];for(const t of _){Y.has(t.type)||(G.push({type:t.type,abbreviation:t.abbreviation}),Y.add(t.type));const e="live"===t.state,n="close"===t.state,i="open"===t.state;switch(t.type){case"pointSpread":if(E?e:n)for(const e of t.values){var K,X,J,Z;if("home"===e.type)O=null!==(K=e.line)&&void 0!==K?K:"",R=null!==(X=e.odds)&&void 0!==X?X:"";if("away"===e.type)N=null!==(J=e.line)&&void 0!==J?J:"",z=null!==(Z=e.odds)&&void 0!==Z?Z:""}if((E?n:i)&&!A){if(k)for(const e of t.values){var Q,tt;if("home"===e.type)P=null!==(Q=e.line)&&void 0!==Q?Q:"",I=null!==(tt=e.odds)&&void 0!==tt?tt:""}if(B)for(const e of t.values){var nt,it;if("away"===e.type)j=null!==(nt=e.line)&&void 0!==nt?nt:"",q=null!==(it=e.odds)&&void 0!==it?it:""}}break;case"total":if(E?e:n)for(const e of t.values){var rt,st,at,ot,lt,ct,ut,ht;if("over"===e.type)if(A)L=null!==(rt=e.line)&&void 0!==rt?rt:"",F=null!==(st=e.odds)&&void 0!==st?st:"";else D=null!==(at=e.line)&&void 0!==at?at:"",M=null!==(ot=e.odds)&&void 0!==ot?ot:"";if("under"===e.type)if(A)D=null!==(lt=e.line)&&void 0!==lt?lt:"",M=null!==(ct=e.odds)&&void 0!==ct?ct:"";else L=null!==(ut=e.line)&&void 0!==ut?ut:"",F=null!==(ht=e.odds)&&void 0!==ht?ht:""}if(E?n:i){if(!k)for(const e of t.values){var dt,ft;if(A&&"over"===e.type||!A&&"under"===e.type)P=null!==(dt=e.line)&&void 0!==dt?dt:"",I=null!==(ft=e.odds)&&void 0!==ft?ft:""}if(!B)for(const e of t.values){var _t,pt;if(A&&"under"===e.type||!A&&"over"===e.type)j=null!==(_t=e.line)&&void 0!==_t?_t:"",q=null!==(pt=e.odds)&&void 0!==pt?pt:""}}break;case"moneyline":{const r=E?e:n;if(r)for(const e of t.values){var mt,vt;if("home"===e.type)V=null!==(mt=e.odds)&&void 0!==mt?mt:"";if("away"===e.type)U=null!==(vt=e.odds)&&void 0!==vt?vt:""}if(A){const e=E?n:i;for(const n of t.values)if("draw"===n.type){var gt,At;if(e)W=null!==(gt=n.odds)&&void 0!==gt?gt:"",H="DRAW";if(r)$=null!==(At=n.odds)&&void 0!==At?At:""}if(e){if(k)for(const e of t.values){var bt,yt;if("home"===e.type)P=null!==(bt=e.odds)&&void 0!==bt?bt:"",I=null!==(yt=t.abbreviation)&&void 0!==yt?yt:""}if(B)for(const e of t.values){var wt,Et;if("away"===e.type)j=null!==(wt=e.odds)&&void 0!==wt?wt:"",q=null!==(Et=t.abbreviation)&&void 0!==Et?Et:""}}}break}}}const kt={teamAbbreviation:null!==(c=y.abbreviation)&&void 0!==c?c:"",startOfGameFirstLine:j,startOfGameSecondLine:q,gameSpreadFirstLine:N,gameSpreadSecondLine:z,totalPointsFirstLine:D,totalPointsSecondLine:M,moneylineFirstLine:U},Ct={teamAbbreviation:null!==(u=w.abbreviation)&&void 0!==u?u:"",startOfGameFirstLine:P,startOfGameSecondLine:I,gameSpreadFirstLine:O,gameSpreadSecondLine:R,totalPointsFirstLine:L,totalPointsSecondLine:F,moneylineFirstLine:V};return{id:"sixpack-"+g,type:"sixPack",data:{topTeamOdds:A?Ct:kt,bottomTeamOdds:A?kt:Ct,drawOdds:W&&H&&$?{teamAbbreviation:"DRAW",startOfGameFirstLine:W,startOfGameSecondLine:H,gameSpreadFirstLine:"",gameSpreadSecondLine:"",totalPointsFirstLine:"",totalPointsSecondLine:"",moneylineFirstLine:$}:void 0,orderedColumns:G,gameState:m},teamInfo:{home:w,away:y},hideWagers:this.hideWagers.value}}getBetStartMs(t){if(!t.startTime)return-1;const e=new Date(t.startTime).getTime();return isNaN(e)?-1:e}sortLiveBets(t,e){return[...t].sort((t,e)=>this.getBetStartMs(e)-this.getBetStartMs(t))}sortUpcomingBets(t){return[...t].sort((t,e)=>{const n=this.getBetStartMs(t),i=this.getBetStartMs(e);return(n<0?Number.MAX_SAFE_INTEGER:n)-(i<0?Number.MAX_SAFE_INTEGER:i)})}getThreeMonthsAgoCutoff(){const t=new Date;let e=t.getUTCFullYear(),n=t.getUTCMonth()-3;n<0&&(n+=12,e-=1);const i=new Date(Date.UTC(e,n+1,0)).getUTCDate(),r=Math.min(t.getUTCDate(),i);return Date.UTC(e,n,r,t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds())}sortAndFilterSettledBets(t){const e=this.getThreeMonthsAgoCutoff(),n=t=>{if(!t.closedAtTime)return-1;const e=new Date(t.closedAtTime).getTime();return isNaN(e)?-1:e};return t.map(t=>({bet:t,closedMs:n(t)})).filter(({closedMs:t})=>t>=e).sort((t,e)=>e.closedMs-t.closedMs).slice(0,10).map(({bet:t})=>t)}processUserBetsData(t){if(!et(t)||!t.event||!t.betsModule)return null;const e=t.event.id,n={live:this.sortLiveBets(t.betsModule.live.filter(t=>"promo"!==t.type),e),settled:this.sortAndFilterSettledBets(t.betsModule.settled.filter(t=>"promo"!==t.type)),upcoming:this.sortUpcomingBets(t.betsModule.upcoming.filter(t=>"promo"!==t.type))},i="in"===t.event.gameState;return{data:{bets:n,defaultTab:i?"live":"upcoming",isCurrentEventLive:i},id:"userBets-"+t.event.id,type:"userBets",hideWagers:this.hideWagers.value}}processGolfOddsData(t){var e,n,i;const r=et(t),s=r?t.event:t,a=null==s?void 0:s.bets,o=null==a?void 0:a.odds,l=null==a?void 0:a.headers,c=null===(e=t.entities)||void 0===e?void 0:e.athletes,u=r?null===(n=t.event)||void 0===n?void 0:n.id:t.id,h=null!==(i=null==s?void 0:s.title)&&void 0!==i?i:"";if(!o||!l||!u)return null;return{type:"golfOdds",id:"golfOdds-"+u,data:{title:h,headers:l,players:o.filter(t=>t.id).map(t=>{var e,n,i,r,s,a,o;const l=null==c?void 0:c[t.id];return{id:t.id,name:null!==(e=null==l?void 0:l.shortName)&&void 0!==e?e:t.id,score:t.displayValue,values:t.values.map(t=>{var e;return null!==(e=t.odds)&&void 0!==e?e:""}),flagUrl:null==l||null===(n=l.country)||void 0===n||null===(i=n.flag)||void 0===i?void 0:i.href,flagAlt:null!==(r=null==l||null===(s=l.country)||void 0===s||null===(a=s.flag)||void 0===a?void 0:a.alt)&&void 0!==r?r:null!=l&&null!==(o=l.country)&&void 0!==o&&o.name?l.country.name+" flag":void 0}})},hideWagers:this.hideWagers.value}}processHotProps(t){var e;const n=et(t)?null===(e=t.event)||void 0===e?void 0:e.featured:t.featured;if(!n||!Array.isArray(n))return null;if(!n.every(t=>Boolean(t&&t.id)))return null;const i=n.filter(t=>t.selections.length>0);return{type:"hotProps",hideWagers:this.hideWagers.value,id:"hotProps",data:{items:i.map(t=>{const e=t.selections[0];return{id:e.id,odds:e.odds.current||"",marketText:e.text,selectionText:t.text,status:e.status,type:e.type,icon:e.icon,iconDark:e.iconDark,outcome:e.outcome}})}}}handlePollingError(t){Object(p.a)("BetsViewModel","handlePollingError",t),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.betsItems.value=[])}stopPolling(){this.pollingTask&&(this.pollingTask.stop(),this.pollingTask=null),this.isDataLoading.value&&(this.isDataLoading.value=!1)}async fetchNewData(){this.isDataLoading.value=!0;try{if(this.useMockData)return this.betsItems.value=[],void await this.fetchMockData();await this.fetchPersonalizedData(),this.isDataLoading.value=!1}catch(t){Object(p.a)("BetsViewModel","fetchNewData",t),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.betsItems.value=[]),this.isDataLoading.value=!1}}async fetchPersonalizedData(){try{const{swid:t,jwt:e}=await this.getUserCredentials(),n=await this.betsService.getPersonalizedBets(this.eventId,t,e);this.processPolledData(n)}catch(t){throw Object(p.a)("BetsViewModel","fetchPersonalizedData",t),t}}async fetchMockData(){this.processBetsData(Q),this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",setTimeout(()=>{this.refreshPolling()},100)}shouldHideWagers(){return this.hideWagers.value}updateHideWagersFromSettings(){this.hideWagers.value=this.userSettingsManager.shouldHideWagers(),this.refreshBetItemsWithNewSettings()}refreshBetItemsWithNewSettings(){this.betsItems.value=this.betsItems.value.map(t=>"sixPack"===t.type||"userBets"===t.type||"hotProps"===t.type||"golfOdds"===t.type?{...t,hideWagers:this.hideWagers.value}:t)}parseOverrideHeaders(t){if(!t||"object"!=typeof t||Array.isArray(t))return{};const e={};for(const[n,i]of Object.entries(t))"string"==typeof i&&(e[n]=i);return e}parseEndpointOverrideConfig(t){if(!t||"object"!=typeof t||Array.isArray(t))return null;const e=t,n="string"==typeof e.endpoint?e.endpoint.trim():"";return n?{endpoint:n,headers:this.parseOverrideHeaders(e.headers)}:null}areOverridesEqual(t,e){if(!t&&!e)return!0;if(!t||!e)return!1;if(t.endpoint!==e.endpoint)return!1;const n=t.headers||{},i=e.headers||{},r=Object.keys(n),s=Object.keys(i);return r.length===s.length&&r.every(t=>n[t]===i[t])}setDataToPanel(t){const e="string"==typeof t.overrideUrl?t.overrideUrl.trim():"",n=this.parseEndpointOverrideConfig(t.overridePersonalized)||(e?{endpoint:e,headers:{}}:null),i=this.parseEndpointOverrideConfig(t.overrideNonPersonalized);this.areOverridesEqual(n,this.betsService.overridePersonalized)&&this.areOverridesEqual(i,this.betsService.overrideNonPersonalized)||(this.betsService.overridePersonalized=n,this.betsService.overrideNonPersonalized=i,this.stopPolling(),this.fetchNewData(),this.refreshPolling())}}var it=nt;const rt={entities:{teams:{9:{id:"9",uid:"s:40~l:59~t:9",slug:"new-york-liberty",location:"New York",name:"Liberty",abbreviation:"NY",displayName:"New York Liberty",shortDisplayName:"Liberty",color:"86cebc",alternateColor:"000000",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/ny.png",statistics:[{$key:"fieldGoalPct",value:45.8,displayValue:"45.8",displayName:"Field Goal %"},{$key:"threePointFieldGoalPct",value:34.7,displayValue:"34.7",displayName:"Three Point %"}],homeAway:"away",record:"11-4",displayOrder:1},11:{id:"11",uid:"s:40~l:59~t:11",slug:"phoenix-mercury",location:"Phoenix",name:"Mercury",abbreviation:"PHX",displayName:"Phoenix Mercury",shortDisplayName:"Mercury",color:"3c286e",alternateColor:"e56020",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/phx.png",statistics:[{$key:"fieldGoalPct",value:43.1,displayValue:"43.1",displayName:"Field Goal %"},{$key:"threePointFieldGoalPct",value:34.8,displayValue:"34.8",displayName:"Three Point %"}],homeAway:"home",record:"12-4",displayOrder:2},14:{id:"14",uid:"s:40~l:59~t:14",abbreviation:"SEA",displayName:"Seattle Storm",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/sea.png"},17:{id:"17",uid:"s:40~l:59~t:17",abbreviation:"LV",displayName:"Las Vegas Aces",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/lv.png"},18:{id:"18",uid:"s:40~l:59~t:18",abbreviation:"CONN",displayName:"Connecticut Sun",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/conn.png"},19:{id:"19",uid:"s:40~l:59~t:19",abbreviation:"CHI",displayName:"Chicago Sky",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/chi.png"},20:{id:"20",uid:"s:40~l:59~t:20",abbreviation:"ATL",displayName:"Atlanta Dream",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/atl.png"},129689:{id:"129689",uid:"s:40~l:59~t:129689",abbreviation:"GS",displayName:"Golden State Valkyries",logo:"https://a.espncdn.com/i/teamlogos/wnba/500/gs.png"},130:{id:"121245",uid:"s:20~l:28~t:12",abbreviation:"KC",displayName:"Kansas City Chiefs",shortDisplayName:"Kansas City",color:"e31837",alternateColor:"ffcb05",logo:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png",homeAway:"home"},164:{id:"11232",uid:"s:20~l:28~t:12",abbreviation:"KC",displayName:"Kansas City Chiefs",shortDisplayName:"Kansas City",color:"e31837",alternateColor:"ffcb05",logo:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png",homeAway:"away"}},athletes:{2529137:{id:"2529137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4700818:{id:"2529137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4837356:{id:"2529137156425",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},5037871:{id:"252913653447",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},4873138:{id:"25275349137",uid:"s:40~l:59~a:2529137",guid:"c3d35267-fedd-d8d2-8c24-64ee7aa144ac",displayName:"Natasha Cloud",shortName:"N. Cloud",jersey:"9",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529137.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529137/natasha-cloud",text:"Player Card"}],position:{abbreviation:"G"}},2529140:{id:"2529147630",uid:"s:40~l:59~a:2529140",guid:"908608e9-31d4-62f2-dfe2-9fee9024e7e2",displayName:"Alyssa Thomas",shortName:"A. Thomas",jersey:"25",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2529140.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2529140/alyssa-thomas",text:"Player Card"}],position:{abbreviation:"F"}},2998928:{id:"29989212758",uid:"s:40~l:59~a:2998928",guid:"4d83d500-2f40-c89e-4f85-62927c5abbeb",displayName:"Breanna Stewart",shortName:"B. Stewart",jersey:"30",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2998928.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2998928/breanna-stewart",text:"Player Card"}],position:{abbreviation:"F"}},2999101:{id:"2999112756501",uid:"s:40~l:59~a:2999101",guid:"d5154a93-4a46-71af-8b55-f69328b84b54",displayName:"Jonquel Jones",shortName:"J. Jones",jersey:"35",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/2999101.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/2999101/jonquel-jones",text:"Player Card"}],position:{abbreviation:"C"}},4281929:{id:"428191234729",uid:"s:40~l:59~a:4281929",guid:"d4c403bb-a2c8-ed6b-aeaa-c290d8afea9b",displayName:"Satou Sabally",shortName:"S. Sabally",jersey:"0",headshot:"https://stitcher.espn.com/ctv/sports/basketball/leagues/wnba/athletes/4281929.jpg?w=184&h=144",links:[{rel:["playercard","desktop","athlete"],href:"https://www.espnqa.com/wnba/player/_/id/4281929/satou-sabally",text:"Player Card"}],position:{abbreviation:"F"}}}},leaders:[{displayName:"Points",name:"pointsPerGame",home:{team:{$key:"11"},athlete:{$key:"4281929",statistics:[{displayValue:"19.1",abbreviation:"PTS"},{displayValue:"39.3",abbreviation:"FG%"},{displayValue:"81.9",abbreviation:"FT%"}]}},away:{team:{$key:"9"},athlete:{$key:"2998928",statistics:[{displayValue:"20.7",abbreviation:"PTS"},{displayValue:"52.0",abbreviation:"FG%"},{displayValue:"81.6",abbreviation:"FT%"}]}}},{displayName:"Assists",name:"assistsPerGame",home:{team:{$key:"11"},athlete:{$key:"2529140",statistics:[{displayValue:"9.3",abbreviation:"AST"},{displayValue:"3.2",abbreviation:"TO"},{displayValue:"30.3",abbreviation:"MIN"}]}},away:{team:{$key:"9"},athlete:{$key:"2529137",statistics:[{displayValue:"6.5",abbreviation:"AST"},{displayValue:"2.1",abbreviation:"TO"},{displayValue:"28.3",abbreviation:"MIN"}]}}},{displayName:"Rebounds",name:"reboundsPerGame",home:{team:{$key:"11"},athlete:{$key:"4281929",statistics:[{displayValue:"8.0",abbreviation:"REB"},{displayValue:"6.5",abbreviation:"DR"},{displayValue:"1.5",abbreviation:"OR"}]}},away:{team:{$key:"9"},athlete:{$key:"2999101",statistics:[{displayValue:"9.6",abbreviation:"REB"},{displayValue:"7.7",abbreviation:"DR"},{displayValue:"1.9",abbreviation:"OR"}]}}}],header:{teams:[{$key:"11",linescores:[{displayValue:"28"},{displayValue:"33"},{displayValue:"27"},{displayValue:"18"},{displayValue:"106"}]},{$key:"9",linescores:[{displayValue:"19"},{displayValue:"24"},{displayValue:"27"},{displayValue:"21"},{displayValue:"91"}]}],linescoresHeader:["1","2","3","4","T"]},predictor:{header:"Matchup Predictor",imageUrl:"https://platform.espnqa.com/lrd/matchuppredictor/401736212",homeTeam:{team:{$key:"11"},gameProjection:"31.8"},awayTeam:{team:{$key:"9"},gameProjection:"68.2"}},winProbability:{imageUrl:"https://platform.espnqa.com/lrd/winprobability/401736212/401736212576",homeTeam:{team:{$key:"11"},winPercentage:"100"},awayTeam:{team:{$key:"9"},winPercentage:"0"}},previousGames:[{displayOrder:2,team:{$key:"11"},events:[{team:{$key:"17",homeAway:"home"},score:"76-70",gameResult:"W"},{team:{$key:"18",homeAway:"home"},score:"83-75",gameResult:"W"},{team:{$key:"9",homeAway:"home"},score:"89-81",gameResult:"W"},{team:{$key:"19",homeAway:"home"},score:"107-86",gameResult:"W"},{team:{$key:"9",homeAway:"away"},score:"106-91",gameResult:"W"}]},{displayOrder:1,team:{$key:"9"},events:[{team:{$key:"20",homeAway:"away"},score:"86-81",gameResult:"W"},{team:{$key:"11",homeAway:"away"},score:"89-81",gameResult:"L"},{team:{$key:"14",homeAway:"home"},score:"89-79",gameResult:"L"},{team:{$key:"129689",homeAway:"home"},score:"81-78",gameResult:"W"},{team:{$key:"11",homeAway:"home"},score:"106-91",gameResult:"L"}]}],gameState:"in",promotion:{title:"Serving Sports Fans. Anytime.",description:"Open the ESPN app on a mobile device to checkout more stats!",logo:"https://www.espn.com/redesign/assets/img/ictv/logo_qr/1x/logo_qr_espn.png",qrCode:"https://stitcher.espn.com/qr-code/.png?url=sportscenter%3A%2F%2Fx-callback-url%2FshowGame%3FsportName%3Dbasketball%26leagueAbbrev%3Dwnba%26gameId%3D401736212&width=200&height=200",backgroundImage:"https://www.espn.com/redesign/assets/img/ictv/bkg_qr_espn.jpg"},activeAthletes:{displayText:"Active Athletes",teams:[{team:{$key:"130"},athletes:[{$key:"4700818",statLine:"16.6 PTS, 5.2 REB"},{$key:"4837356",statLine:"4.1 AST, 2.2 TO"}]},{team:{$key:"164"},athletes:[{$key:"5037871",statLine:"19.4 PTS, 4.0 AST"},{$key:"4873138",statLine:"7.2 REB, 2.1 OR"}]}]},drives:[{id:"drive-1",team:{$key:"9"},description:"4 PLAYS, 41 YARDS, 2:15",plays:[{id:"play-1",clock:{displayValue:"8:21"},period:{number:1},type:{text:"Shotgun"},text:"I.Pacheco left tackle to PHI 20 for 24 yards (M.Epps).",start:{downDistanceText:"2nd & 5 at PHI 44"}},{id:"play-2",clock:{displayValue:"9:33"},period:{number:1},type:{text:"Shotgun"},text:"P.Mahomes pass short middle to T.Kelce to KC 48 for 20 yards (T.Edwards).",start:{downDistanceText:"1st & 10 @ KC 25"}},{id:"play-3",clock:{displayValue:"10:09"},period:{number:1},type:{text:"Shotgun"},text:"I.Pacheco up the middle to KC 28 for 3 yards (J.Hargrave).",start:{downDistanceText:"1st & 10 @ KC 25"}},{id:"play-4",clock:{displayValue:"11:15"},period:{number:1},type:{text:"Shotgun"},text:"P.Mahomes pass complete short right to T.Kelce to KC 35 for 10 yards (J.Bradberry).",start:{downDistanceText:"2nd & 10 at KC 25"}}]}],meta:{gp_topic:"gp-basketball-wnba-401736212",picker_topic:"picker-basketball-wnba",gameState:"in"}},st=t=>t&&"object"==typeof t&&"$key"in t&&"value"in t&&"displayValue"in t&&"displayName"in t,at=t=>Array.isArray(t)&&t.every(t=>(t=>t&&"object"==typeof t&&"stats"in t&&Array.isArray(t.stats))(t));function ot(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var lt=class{constructor(t){ot(this,"networkManager",void 0),ot(this,"overrideUrl",null),this.networkManager=new T.b({externalBaseURL:t.getStatsAPIBaseURL()})}async getStatsByUrl(t){return this.networkManager.externalApiRequest({endpoint:this.getSyncEndpoint(t),method:T.a.GET,params:{deviceType:"ictv"},headers:{}})}pollStatsByUrl(t,e,n,i){return this.networkManager.pollExternalApiRequest({endpoint:this.getSyncEndpoint(t),interval:e,method:T.a.GET,params:{deviceType:"ictv"},headers:{},onData:n,onError:i})}getSyncEndpoint(t){if(this.overrideUrl)return console.log("[StatsService] Using overrideUrl:",this.overrideUrl),this.overrideUrl;const{leagueId:e,mainId:n}=this.getIdsFromPageConfig(),i=this.formatTimeCodeForAPI(t),r=this.getUrlTemplateFromPanelConfig();return r?this.resolveUrlTemplate(r,e,n,i):`/${e}/${n}/en/us/${i}`}getUrlTemplateFromPanelConfig(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnStats"===t.panel_type),s=null==r||null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.url_template;return"string"==typeof s&&s.trim().length>0?s:null}resolveUrlTemplate(t,e,n,i){return t.replace(/{leagueId}/g,e).replace(/{eventId}/g,n).replace(/{timecode}/g,i)}getIdsFromPageConfig(){const t=ge.getPageConfig();if(!t)throw new Error("Page config is null or undefined");const e=t.page.metadata,n=null==e?void 0:e.external_field_1,i=null==e?void 0:e.external_field_5;if(!n||!i){const t=Object.keys(e||{}).join(", ");throw new Error("Missing eventId or leagueId in page config metadata. Cannot build sync URL. Required fields: external_field_1 (eventId), external_field_5 (leagueId). Available fields: "+t)}const{leagueId:r,fauxcastId:s}=this.parseLeagueData(i),a=s||n;if(!a.trim()||!r.trim())throw new Error("MainId or leagueId is empty string in page config metadata");return{eventId:n,leagueId:r,mainId:a}}parseLeagueData(t){try{const e=JSON.parse(t);if(!e.leagueId)throw new Error("leagueId not found in parsed JSON");return{leagueId:e.leagueId,fauxcastId:e.fauxcastId}}catch(e){const n=new Error("Failed to parse leagueId from external_field_5. Raw value: "+t);throw Object(p.a)("StatsService","parseLeagueIdFromExternalField",n,{rawValue:t,parseError:e}),n}}formatTimeCodeForAPI(t){if(!t||0===t)return"latest";if("number"!=typeof t||isNaN(t)||!isFinite(t))return console.warn('Invalid timecode provided, using "latest":',t),"latest";try{const e=new Date(t);if(isNaN(e.getTime()))return console.warn('Invalid date from timecode, using "latest":',t),"latest";const n=Date.now();if(n-t<0)return"latest";return e.toISOString().replace(/\.\d{3}Z$/,"Z")}catch(e){return Object(p.a)("StatsService","formatTimeCodeForAPI",e,{timeCode:t}),"latest"}}};const ct=t=>{var e,n;if(!t)return{plays:"0",yards:"0",time:""};const i=t.split(", ");return{plays:(null===(e=i[0])||void 0===e?void 0:e.split(" ")[0])||"0",yards:(null===(n=i[1])||void 0===n?void 0:n.split(" ")[0])||"0",time:i[2]||""}},ut=t=>{var e;if(null==t||null===(e=t.period)||void 0===e||!e.number)return"";const n=(t=>{const e=t%100;if(e>=11&&e<=13)return"th";switch(t%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}})(t.period.number);return`(${t.clock.displayValue} - ${t.period.number}${n}) (${t.type.text}) ${t.text}`};function ht(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const dt=(t,e)=>{try{const n=new Date(t),i=new Date(e),r={month:"short",day:"numeric",year:"numeric"};return`${n.toLocaleDateString("en-US",r)} - ${i.toLocaleDateString("en-US",r)}`}catch{return""}},ft=(t,e)=>({collapsedItems:e?t.slice(0,6):t}),_t={activeAthletes:"activeAthletes",driveSummary:"drives",gameLeaders:"leaders",headerTeam:"header",matchPredictor:"predictor",playerSeasonStats:"playerStats",promotion:"promotion",recentGames:"previousGames",scoringSummary:"scoringSummary",teamStats:"entities",winProbability:"winProbability",careerMatchup:"careerMatchup",penalties:"penaltySummary",golfHeader:"golfHeader",golfLeaderboard:"leaderboard",statLeaders:"statLeaders",tennisMatchHeader:"competition",tennisAlsoLive:"live"};class pt extends m.a{constructor(t,e,n,i={}){super(),ht(this,"isDataLoading",new _.a(!0)),ht(this,"hasEverSuccessfullyLoaded",new _.a(!1)),ht(this,"eventId",void 0),ht(this,"statsItems",new _.a([])),ht(this,"errorState",new _.a("none")),ht(this,"currentGameState",new _.a("")),ht(this,"statsService",void 0),ht(this,"analyticsService",void 0),ht(this,"useMockData",!1),ht(this,"lastResponseHash",null),ht(this,"currentPlayerTimeCode",null),ht(this,"timecodePollingTask",null),ht(this,"smartPollingTimeout",null),ht(this,"smartPollingAbortController",null),ht(this,"timecodePollingState",{isActive:!1,currentUrl:null,lastUpdateTime:0}),ht(this,"onEngage",t=>{this.analyticsService.panelClick({type:"espnStats",name:"stats_item_clicked",metadata:{card:[_t[t]],game_state:[this.currentGameState.value]}})}),this.eventId=t,this.useMockData=i.useMockData||!1,this.statsService=new lt(e),this.analyticsService=n}setDataToPanel(t){if("overrideUrl"in t){const e=t.overrideUrl;"string"==typeof e&&e.length>0&&(console.log("[StatsViewModel] Setting overrideUrl:",e),this.statsService.overrideUrl=e)}}async init(){if(this.useMockData)await this.fetchMockData();else{const t=this.getCurrentTimeCode();this.onUpdatePlayerTimeCode(t),this.analyticsService.panelView("espnStats")}}getCurrentTimeCode(){try{const t=ge.getMaestroEventViewModel();if(t&&"function"==typeof t.getPlayerTimeCode)return t.getPlayerTimeCode()}catch(t){Object(p.a)("StatsViewModel","getCurrentTimeCode",t)}return null}cleanup(){this.stopTimecodePolling(),this.abortSmartPollingWork(),this.resetTimecodePollingState(),null!==this.currentPlayerTimeCode&&(this.currentPlayerTimeCode=null)}onUpdatePlayerTimeCode(t){if(this.currentPlayerTimeCode=t,!this.useMockData)try{this.performSmartPolling(t)}catch(t){this.handleTimecodeError("onUpdatePlayerTimeCode",t)}}clearTabLoadFailure(){this.errorState.value="none";const t=this.getCurrentTimeCode();this.onUpdatePlayerTimeCode(t)}async performSmartPolling(t){this.stopTimecodePolling(),this.abortSmartPollingWork();const e=new AbortController;this.smartPollingAbortController=e;const{signal:n}=e;try{const e=await this.statsService.getStatsByUrl(t);if(n.aborted)return;if(!e)throw new Error("API returned undefined or null response");if(this.processPolledData(e),n.aborted)return;this.smartPollingTimeout=window.setTimeout(()=>{this.smartPollingTimeout=null,n.aborted||this.startTimecodePolling(t)},1e3)}catch(e){if(n.aborted)return;this.handleTimecodeError("performSmartPolling",e),this.stopTimecodePolling(),this.startTimecodePolling(t)}}handleTimecodeError(t,e){Object(p.a)("StatsViewModel",t,e,{currentTimecode:this.currentPlayerTimeCode,hasExistingData:this.statsItems.value.length>0,lastResponseHash:this.lastResponseHash,url:this.timecodePollingState.currentUrl}),this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure")}abortSmartPollingWork(){this.smartPollingAbortController&&(this.smartPollingAbortController.abort(),this.smartPollingAbortController=null),this.clearSmartPollingTimeout()}clearSmartPollingTimeout(){null!==this.smartPollingTimeout&&(clearTimeout(this.smartPollingTimeout),this.smartPollingTimeout=null)}resetTimecodePollingState(){this.timecodePollingState={isActive:!1,currentUrl:null,lastUpdateTime:0}}startTimecodePolling(t){this.stopTimecodePolling();try{this.timecodePollingTask=this.statsService.pollStatsByUrl(t,1e4,t=>{this.processPolledData(t)},t=>{this.handleTimecodeError("timecodePolling",t)}),this.timecodePollingState.isActive=!0}catch(t){this.handleTimecodeError("startTimecodePolling",t)}}stopTimecodePolling(){this.timecodePollingTask&&(this.timecodePollingTask.stop(),this.timecodePollingTask=null),this.timecodePollingState.isActive=!1}async fetchMockData(){this.processData(rt),this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value=!1}processPolledData(t){const e=JSON.stringify(t),n=Object(L.b)(e);this.hasEverSuccessfullyLoaded.value&&n===this.lastResponseHash||(this.lastResponseHash=n,this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.processData(t),"post"===t.gameState&&this.stopTimecodePolling())}processData(t){const e=[],n=this.parseGolfHeader(t);n&&e.push(n);const i=this.parseGolfLeaderboard(t);i&&e.push(i);const r=this.parseHeaderTeams(t);r&&e.push(r);const s=this.parseMatchPredictor(t);s&&e.push(s);const a=this.parseCareerMatchup(t);a&&e.push(a);const o=this.parsePlayerSeasonStats(t);o&&e.push(o);const l=this.parseScoringSummary(t);l&&e.push(l);const c=this.parseWinProbability(t);c&&e.push(c);const u=this.parseTeamSeasonStatistics(t)||this.parseTeamsStatistics(t);u&&e.push(u);const h=this.parseDriveSummary(t);h.length>0&&e.push(...h);const d=this.parsePenalties(t);d&&e.push(d);const f=this.parseActiveAthletes(t);f&&e.push(f);const _=this.parseGameLeaders(t);_&&e.push(_);const p=this.parseRecentGames(t);p&&e.push(p);const m=this.parseTennisCompetition(t);m&&e.push(m);const v=this.parseStatLeaders(t);v&&e.push(v);const g=this.parseTennisAlsoLive(t);g&&e.push(g);const A=this.parsePromotion(t);A&&e.push(A),this.statsItems.value=e,this.currentGameState.value=t.gameState}parseDriveSummary(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams,i=t.drives;if(!n||!i||0===i.length)return[];const r=[];for(const t of i){var s;if(null==t||null===(s=t.team)||void 0===s||!s.$key)continue;const e=[...t.plays||[]].reverse(),i=e[e.length-1]||null;let a="";i&&(a=ut(i));const{plays:o,time:l,yards:c}=ct(t.description||""),u=n[t.team.$key];u&&r.push({id:t.id,lastPlayMarquee:a,plays:e,playsQuantity:o,team:u,time:l,type:"driveSummary",yards:c})}return r}parseTeamsStatistics(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams;if(!n)return null;const i=Object.values(n).find(t=>"away"===t.homeAway),r=Object.values(n).find(t=>"home"===t.homeAway);if(!i||!r)return null;if(!i.statistics||!r.statistics)return null;const s=[];for(let t=0;t<i.statistics.length;t++){const e=i.statistics[t],n=r.statistics[t];st(e)&&st(n)&&s.push({awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",displayName:e.displayName||"",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0",awayTeamValue:(null==e?void 0:e.value)||0,homeTeamValue:(null==n?void 0:n.value)||0})}return s.length?{type:"teamStats",title:"Team Stats",awayTeam:{logo:i.logo,displayName:i.displayName||"",color:i.color||"",abbreviation:i.abbreviation||""},homeTeam:{logo:r.logo,displayName:r.displayName||"",color:r.color||"",abbreviation:r.abbreviation||""},statistics:s}:null}parseTeamSeasonStatistics(t){var e,n,i,r,s;const a=(null===(e=t.entities)||void 0===e?void 0:e.teams)||{};if(!(Object.keys(a).length&&t.statTeams&&t.statTeams.title&&null!==(n=t.statTeams.sections)&&void 0!==n&&n.length&&null!==(i=t.statTeams.teams)&&void 0!==i&&i.length))return null;const o=null===(r=t.statTeams.teams[0])||void 0===r?void 0:r.$key,l=null===(s=t.statTeams.teams[1])||void 0===s?void 0:s.$key;if(!o||!l)return null;const c=a[o],u=a[l];if(!u||!c)return null;const h={};return t.statTeams.sections.forEach(t=>{if(t.$key&&t.title){const i=[];if(at(u.statistics)&&at(c.statistics)){var e,n;const r=u.statistics.find(e=>e.$key===t.$key),s=c.statistics.find(e=>e.$key===t.$key);if(r&&s&&null!==(e=s.stats)&&void 0!==e&&e.length&&null!==(n=r.stats)&&void 0!==n&&n.length){for(let t=0;t<s.stats.length;t++){const e=s.stats[t],n=r.stats[t];i.push({awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",displayName:e.displayName||"",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0",awayTeamValue:null!=e&&e.displayValue?Number(e.displayValue):0,homeTeamValue:null!=n&&n.displayValue?Number(n.displayValue):0})}h[t.$key]={title:t.title,entries:i}}}}}),{type:"teamStats",title:t.statTeams.title,awayTeam:{abbreviation:c.abbreviation,displayName:c.displayName||"",color:c.color||"",logo:c.logo},homeTeam:{abbreviation:u.abbreviation,displayName:u.displayName||"",color:u.color||"",logo:u.logo},tabbedStatistics:h}}parseMatchPredictor(t){var e;const n=null===(e=t.entities)||void 0===e?void 0:e.teams,i=t.predictor;if(!(n&&i&&i.homeTeam&&i.awayTeam))return null;const r=n[i.homeTeam.team.$key],s=n[i.awayTeam.team.$key];if(!r||!s)return null;const a=parseFloat(i.homeTeam.gameProjection),o=parseFloat(i.awayTeam.gameProjection);return{type:"matchPredictor",header:i.header,imageUrl:i.imageUrl,awayTeam:{percentage:o,abbreviation:s.abbreviation,logo:s.logo,displayName:s.displayName||""},homeTeam:{percentage:a,abbreviation:r.abbreviation,logo:r.logo,displayName:r.displayName||""}}}parsePromotion(t){const e=t.promotion;return e?{type:"promotion",title:e.title||"",description:e.description||"",logo:e.logo||"",qrCode:e.qrCode||"",backgroundImage:e.backgroundImage||""}:null}parseCareerMatchup(t){var e;const n=t.careerMatchup,i=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(!n||!n.sections)return null;const r=t=>{if("string"==typeof t)return t;if(t&&"object"==typeof t){const e=t.displayName;if("string"==typeof e)return e}return""},s=n.sections.filter(t=>!!t).map(t=>({items:(t.items||[]).filter(t=>!!t).map(t=>{var e;const n=null===(e=t.athlete)||void 0===e?void 0:e.$key,s=i&&n?i[n]:void 0,a=r(t.status),o="On Deck"===a;return{status:a,type:r(t.type)||"",displayName:r(t.displayName)||"",athlete:s,isHighlighted:o}}),statistics:(t.statistics||[]).filter(t=>!!t).map(t=>({abbreviation:t.abbreviation||"",displayValue:t.displayValue||""}))}));return{type:"careerMatchup",title:n.title||"",sections:s}}parseHeaderTeams(t){return this.parseHeaderTeamsFromTeamHeader(t)||this.parseHeaderTeamsFromHeader(t)}parseHeaderTeamsFromHeader(t){var e,n;const i=(null===(e=t.header)||void 0===e?void 0:e.teams)||[];return 0===i.length?null:this.buildHeaderTeamsItem({response:t,headerTeams:i,linescoresHeader:(null===(n=t.header)||void 0===n?void 0:n.linescoresHeader)||[],linescoresRowHeader:void 0,isLiveFromHeaderSource:!1})}parseHeaderTeamsFromTeamHeader(t){var e,n,i,r,s,a,o,l;const c=(null===(e=t.header)||void 0===e?void 0:e.teams)||[],u=(null===(n=t.teamHeader)||void 0===n?void 0:n.teams)||[];if(0===u.length)return null;const h=u.some(t=>Array.isArray(t.linescores)&&t.linescores.length>0),d=((null===(i=t.teamHeader)||void 0===i||null===(r=i.linescoresHeader)||void 0===r?void 0:r.length)||0)>0;if(!h&&!d&&c.length>0)return null;const f="teamLogo"===(null===(s=t.teamHeader)||void 0===s||null===(a=s.style)||void 0===a||null===(o=a.linescores)||void 0===o?void 0:o.rowHeader)?"teamLogo":void 0;return this.buildHeaderTeamsItem({response:t,headerTeams:u,linescoresHeader:(null===(l=t.teamHeader)||void 0===l?void 0:l.linescoresHeader)||[],linescoresRowHeader:f,isLiveFromHeaderSource:h||d})}buildHeaderTeamsItem(t){var e;const{response:n,headerTeams:i,linescoresHeader:r,linescoresRowHeader:s,isLiveFromHeaderSource:a}=t,o=null===(e=n.entities)||void 0===e?void 0:e.teams;if(!o||0===i.length)return null;const l=i.find(t=>{const e=o[t.$key];return e&&"home"===e.homeAway}),c=i.find(t=>{const e=o[t.$key];return e&&"away"===e.homeAway}),u=i[0],h=i[1],d=l||h,f=c||u;if(!d||!f)return null;const _=o[d.$key],p=o[f.$key];if(!_||!p)return null;const m=[],v=new Set,g=p.statistics||[],A=_.statistics||[],b=g.filter(st),y=A.filter(st);[...b,...y].forEach(t=>{v.add(t.$key)}),v.forEach(t=>{const e=b.find(e=>e.$key===t),n=y.find(e=>e.$key===t);e&&n&&m.push({displayName:(null==e?void 0:e.displayName)||(null==n?void 0:n.displayName)||"",awayTeamValue:(null==e?void 0:e.value)||0,homeTeamValue:(null==n?void 0:n.value)||0,awayTeamDisplayValue:(null==e?void 0:e.displayValue)||"0",homeTeamDisplayValue:(null==n?void 0:n.displayValue)||"0"})});const w=t=>t.linescores&&t.linescores.length>0?t.linescores.map(t=>t.displayValue):"string"==typeof t.score&&t.score.length>0?[t.score]:[],E=t=>{if(Array.isArray(t.details)&&t.details.filter(Boolean).length>0)return t.details.filter(Boolean)},k=E(f),C=E(d);let x=r,B=w(f),S=w(d);if(x.length>0&&(B.length>0||S.length>0)&&"teamLogo"===s){const t=x.slice(-3);if((t.includes("R")||t.includes("H")||t.includes("E"))&&x.length>12){const t=3,e=x.length-t,n=9;if(e>n){const t=e-n;x=x.slice(t),B=B.slice(t),S=S.slice(t)}}}return{type:"headerTeam",linescoresHeader:x,linescoresRowHeader:s,isLive:"in"===n.gameState||"post"===n.gameState||a,statistics:m,awayTeam:{abbreviation:p.abbreviation,color:p.color,id:p.id,linescores:B,logo:p.logo,name:p.name,record:p.record,...k?{details:k}:{}},homeTeam:{abbreviation:_.abbreviation,color:_.color,id:_.id,linescores:S,logo:_.logo,name:_.name,record:_.record,...C?{details:C}:{}}}}parseRecentGames(t){var e,n,i;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=t.previousGames;if(!r||!s||0===s.length)return null;const a=s.find(t=>1===(null==t?void 0:t.displayOrder)),o=s.find(t=>2===(null==t?void 0:t.displayOrder));if(!a||!o)return null;if(!a.events||!o.events)return null;if(null===(n=a.team)||void 0===n||!n.$key||null===(i=o.team)||void 0===i||!i.$key)return null;const l=r[a.team.$key],c=r[o.team.$key];if(!l||!c)return null;return{type:"recentGames",awayTeam:{events:[...a.events].reverse().filter(t=>{var e;return null==t||null===(e=t.team)||void 0===e?void 0:e.$key}).map(t=>{const e=r[t.team.$key];return{gameResult:t.gameResult,homeAway:t.team.homeAway,score:t.score,teamLogo:null==e?void 0:e.logo}}),logo:l.logo,name:l.shortDisplayName},homeTeam:{events:[...o.events].reverse().filter(t=>{var e;return null==t||null===(e=t.team)||void 0===e?void 0:e.$key}).map(t=>{const e=r[t.team.$key];return{gameResult:t.gameResult,homeAway:t.team.homeAway,score:t.score,teamLogo:null==e?void 0:e.logo}}),logo:c.logo,name:c.shortDisplayName}}}parseWinProbability(t){var e;const n=t.winProbability;if(!n||!n.homeTeam||!n.awayTeam)return null;const i=null===(e=t.entities)||void 0===e?void 0:e.teams;if(!i)return null;const r=i[n.homeTeam.team.$key],s=i[n.awayTeam.team.$key];return r&&s?{type:"winProbability",chartImageUrl:n.imageUrl,awayTeam:{id:s.id,abbreviation:s.abbreviation,logo:s.logo,winPercentage:n.awayTeam.winPercentage},homeTeam:{id:r.id,abbreviation:r.abbreviation,logo:r.logo,winPercentage:n.homeTeam.winPercentage}}:null}parseGameLeaders(t){var e,n;if(null===(e=t.entities)||void 0===e||!e.athletes||null===(n=t.entities)||void 0===n||!n.teams)return null;const i=t.leaders,r="pre"===t.gameState;if(!i||0===i.length)return null;const s=[];for(const e of i){var a,o,l,c,u,h;if(!e.away||!e.home)continue;if(null===(a=e.away)||void 0===a||null===(o=a.athlete)||void 0===o||!o.$key||null===(l=e.home)||void 0===l||null===(c=l.athlete)||void 0===c||!c.$key)continue;const n=t.entities.athletes[e.away.athlete.$key],i=t.entities.athletes[e.home.athlete.$key];if(!n||!i)continue;const r=e.away.athlete.statistics||[],d=e.home.athlete.statistics||[],f={displayName:e.displayName,awayAthlete:{id:n.id,displayName:n.displayName,headshot:n.headshot?Object(G.b)(n.headshot,256,144):"",position:(null===(u=n.position)||void 0===u?void 0:u.abbreviation)||"-",shortName:n.shortName,jersey:n.jersey,statistics:r},homeAthlete:{id:i.id,displayName:i.displayName,headshot:i.headshot?Object(G.b)(i.headshot,256,144):"",position:(null===(h=i.position)||void 0===h?void 0:h.abbreviation)||"-",shortName:i.shortName,jersey:i.jersey,statistics:d}};s.push(f)}return s.length?{type:"gameLeaders",items:s,displayText:r?"Season Leaders":"Game Leaders"}:null}parseStatLeaders(t){var e,n;const i=t.statLeaders||t.profiles,r=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(null==i||null===(n=i.sections)||void 0===n||!n.length||!r)return null;const s=[];for(const t of i.sections){var a;if(null===(a=t.items)||void 0===a||!a.length)continue;const e=[];for(const n of t.items){var o,l,c;const t=null===(o=n.athlete)||void 0===o?void 0:o.$key,i=t?r[t]:void 0,s=null!=i&&i.headshot?Object(G.b)(i.headshot,256,144):"",a=(null===(l=n.athlete)||void 0===l?void 0:l.statistics)||[],u=t=>!0===t.featured||"true"===t.featured,h=a.find(u),d=h?{displayValue:h.displayValue||"",label:h.label}:null,f=a.filter(t=>!u(t)).map(t=>({displayValue:t.displayValue||"",label:t.label}));e.push({headshot:s,backgroundImage:(null==i||null===(c=i.flag)||void 0===c?void 0:c.href)||"",title:n.title||"",subtitle:n.subtitle,details:n.details,featuredStat:d,statistics:f})}e.length>0&&s.push({title:t.title||"",items:e})}return 0===s.length?null:{type:"statLeaders",title:i.title||"Stat Leaders",sections:s}}parseActiveAthletes(t){var e;const n=t.activeAthletes,{awayTeam:i,homeTeam:r}=this.getActiveAthletesTeamInfo(t),s=[];if(null===(e=t.entities)||void 0===e||!e.athletes||!n||-1===i.index||-1===r.index)return null;for(let e=0;e<n.teams[i.index].athletes.length;e++){var a,o;const l=n.teams[i.index].athletes[e],c=n.teams[r.index].athletes[e];if(null==l||!l.$key||null==c||!c.$key)continue;const u=t.entities.athletes[l.$key],h=t.entities.athletes[c.$key];if(!u||!h)continue;const d=[],f=[],_=l.statLine||"",p=c.statLine||"";_.trim().split(",").forEach((t,e)=>{const[n,i]=t.trim().split(" "),r=p.trim().split(",")[e];if(!r)return;const[s,a]=r.trim().split(" ");d.push({displayValue:n||"0",abbreviation:i||"-",value:parseFloat(n)||0}),f.push({displayValue:s||"0",abbreviation:a||"-",value:parseFloat(s)||0})}),s.push({awayAthlete:{id:u.id,displayName:u.displayName,headshot:u.headshot?Object(G.b)(u.headshot,256,144):"",position:(null===(a=u.position)||void 0===a?void 0:a.abbreviation)||"-",shortName:u.shortName,jersey:u.jersey,statistics:d,minifiedStatistics:l.statLine},homeAthlete:{id:h.id,displayName:h.displayName,headshot:h.headshot?Object(G.b)(h.headshot,256,144):"",position:(null===(o=h.position)||void 0===o?void 0:o.abbreviation)||"-",shortName:h.shortName,jersey:h.jersey,statistics:f,minifiedStatistics:c.statLine}})}return s.length?{type:"activeAthletes",awayTeam:i,homeTeam:r,athletes:s,displayText:n.displayText}:null}getActiveAthletesTeamInfo(t){var e,n;const i=(null===(e=t.activeAthletes)||void 0===e?void 0:e.teams)||[];let r={index:-1,id:"",logo:"",name:"-"},s={index:-1,id:"",logo:"",name:"-"};const a=null===(n=t.entities)||void 0===n?void 0:n.teams;if(!a)return{awayTeam:r,homeTeam:s};for(let t=0;t<i.length;t++){const e=a[i[t].team.$key];e&&("away"===e.homeAway?r={index:t,id:e.id,logo:e.logo,name:e.name||"-"}:"home"===e.homeAway&&(s={index:t,id:e.id,logo:e.logo,name:e.name||"-"}))}return{awayTeam:r,homeTeam:s}}parseScoringSummary(t){var e,n;const i=t.scoringSummary;if(!i||!i.sections)return null;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=null===(n=t.entities)||void 0===n?void 0:n.athletes;if((t=>t&&"object"==typeof t&&"title"in t&&"sections"in t&&t.sections&&Array.isArray(t.sections)&&t.sections.some(t=>t&&"items"in t&&Array.isArray(t.items)&&t.items.some(t=>t&&("text"in t||"shortText"in t||"header"in t))))(i)){const t=[];for(const e of i.sections){var a;if(!e.title||null===(a=e.items)||void 0===a||!a.length)continue;const n=[];for(const t of e.items){var o,l,c;if(null==t||null===(o=t.team)||void 0===o||!o.$key||null==t||null===(l=t.athlete)||void 0===l||!l.$key)continue;const e=null==r?void 0:r[t.team.$key],i=null==s?void 0:s[t.athlete.$key];if(!e||!i)continue;const a=[];t.shortText&&a.push({featured:!1,title:t.shortText}),n.push({teamLogo:(null==e?void 0:e.logo)||"",teamName:null==e?void 0:e.abbreviation,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,200,144):void 0,athleteShortName:(null==i?void 0:i.shortName)||"",athleteJersey:null!=i&&i.jersey?"#"+i.jersey:"",athletePosition:(null==i||null===(c=i.position)||void 0===c?void 0:c.abbreviation)||"",text:(null==t?void 0:t.text)||"",shortText:a,header:((null==t?void 0:t.header)||[]).map((t,e)=>{var n,i;return{featured:null!==(n=t.featured)&&void 0!==n&&n,title:`${null!==(i=t.title)&&void 0!==i?i:""}${0===e?",":""}`}})})}if(n.length>0){const i=ft(n,!0);t.push({title:e.title,items:n,...i})}}return 0===t.length?null:{type:"scoringSummary",tag:"mlb",title:i.title||"Scoring Summary",sections:t}}if((t=>t&&"object"==typeof t&&"title"in t&&"sections"in t&&t.sections&&Array.isArray(t.sections)&&t.sections.every(t=>t&&"title"in t&&"items"in t&&Array.isArray(t.items)&&t.items.every(t=>t&&"clock"in t&&"title"in t&&"team"in t&&"athlete"in t)))(i)){const t=i,e=[];for(const n of t.sections||[]){const t=[];for(const e of n.items||[]){var u,h,d,f;if(null==e||null===(u=e.team)||void 0===u||!u.$key||null==e||null===(h=e.athlete)||void 0===h||!h.$key||null==e||!e.title)continue;const n=e.team&&e.team.$key?null==r?void 0:r[e.team.$key]:void 0,i=(null===(d=e.athlete)||void 0===d?void 0:d.$key)||"",a=null==s?void 0:s[i],o=e.title||"",[l,...c]=o.split(" ");let _="",p="";c.length>0&&(_=c[c.length-1],p=c.slice(0,-1).join(" "));const m=[];e.clock&&m.push({featured:!0,title:e.clock}),null!=n&&n.abbreviation&&m.push({featured:!1,title:n.abbreviation});const v=[];l&&v.push({featured:!1,title:l}),p&&v.push({featured:!0,title:p}),_&&v.push({featured:!1,title:_}),t.push({teamLogo:(null==n?void 0:n.logo)||"",teamName:(null==n?void 0:n.abbreviation)||"",header:m,text:(null==e?void 0:e.description)||"",shortText:v,headshot:null!=a&&a.headshot?Object(G.b)(a.headshot,200,144):void 0,athleteShortName:p,athletePosition:(null==a||null===(f=a.position)||void 0===f?void 0:f.abbreviation)||"",athleteJersey:l})}if(t.length>0){const i=ft(t,!0);e.push({title:(null==n?void 0:n.title)||"",items:t,...i})}}return 0===e.length?null:{type:"scoringSummary",tag:"hockey",title:t.title||"Scoring Summary",sections:e}}return null}parsePenalties(t){var e,n;const i=t.penaltySummary;if(!i||!i.sections)return null;const r=null===(e=t.entities)||void 0===e?void 0:e.teams,s=null===(n=t.entities)||void 0===n?void 0:n.athletes,a=i.sections.map(t=>{const e=t.items.filter(t=>{var e,n;return(null==t||null===(e=t.team)||void 0===e?void 0:e.$key)&&(null==t||null===(n=t.athlete)||void 0===n?void 0:n.$key)}).map(t=>{var e;const n=null==r?void 0:r[t.team.$key],i=null==s?void 0:s[t.athlete.$key],[a,...o]=t.title.split(" "),l=(null!=o?o:[]).join(" ")||"",c=[];return a&&c.push({featured:!1,title:a}),l&&c.push({featured:!0,title:l}),{teamLogo:(null==n?void 0:n.logo)||"",teamName:(null==n?void 0:n.abbreviation)||"",header:[{title:t.clock||"",featured:!1}],text:t.description||"",shortText:c,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,200,144):void 0,athleteShortName:o.join(" "),athletePosition:(null==i||null===(e=i.position)||void 0===e?void 0:e.abbreviation)||"",athleteJersey:a||""}}),n=ft(e,!1);return{title:t.title,items:e,...n}});return!a.length||a.every(t=>0===t.items.length)?null:{type:"penalties",tag:"penalties",title:i.title,sections:a}}parsePlayerSeasonStats(t){var e,n,i;const r=t.playerStats,s=null===(e=t.entities)||void 0===e?void 0:e.teams,a=null===(n=t.entities)||void 0===n?void 0:n.athletes;if(null==r||null===(i=r.teams)||void 0===i||!i.length||!s)return null;const o=[];for(const t of r.teams){if(!t.$key)continue;const e=s[t.$key];if(!e)continue;const n=[];for(const e of t.sections||[]){var l;if(!e.title||null===(l=e.items)||void 0===l||!l.length)continue;const t=[];for(const n of e.items){var c,u,h,d,f;if(!n.title)continue;const e=null===(c=n.athlete)||void 0===c?void 0:c.$key,i=e?null==a?void 0:a[e]:void 0,r=(null===(u=n.athlete)||void 0===u?void 0:u.statistics)||[],s=r.find(t=>t.featured);t.push({athleteId:e,title:n.title,headshot:null!=i&&i.headshot?Object(G.b)(i.headshot,256,144):"",position:(null==i||null===(h=i.position)||void 0===h?void 0:h.abbreviation)||"",jersey:(null==i?void 0:i.jersey)||"",featuredStat:s?{displayValue:s.displayValue||"",label:s.label||""}:null,statistics:r.filter(t=>!t.featured).map(t=>({displayValue:t.displayValue||"",label:t.label||""})),playerStatus:null!=n&&n.status?{displayName:null!==(d=n.status.displayName)&&void 0!==d?d:"",type:null!==(f=n.status.type)&&void 0!==f?f:""}:null})}if(t.length>0){let i=null;e.onDeckAthlete&&(i=t.find(t=>t.athleteId===e.onDeckAthlete)||null),n.push({title:e.title,items:t,onDeckPlayer:i})}}n.length>0&&o.push({teamKey:t.$key,shortDisplayName:e.shortDisplayName||e.displayName||"",color:e.color||"",sections:n})}return 0===o.length?null:{type:"playerSeasonStats",teams:o}}parseGolfHeader(t){var e;const n=t.golfHeader||t.competitionHeader;return n?{title:n.title||"",details:n.details||[],dateRange:dt(n.date||"",n.endDate||""),logoUrl:n.logoUrl||"",courseSummary:n.summary||[],weather:n.weather?{temperature:null!==(e=n.weather.temperature)&&void 0!==e?e:0,iconUrl:n.weather.iconUrl||"",logoUrl:n.weather.logoUrl||""}:void 0,type:"golfHeader"}:null}parseGolfLeaderboard(t){var e,n,i;const r=t.leaderboard,s=null===(e=t.entities)||void 0===e?void 0:e.athletes;if(!r||null===(n=r.leaderboardHeader)||void 0===n||!n.length||null===(i=r.leaders)||void 0===i||!i.length)return null;const a=(r.linescoresHeader||[]).map(t=>({label:t.label||"",values:t.values||[]})),o=(r.scoreTypeKey||[]).map(t=>({label:t.label||"",iconUrl:t.iconUrl||""})),l=r.leaders.map(t=>{var e,n,i,r,a,o,l,c,u,h,d;const f=null===(e=t.leaderboardValues)||void 0===e?void 0:e[0],_=null==f||null===(n=f.athlete)||void 0===n?void 0:n.$key,p=_?null==s?void 0:s[_]:void 0,m=null!==(i=null==f?void 0:f.displayValue)&&void 0!==i?i:"",v=null!==(r=null==p||null===(a=p.flag)||void 0===a?void 0:a.href)&&void 0!==r?r:"",g=null!==(o=null==p?void 0:p.shortName)&&void 0!==o?o:"",A=null!==(l=null==f||null===(c=f.athlete)||void 0===c?void 0:c.subtitles)&&void 0!==l?l:[],b=null==f?void 0:f.athlete,y=null!==(u=null==b?void 0:b.currentHoleIndex)&&void 0!==u?u:null==b?void 0:b.currentHole,w=null==b?void 0:b.startingHole;return{position:m,flagUrl:v,name:g,subtitles:A,values:null!==(h=null===(d=t.leaderboardValues)||void 0===d?void 0:d.slice(1).map(t=>{var e;return null!==(e=t.displayValue)&&void 0!==e?e:""}))&&void 0!==h?h:[],currentHoleIndex:y,startingHole:w,linescoreValues:(t.linescoreValues||[]).map(t=>({label:t.label||"",values:(t.values||[]).map(t=>{var e;return{displayValue:null!==(e=t.displayValue)&&void 0!==e?e:"",type:t.type}})}))}}),c=l.slice(0,5),u=Math.max(0,Math.min(10,l.length)-5),h=u>0?`+${u} More for the Top Ten`:null;return{type:"golfLeaderboard",leaderboardHeader:[...r.leaderboardHeader],linescoreHeader:a,scoreTypeKey:o,players:l,topPlayers:c,showMoreText:h}}parseSingleTennisCompetition(t,e){var n,i,r,s,a,o,l,c,u,h,d;if(null==t||null===(n=t.competitors)||void 0===n||!n.length||t.competitors.length<2)return null;const f="doubles"===(null===(i=t.type)||void 0===i?void 0:i.type),_=null!==(r=null!==(s=null===(a=t.situation)||void 0===a||null===(o=a.server)||void 0===o?void 0:o.competitorId)&&void 0!==s?s:null===(l=t.situation)||void 0===l||null===(c=l.server)||void 0===c?void 0:c.id)&&void 0!==r?r:null,p=[...t.competitors].sort((t,e)=>Number(t.displayOrder)-Number(e.displayOrder)).map(t=>{var n,i,r,s,a,o;const l=(null!==(n=null!==(i=t.athlete)&&void 0!==i?i:t.athletes)&&void 0!==n?n:[]).map(t=>t.$key),c=(null!==(r=t.linescores)&&void 0!==r?r:[]).map(t=>{var e;return{displayValue:null!==(e=t.displayValue)&&void 0!==e?e:null!=t.value?String(t.value):"",tiebreak:null!=t.tiebreak?String(t.tiebreak):void 0,winner:t.winner}});if(f&&l.length>=2){const n=l.map(t=>{var n,i,r,s,a,o;const l=null==e?void 0:e[t];return{shortName:null!==(n=null==l?void 0:l.shortName)&&void 0!==n?n:"",countryAbbr:null!==(i=null==l||null===(r=l.country)||void 0===r?void 0:r.abbreviation)&&void 0!==i?i:"",abbreviation:null!==(s=null==l?void 0:l.abbreviation)&&void 0!==s?s:"",flagHref:null==l||null===(a=l.country)||void 0===a||null===(o=a.flag)||void 0===o?void 0:o.href}});return{id:t.id,displayOrder:Number(t.displayOrder),ranking:t.ranking,winner:t.winner,linescores:c,athleteKeys:l,athletes:n}}const u=l[0],h=u?null==e?void 0:e[u]:void 0;return{id:t.id,displayOrder:Number(t.displayOrder),ranking:t.ranking,winner:t.winner,linescores:c,athleteKeys:l,headshot:null==h?void 0:h.headshot,shortName:null==h?void 0:h.shortName,countryAbbr:null==h||null===(s=h.country)||void 0===s?void 0:s.abbreviation,abbreviation:null==h?void 0:h.abbreviation,flagHref:null==h||null===(a=h.country)||void 0===a||null===(o=a.flag)||void 0===o?void 0:o.href}});return{type:"tennisMatchHeader",title:null!==(u=t.title)&&void 0!==u?u:"",court:null!==(h=t.court)&&void 0!==h?h:"",isDoubles:f,serverCompetitorId:_,linescoresHeader:null!==(d=t.linescoresHeader)&&void 0!==d?d:[],competitors:p}}parseTennisCompetition(t){var e;const n=t.competition;return n?this.parseSingleTennisCompetition(n,null===(e=t.entities)||void 0===e?void 0:e.athletes):null}parseTennisAlsoLive(t){var e,n,i;const r=t.live;if(null==r||null===(e=r.competitions)||void 0===e||!e.length)return null;const s=null===(n=t.entities)||void 0===n?void 0:n.athletes,a=r.competitions.map(t=>this.parseSingleTennisCompetition(t,s)).filter(t=>!!t);return 0===a.length?null:{type:"tennisAlsoLive",title:null!==(i=r.title)&&void 0!==i?i:"Also Live",competitions:a}}}var mt=pt;function vt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var gt=class{constructor(){vt(this,"networkManager",void 0),vt(this,"leagueManagerOverrideBaseUrl",""),vt(this,"fantasyOverrideBaseUrl",""),vt(this,"gambitOverrideBaseUrl",""),this.networkManager=new T.b}get fantasyBaseUrl(){return this.fantasyOverrideBaseUrl||"https://fan.api.espn.com"}get leagueManagerBaseUrl(){return this.leagueManagerOverrideBaseUrl||"https://lm-api-partner.fantasy.espn.com"}get tournamentChallengeBaseUrl(){return this.gambitOverrideBaseUrl||"https://gambit-api-partner.fantasy.espn.com"}pollFantasy({eventId:t,jwt:e,swid:n},i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.fantasyBaseUrl}/apis/v2/fans/${n}`,interval:i,headers:{"x-p13n-auth":e},onData:r,onError:s,params:{displayHiddenPrefs:!0,context:"fantasy",useCookieAuth:!0,source:"fantasyictv-bbd",featureFlags:"challengeEntries",filterType:"FANTASY_CTV",platform:"fantasyictv_bbd",deviceType:"ictv",swid:n,eventId:t}})}pollLeagueManager({game:t,leagueId:e,seasonId:n,token:i,proGameId:r,teamId:s},a,o,l){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.leagueManagerBaseUrl}/apis/v3/games/${t}/seasons/${n}/segments/0/leagues/${e}/scoreboard`,interval:a,onData:o,onError:l,headers:{"x-p13n-auth":i},params:{view:"ictv_scoreboard",platform:"fantasyictv_bbd",deviceType:"ictv",proGameId:r,teamId:s}})}getPromo(){return this.networkManager.externalApiRequest({endpoint:"https://client.espncdn.com/ictv/promo.json",useCache:!0})}pollTournamentChallenge({challengeId:t,competitionId:e,token:n},i,r,s){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`${this.tournamentChallengeBaseUrl}/apis/v1/challenges/${t}/scoreboard`,interval:i,onData:r,onError:s,headers:{"x-p13n-auth":n},params:{competitionId:e,view:"ictv_scoreboard",platform:"fantasyictv_bbd",deviceType:"ictv"}})}};const At=t=>{var e,n;return void 0!==(null===(e=t.matchups)||void 0===e||null===(n=e[0])||void 0===n?void 0:n.teams)};function bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class yt{constructor(t){bt(this,"polling",{interval:6e4,task:null,lastResponseHash:null}),bt(this,"fantasyService",void 0),this.fantasyService=t}async refresh(t,e,n){this.stop(),await this.start(t,e,n)}stop(){this.polling.task&&(this.polling.task.stop(),this.polling.task=null)}removeLastResponseHash(){this.polling.lastResponseHash=null}async start(t,e,n){try{this.polling.task=this.fantasyService.pollFantasy(t,this.polling.interval,i=>{this.updateInterval(t,i.headers,e,n),this.processPolledData(i.data,e)},e=>{this.handlePollingError(e,t.swid),n(e)})}catch(t){Object(p.a)("FantasyPolling","pollFantasy",t)}}updateInterval(t,e,n,i){const r=this.getResponseHeaderPollingIntervalValue(e),s=this.getPanelConfigInterval(),a=r||s;a&&a!==this.polling.interval&&(console.log(`[Fantasy] Updating fantasy polling interval from ${this.polling.interval}ms to ${a}ms`),this.polling.interval=a,this.refresh(t,n,i))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[Fantasy] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.fan_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[FANTASY] Invalid fantasy polling interval from panel config: ${s}.`),null):1e3*a}processPolledData(t,e){const n=Object(L.b)(JSON.stringify(t));this.polling.lastResponseHash!==n?(this.polling.lastResponseHash=n,e(t)):console.log("[Fantasy] Fantasy Response hash is the same as last successful response - skipping update")}handlePollingError(t,e){Object(p.a)("FantasyPolling","handlePollingError",t,{swid:e?e.substring(0,8)+"...":"unknown",pollingInterval:this.polling.interval})}}function wt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Et{constructor(t){wt(this,"polling",{}),wt(this,"fantasyService",void 0),this.fantasyService=t}refresh(t,e,n,i){this.stop(t),this.polling[t]||(this.polling[t]={interval:6e4,lastResponseHash:null,task:null}),this.start(t,e,n,i)}stop(t){var e,n,i,r;null!==(e=this.polling[t])&&void 0!==e&&e.task&&(null===(n=this.polling[t])||void 0===n||null===(i=n.task)||void 0===i||null===(r=i.stop)||void 0===r||r.call(i),this.polling[t].task=null)}start(t,e,n,i){try{this.polling[t].task=this.fantasyService.pollLeagueManager(e,this.polling[t].interval,r=>{this.updateInterval(t,e,n,r.headers,i),this.processPolledData(t,r.data,n)},n=>{this.handlePollingError(n,t,e),i(n)})}catch(t){Object(p.a)("LeagueManagerPolling","pollLeagueManager",t)}}processPolledData(t,e,n){const i=Object(L.b)(JSON.stringify(e));this.polling[t].lastResponseHash!==i?(this.polling[t].lastResponseHash=i,n(e)):console.log("[Fantasy] League manager Response hash is the same as last successful response - skipping update")}updateInterval(t,e,n,i,r){var s;const a=this.getResponseHeaderPollingIntervalValue(i),o=this.getPanelConfigInterval(),l=a||o;var c;l&&l!==(null===(s=this.polling[t])||void 0===s?void 0:s.interval)&&(console.log(`[Fantasy] Updating league manager polling interval from ${null===(c=this.polling[t])||void 0===c?void 0:c.interval}ms to ${l}ms`),this.polling[t].interval=l,this.refresh(t,e,n,r))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[Fantasy] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.lm_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[FANTASY] Invalid league manager polling interval from panel config: ${s}.`),null):1e3*a}stopAll(){Object.keys(this.polling).forEach(t=>{this.stop(t)}),this.polling={}}handlePollingError(t,e,n){var i;Object(p.a)("LeagueManagerPolling","handlePollingError",t,{key:e,leagueId:null==n?void 0:n.leagueId,game:null==n?void 0:n.game,pollingInterval:null===(i=this.polling[e])||void 0===i?void 0:i.interval})}}function kt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ct{constructor(t){kt(this,"polling",{}),kt(this,"fantasyService",void 0),this.fantasyService=t}refresh(t,e,n,i){this.stop(t),this.polling[t]||(this.polling[t]={interval:6e4,lastResponseHash:null,task:null}),this.start(t,e,n,i)}stop(t){var e,n,i,r;null!==(e=this.polling[t])&&void 0!==e&&e.task&&(null===(n=this.polling[t])||void 0===n||null===(i=n.task)||void 0===i||null===(r=i.stop)||void 0===r||r.call(i),this.polling[t].task=null)}start(t,e,n,i){try{this.polling[t].task=this.fantasyService.pollTournamentChallenge(e,this.polling[t].interval,r=>{this.updateInterval(t,e,n,r.headers,i),this.processPolledData(t,r.data,n)},n=>{this.handlePollingError(n,t,e),i(n)})}catch(t){Object(p.a)("TournamentPolling","pollTournamentChallenge",t)}}updateInterval(t,e,n,i,r){var s;const a=this.getResponseHeaderPollingIntervalValue(i),o=this.getPanelConfigInterval(),l=a||o;var c;l&&l!==(null===(s=this.polling[t])||void 0===s?void 0:s.interval)&&(console.log(`[TOURNAMENT] Updating tournament polling interval from ${null===(c=this.polling[t])||void 0===c?void 0:c.interval}ms to ${l}ms`),this.polling[t].interval=l,this.refresh(t,e,n,r))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[TOURNAMENT] Invalid polling interval header received: ${e}.`),null):1e3*n}getPanelConfigInterval(){var t,e,n;const i=ge.getPageConfig(),r=null==i||null===(t=i.panels)||void 0===t?void 0:t.find(t=>"espnFantasy"===t.panel_type);if(!r)return null;const s=null===(e=r.renderer)||void 0===e||null===(n=e.block_data)||void 0===n?void 0:n.gambit_polling_interval;if(!s)return null;const a=parseInt(s,10);return isNaN(a)||a<=0?(console.warn(`[TOURNAMENT] Invalid tournament polling interval from panel config: ${s}.`),null):1e3*a}processPolledData(t,e,n){const i=Object(L.b)(JSON.stringify(e));this.polling[t].lastResponseHash!==i?(this.polling[t].lastResponseHash=i,n(e)):console.log("[TOURNAMENT] Tournament Response hash is the same as last successful response - skipping update")}stopAll(){Object.keys(this.polling).forEach(t=>{this.stop(t)}),this.polling={}}handlePollingError(t,e,n){var i;Object(p.a)("TournamentPolling","handlePollingError",t,{key:e,challengeId:null==n?void 0:n.challengeId,pollingInterval:null===(i=this.polling[e])||void 0===i?void 0:i.interval})}}const xt={id:"{969DDFA7-B575-4017-966C-ED83EC3EDF37}",anon:!1,profile:{createDate:1533061925808,lastUpdateDate:1762527083860,hasNotificationPreferences:!1,useSortGlobal:!0,settings:{videoAutoStart:{value:"1",createDate:1533061925808},hideSportsBetting:{value:"false",createDate:1757023536525},activeProducts:{value:"true",createDate:1533379743011}},isInsider:!0,isPremium:!0,lastName:"Janssen",firstName:"Megan",email:"megan.m.janssen@espn.com",userName:"meganjanssen25"},lastAccessDate:"2025-11-10T05:27:31Z",createDate:"2018-07-31T18:32:05Z",lastUpdateDate:"2025-11-07T14:51:23Z",bettingFeatures:[{name:"bettingContentEnabled",value:!0},{name:"bettingLinksEnabled",value:!1}],preferences:[{id:"1:549555067:1:2025",createDate:1742909253422,lastUpdateDate:1757380930299,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MoM",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:549555067,groupSize:16,groupName:"Fantasy Eng - Guillotine",groupManager:!0,draftDate:"1794416827000",draftType:1,draftStatus:1,leagueStatus:1,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=549555067&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=549555067&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_VALID",logoUrl:"https://upload.wikimedia.org/wikipedia/en/0/0d/Daenerys_Targaryen_with_Dragon-Emilia_Clarke.jpg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=549555067&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/549555067?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:7,isHidden:!0,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"4:1278583616:1:2025",createDate:1742915003927,lastUpdateDate:1756670657496,metaData:{entry:{entryId:4,entryMetadata:{teamName:"Megantron",teamAbbrev:"MEGA",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1278583616,groupSize:18,groupName:"Tarps OFF",groupManager:!1,draftDate:17557776e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1278583616&teamId=4",href:"https://fantasy.espn.com/football/league?leagueId=1278583616&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_VALID",logoUrl:"https://i.giphy.com/media/fZ91xzFtKWmoJSD4TK/giphy.gif",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1278583616&teamId=4&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1278583616?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B4%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772944:1,401772630:1,401772772:1,401772773:1,401772927:1,401772879:1,401772636:1,401772876:1}},currentLineup:{"-16026":16,16800:23,3043078:2,3052587:0,3121023:6,3123052:17,3139477:20,4241985:2,4242355:20,4362238:20,4372016:4,4426385:20,4429025:20,4612826:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:9,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1027557112:1:2025",createDate:1742911155496,lastUpdateDate:1756920410999,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MoM",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1027557112,groupSize:8,groupName:"Fantasy Platform Engineers",groupManager:!0,draftDate:17569188e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1027557112&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=1027557112&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/Solo/ESPN_Star_Wars_Qira-01.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1027557112&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1027557112?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772630:1,401772927:1,401772879:1,401772876:2,401772636:4}},currentLineup:{"-16009":16,3040151:6,3121023:20,3123052:17,3139477:20,3917792:7,4239993:20,4242335:2,4372016:4,4429615:4,4430807:2,4433970:0,4569987:23,4683062:20},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:10,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:40059468:1:2025",createDate:1742915689938,lastUpdateDate:1756774193047,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Lamb-da Functions",teamAbbrev:"LAMB",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:40059468,groupSize:8,groupName:"The Bean Queens",groupManager:!0,draftDate:17567712e5,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=40059468&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=40059468&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_UPLOAD",logoUrl:"https://mystique-api.fantasy.espn.com/apis/v1/domains/lm/images/bc9f0e30-8796-11f0-b6e4-9dd13c0fbbe2",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=40059468&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/40059468?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:2,401772772:1,401772773:1,401772927:3,401772876:1,401772636:1}},currentLineup:{"-16001":16,15818:4,3052587:0,3054850:20,3116365:20,3917792:20,4241389:20,4361307:6,4362081:17,4379399:2,4429025:23,4429160:2,4429615:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:11,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:2124806394:1:2025",createDate:1742912327647,lastUpdateDate:1757029916228,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Team Baron",teamAbbrev:"BARO",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:2124806394,groupSize:16,groupName:"Live Scoring",groupManager:!1,draftDate:1,draftType:2,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=2124806394&teamId=2",href:"https://fantasy.espn.com/football/league?leagueId=2124806394&seasonId=2025",draftTypeName:"Autopick"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/19.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=2124806394&teamId=2&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/2124806394?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772770:1,401772771:3,401772944:1,401772630:1,401772772:1,401772773:2,401772875:2,401772878:1,401772879:2,401772927:11,401772876:1}},currentLineup:{"-16012":16,"-16003":16,"-14012":19,"-14002":19,15818:4,2473037:17,2971573:17,3045138:23,3059915:2,3126368:18,3139477:0,3915411:2,3918298:20,4012556:2,4034779:23,4037457:2,4038941:0,4240472:6,4241985:2,4242369:23,4242557:23,4242558:6,4360797:23,4361432:23,4361496:18,4362087:21,4362477:4,4362921:4,4372414:23,4421446:2,4428331:4,4429025:4,4430723:6,4430968:2,4431611:20,4595342:6,4596602:2,4597703:23,4612826:4,4686612:4,4689988:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:12,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1678259:1:2025",createDate:1742913134199,lastUpdateDate:1755702318851,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Test Acct",teamAbbrev:"MEGA",leagueFormatTypeId:0,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:1678259,groupSize:4,groupName:"BYE WEEK TEST!",groupManager:!0,draftDate:null,draftType:0,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=1678259&teamId=1",href:"https://fantasy.espn.com/football/league?leagueId=1678259&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/DIS_Avengers_EndGame/DIS_Avengers_EndGame_A_2.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=1678259&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/1678259?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772769:1,401772630:2,401772927:2,401772876:1}},currentLineup:{2577417:0,3121023:6,4040715:20,4047646:4,4047650:4,4361579:2,4372019:2,4426354:4,4429615:4,4569987:2,4685016:2},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:13,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"8:1130440938:2:2025",createDate:1737632028020,lastUpdateDate:1759462119590,metaData:{entry:{entryId:8,entryMetadata:{teamName:"Mother of Minigames",teamAbbrev:"MINI",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1130440938,groupSize:8,groupName:"Interactive Platform Legends!",groupManager:!1,draftDate:1743012e6,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1130440938&teamId=8",href:"http://fantasy.espn.com/baseball/league?leagueId=1130440938&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/Solo/ESPN_Star_Wars_Qira-01.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1130440938&teamId=8&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1130440938?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B8%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{32157:13,32367:3,32685:13,32767:12,34945:5,34967:17,34995:5,36020:5,36071:13,36488:16,39895:0,40080:17,41179:2,41355:4,42433:13,42449:13,42796:17,4109109:1,4208281:16,4692526:13,5132011:16,5150939:13},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:13,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1335047630:2:2025",createDate:1742230557423,lastUpdateDate:1755632109653,metaData:{entry:{entryId:1,entryMetadata:{teamName:"UnDrafted",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1335047630,groupSize:10,groupName:"Undrafted; Not Set",groupManager:!0,draftDate:null,draftType:1,draftStatus:1,leagueStatus:1,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1335047630&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1335047630&seasonId=2025",draftTypeName:"Snake"}],logoType:"CUSTOM_UPLOAD",logoUrl:"https://mystique-api.fantasy.espn.com/apis/v1/domains/lm/images/5c82c630-212b-11f0-bf52-473646e3de99",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1335047630&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1335047630?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:17,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"cd9ccb60-2a84-11f0-a3e0-ffe8c80e5341",createDate:1762778889707,metaData:{entry:{entryUuid:"cd9ccb60-2a84-11f0-a3e0-ffe8c80e5341",lastAvailableDate:176819394e4,challengeId:"263",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png",darkLogoURL:"https://chui-assets-cdn.espn.com/149a15a7-10e7-421a-ae38-d7ff4df3f8de.png",lightLogoURL:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png"},gameUrl:"https://fantasy.espn.com/games/nfl-win-totals-2025",entryName:"Megan_Janssen2's Picks 1",challengeGroups:"",score:{eliminated:!1,overallScore:10,percentile:.73421348,rank:43043,record:{losses:2,wins:1}},scoreByGroup:"",scoringFormatId:1}},sortGlobal:1382,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"10:978432872:1:2025",createDate:1750808942792,lastUpdateDate:1753110440776,metaData:{entry:{entryId:10,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:7,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:978432872,groupSize:10,groupName:"San Francisco Gridiron Gauntlet League",groupManager:!1,draftDate:175080918e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=978432872&teamId=10",href:"https://fantasy.espn.com/football/league?leagueId=978432872&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/8.svg",restrictionType:5,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=978432872&teamId=10&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/978432872?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B10%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772770:1,401772771:1,401772944:1,401772630:1,401772773:2,401772875:2}},currentLineup:{"-16022":16,3050478:17,3116385:2,3915416:4,3916148:20,4241389:4,4361307:6,4361370:20,4428209:20,4429160:2,4431299:20,4431611:0,4567750:20,4568490:23,4569173:20,4882093:20},restrictionTypeName:"GAUNTLET"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:1398,isHidden:!0,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"9:2118520298:1:2025",createDate:1753457483090,lastUpdateDate:1753459839424,metaData:{entry:{entryId:9,entryMetadata:{teamName:"Megan's Monstrous Team",teamAbbrev:"MMT",leagueFormatTypeId:3,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:1,groups:[{groupId:2118520298,groupSize:10,groupName:"Detroit Beginner H2H Points PPR League",groupManager:!1,draftDate:175345788e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/football/fantasycast?leagueId=2118520298&teamId=9",href:"https://fantasy.espn.com/football/league?leagueId=2118520298&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/ffl/images/default_logos/4.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/football/team?leagueId=2118520298&teamId=9&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/ffl/seasons/2025/segments/0/leagues/2118520298?view=mScoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B9%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FFL",name:"Fantasy Football 2025",description:"Fantasy Football",logoURL:"https://g.espncdn.com/s/ffllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/football/welcome",href:"https://www.espn.com/fantasy/football/",lineup:{proGameToNumPlayersStarting:{401772771:1,401772769:1,401772772:1,401772773:1,401772875:1,401772927:1,401772879:2,401772876:1}},currentLineup:{"-16016":16,16800:4,2977187:23,3052587:0,3123076:6,3925357:20,4360516:20,4360569:20,4362081:17,4362249:20,4429013:20,4429160:2,4429615:20,4430737:2,4569618:20,4595348:4},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:10},contentSourceId:10,sortGlobal:1402,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1028491758:5:2025",createDate:1747420135832,lastUpdateDate:1757663182317,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan Team 1",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=1",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StarWarsTheRiseOfSkywalker/rise-skywalker-r2d2.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{869:4,2529140:4,2529205:6,2998938:1,3058895:6,3058901:5,3146151:6,4432831:4,4433403:1},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1383,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"4:1028491758:5:2025",createDate:1747420173876,lastUpdateDate:1757663182341,metaData:{entry:{entryId:4,entryMetadata:{teamName:"Megan Team 4",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=4",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/fba/Jerseys-ESPN/fba-jerseys-31.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=4&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B4%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{2529130:6,2998928:4,3065570:1,3913881:6,4066533:1,4398674:5,4420318:4,4433402:4,4433630:6},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1384,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"3:1028491758:5:2025",createDate:1747420178168,lastUpdateDate:1757663182333,metaData:{entry:{entryId:3,entryMetadata:{teamName:"Megan Team 3",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=3",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/DIS_Avengers_EndGame/DIS_Avengers_EndGame_Rocket.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=3&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B3%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{1068:4,2529137:6,2987869:1,2987891:6,3904577:1,3913903:6,3917450:4,4281929:4,4433730:5},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1385,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:1028491758:5:2025",createDate:1747420181784,lastUpdateDate:1757663182325,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan Team 2",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:5,groups:[{groupId:1028491758,groupSize:4,groupName:"Multi Team Ownership",groupManager:!0,draftDate:1,draftType:1,draftStatus:2,leagueStatus:5,fantasyCastHref:"https://fantasy.espn.com/womens-basketball/fantasycast?leagueId=1028491758&teamId=2",href:"https://fantasy.espn.com/womens-basketball/league?leagueId=1028491758&seasonId=2025",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StarsAndFlames/stars_flames-4.svg",restrictionType:0,seasonId:2025,entryURL:"https://fantasy.espn.com/womens-basketball/team?leagueId=1028491758&teamId=2&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/wfba/seasons/2025/segments/0/leagues/1028491758?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"WFBA",name:"Fantasy Womens Basketball 2025",description:"Fantasy Womens Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/womens-basketball/welcome",href:"https://www.espn.com/fantasy/womens-basketball/",currentLineup:{2490553:6,2491205:1,2566106:4,2988756:6,2999101:4,3142191:5,3149391:4,3904576:6,4065870:1},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:120},contentSourceId:10,sortGlobal:1386,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"c71ef020-3681-11f0-9846-8ffc028f9549",createDate:1762778889707,metaData:{entry:{entryUuid:"c71ef020-3681-11f0-9846-8ffc028f9549",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 3",challengeGroups:[{groupSettings:{name:"Disney Only"}},{groupSettings:{name:"FIRE Core Team"}}],score:{eliminated:!0,overallScore:3,percentile:.63478545,rank:399442,record:{losses:1,wins:3}},scoreByGroup:{"4ff5631f-66c8-42a5-8ad9-1c3fc2eadd53":{eliminated:!0,overallScore:3,percentile:.63478545,rank:2,record:{losses:1,wins:3}},"7d4a3167-0f7f-3aa5-a193-10f5a79f89e0":{eliminated:!0,overallScore:3,percentile:.63478545,rank:19,record:{losses:1,wins:3}}},scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"c349a530-3681-11f0-bebc-3118dc9a49b7",createDate:1762778889707,metaData:{entry:{entryUuid:"c349a530-3681-11f0-bebc-3118dc9a49b7",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 2",challengeGroups:"",score:{eliminated:!0,overallScore:0,percentile:0,rank:897095,record:{losses:1,wins:0}},scoreByGroup:"",scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"90930280-3681-11f0-b2f3-0fd5099dfb7c",createDate:1762778889707,metaData:{entry:{entryUuid:"90930280-3681-11f0-b2f3-0fd5099dfb7c",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Confidence",challengeGroups:[{groupSettings:{name:"TMG - Season 6"}},{groupSettings:{name:"Disney Only (Confidence)"}},{groupSettings:{name:"Card Club - Pigskin"}}],score:{eliminated:!1,overallScore:783,percentile:.75568775,rank:27846,record:{losses:56,wins:90}},scoreByGroup:{"05b8d8ef-7176-3845-bade-4f8c2479afe7":{eliminated:!1,overallScore:748,percentile:.75568775,rank:12,record:{losses:48,wins:84}},"836c455b-5a75-3531-929f-fdcd7f714c9c":{eliminated:!1,overallScore:748,percentile:.75568775,rank:8,record:{losses:48,wins:84}},"54a6fab7-58b3-3495-91a4-3c11bb601a1c":{eliminated:!1,overallScore:783,percentile:.75568775,rank:78,record:{losses:56,wins:90}}},scoringFormatId:2}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"a33424f0-3681-11f0-b2f3-0fd5099dfb7c",createDate:1762778889707,metaData:{entry:{entryUuid:"a33424f0-3681-11f0-b2f3-0fd5099dfb7c",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Spread",challengeGroups:[{groupSettings:{name:"Disney Only (Spread)"}}],score:{eliminated:!1,overallScore:670,percentile:.64634846,rank:81970,record:{losses:71,wins:67}},scoreByGroup:{"f33eee68-29ff-3c16-bd20-31b9952753dd":{eliminated:!1,overallScore:670,percentile:.64634846,rank:118,record:{losses:71,wins:67}}},scoringFormatId:3}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"bdae4040-3681-11f0-9b45-3fc452c57dcd",createDate:1762778889707,metaData:{entry:{entryUuid:"bdae4040-3681-11f0-9b45-3fc452c57dcd",lastAvailableDate:176819394e4,challengeId:"264",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",darkLogoURL:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",lightLogoURL:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png"},gameUrl:"https://fantasy.espn.com/games/nfl-eliminator-challenge-2025",entryName:"Megan_Janssen2's Picks 1",challengeGroups:[{groupSettings:{name:"Locks Only Survivor Pool- SZN 4"}}],score:{eliminated:!0,overallScore:2,percentile:.50711336,rank:539079,record:{losses:1,wins:2}},scoreByGroup:{"a00db401-c3ce-4729-8c0c-38c6aabae4a7":{eliminated:!0,overallScore:2,percentile:.50711336,rank:15,record:{losses:1,wins:2}}},scoringFormatId:4}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"36343e50-365c-11f0-a8c2-3b962bf01277",createDate:1762778889707,metaData:{entry:{entryUuid:"36343e50-365c-11f0-a8c2-3b962bf01277",lastAvailableDate:176819394e4,challengeId:"265",logoURLs:{logoSecondary:"",logoPrimary:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",darkLogoURL:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",lightLogoURL:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png"},gameUrl:"https://fantasy.espn.com/games/nfl-pigskin-pickem-2025",entryName:"MegaLed Straight Up",challengeGroups:[{groupSettings:{name:"Disney Only (Standard)"}},{groupSettings:{name:"DEE Product and Technology Group"}},{groupSettings:{name:"ESPN Fantasy Group"}},{groupSettings:{name:"Product & Tech Group"}}],score:{eliminated:!1,overallScore:810,percentile:.67573397,rank:452404,record:{losses:56,wins:81}},scoreByGroup:{"d0731075-2901-4564-8aa8-02dd38c9c26b":{eliminated:!1,overallScore:810,percentile:.67573397,rank:8,record:{losses:56,wins:81}},"7bf7b02f-b9b1-40b6-8270-9d4a3b0ff222":{eliminated:!1,overallScore:810,percentile:.67573397,rank:207,record:{losses:56,wins:81}},"dad5e750-a47f-4527-90cb-1aca05a2bbe3":{eliminated:!1,overallScore:810,percentile:.67573397,rank:3,record:{losses:56,wins:81}},"96f8471c-d4e7-3ca8-b86e-2b012f127f39":{eliminated:!1,overallScore:810,percentile:.67573397,rank:379,record:{losses:56,wins:81}}},scoringFormatId:1}},sortGlobal:1387,isImplicit:!1,isHidden:!1,typeId:14,affinity:0,type:{id:14,name:"Challenge Entry",code:"challengeEntry",isDeletable:!0,isDelegated:!0,maxAllowed:200}},{id:"7:735183173:3:2026",createDate:1749773645351,lastUpdateDate:1749828448313,metaData:{entry:{entryId:7,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:3,groups:[{groupId:735183173,groupSize:10,groupName:"Philadelphia Pro H2H Points League",groupManager:!1,draftDate:174982758e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/basketball/fantasycast?leagueId=735183173&teamId=7",href:"https://fantasy.espn.com/basketball/league?leagueId=735183173&seasonId=2026",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fba/images/default_logos/14.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/basketball/team?leagueId=735183173&teamId=7&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fba/seasons/2026/segments/0/leagues/735183173?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B7%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FBA",name:"Fantasy Basketball 2026",description:"Fantasy Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/basketball/welcome",href:"https://www.espn.com/fantasy/basketball/",lineup:{proGameToNumPlayersStarting:{401810053:2,401810058:1,401810057:1,401810061:1}},currentLineup:{3202:3,3448:12,4251:11,6583:4,3136195:11,3908845:6,3934719:12,4279888:0,4395630:1,4432816:5,4433247:12,4433255:11,4433287:2},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:21},contentSourceId:10,sortGlobal:1390,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:424310183:3:2026",createDate:1749773698015,lastUpdateDate:1749829617368,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:3,customizable:!1,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:1,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"DRAFT_LOBBY"},firstScoringPeriodId:1,gameId:3,groups:[{groupId:424310183,groupSize:10,groupName:"Memphis Pro H2H Points League",groupManager:!1,draftDate:174982848e4,draftType:1,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/basketball/fantasycast?leagueId=424310183&teamId=2",href:"https://fantasy.espn.com/basketball/league?leagueId=424310183&seasonId=2026",draftTypeName:"Snake"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fba/images/default_logos/1.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/basketball/team?leagueId=424310183&teamId=2&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fba/seasons/2026/segments/0/leagues/424310183?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FBA",name:"Fantasy Basketball 2026",description:"Fantasy Basketball",logoURL:"https://g.espncdn.com/s/fbalm/15/images/shell/bgHead.png",signupURL:"https://fantasy.espn.com/basketball/welcome",href:"https://www.espn.com/fantasy/basketball/",lineup:{proGameToNumPlayersStarting:{401810055:1,401810054:1,401810053:1,401810059:2,401810058:2}},currentLineup:{3468:0,6580:12,6583:4,3032977:3,3062679:2,3134908:11,3907497:5,3907822:12,4066383:11,4277956:1,4433621:11,4566434:6,4594327:12},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:21},contentSourceId:10,sortGlobal:1391,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1315471242:2:2025",createDate:1753897316090,lastUpdateDate:1759136303110,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1315471242,groupSize:10,groupName:"Maestro H2H Points",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1315471242&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1315471242&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1315471242&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1315471242?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{29155:13,30193:1,32129:4,32685:13,33148:13,33783:2,33837:13,33859:3,33950:13,35983:5,36581:13,39825:16,41405:13,42179:5,42598:0,4433874:16,4719337:5,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1403,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1689844356:2:2025",createDate:1753897335814,lastUpdateDate:1759136303136,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:1,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:0,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"ROTO",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1689844356,groupSize:10,groupName:"Maestro Roto",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1689844356&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1689844356&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1689844356&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1689844356?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,32129:4,32685:13,32796:13,33192:5,33837:13,33859:3,35002:12,36581:13,38309:0,39825:13,39832:16,40939:13,41610:5,41773:2,42403:16,42404:5,4109109:16,4719507:13},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1404,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:531018984:2:2025",createDate:1753897355273,lastUpdateDate:1759136303102,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:3,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:2,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_CATEGORY",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:531018984,groupSize:10,groupName:"Maestro H2H Each Category",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=531018984&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=531018984&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=531018984&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/531018984?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,30951:16,31127:16,32129:4,32685:13,32796:13,33837:13,33859:3,35394:13,35983:5,36581:13,36969:5,39825:13,39895:16,41610:5,41773:2,4717803:13,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1405,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:1229401832:2:2025",createDate:1753897386460,lastUpdateDate:1759136303122,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:4,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:3,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_MOST_CATEGORIES",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:1229401832,groupSize:10,groupName:"Maestro H2H Most Categories",groupManager:!0,draftDate:null,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=1229401832&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=1229401832&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=1229401832&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/1229401832?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,30951:16,31662:2,32129:4,32685:13,33837:13,33859:3,35983:5,36020:5,36581:13,39825:13,39832:13,39895:0,40939:13,4148749:16,4297835:16,4719337:5,4719507:13,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1406,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:420732386:2:2025",createDate:1753897407707,lastUpdateDate:1759136303134,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:5,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:4,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"TOTAL_SEASON_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:420732386,groupSize:10,groupName:"Maestro Season Points",groupManager:!0,draftDate:1,draftType:0,draftStatus:2,leagueStatus:5,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=420732386&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=420732386&seasonId=2025",draftTypeName:"Offline Draft"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/flb/images/default_logos/8.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=420732386&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/420732386?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",currentLineup:{30193:1,31097:3,31267:13,32129:4,32512:2,32685:13,32796:13,33192:5,33837:13,36020:5,36581:13,38309:0,39825:13,39832:13,40939:16,42404:5,4719507:16,4917694:12},restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1407,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"1:2046593148:2:2025",createDate:1755632123412,lastUpdateDate:1755831600704,metaData:{entry:{entryId:1,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:2,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!1,scoringTypeId:1,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"H2H_POINTS",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:2,groups:[{groupId:2046593148,groupSize:4,groupName:"Undrafted; Scheduled",groupManager:!0,draftDate:null,draftType:4,draftStatus:1,leagueStatus:1,fantasyCastHref:"http://fantasy.espn.com/baseball/fantasycast?leagueId=2046593148&teamId=1",href:"http://fantasy.espn.com/baseball/league?leagueId=2046593148&seasonId=2025",draftTypeName:"Salary Cap"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/logo-packs/core/StadiumFoods-ESPN/stadium-foods_soft-pretzel.svg",restrictionType:0,seasonId:2025,entryURL:"http://fantasy.espn.com/baseball/team?leagueId=2046593148&teamId=1&seasonId=2025",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/flb/seasons/2025/segments/0/leagues/2046593148?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B1%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FLB",name:"Fantasy Baseball 2025",description:"Fantasy Baseball",logoURL:"https://g.espncdn.com/s/frontpage09/images/flb09_index.png",signupURL:"http://fantasy.espn.com/baseball/welcome",href:"https://www.espn.com/fantasy/baseball/",restrictionTypeName:"NONE"},inSeason:!1,isLive:!1,currentScoringPeriodId:196},contentSourceId:10,sortGlobal:1410,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0},{id:"2:283659657:4:2026",createDate:1759161335134,lastUpdateDate:1759415709010,metaData:{entry:{entryId:2,entryMetadata:{teamName:"Megan's Magnificent Team",teamAbbrev:"MMT",leagueFormatTypeId:1,leagueSubTypeId:0,customizable:!0,active:!0,draftComplete:!0,scoringTypeId:0,leagueTypeId:0,draftInProgress:!1,scoringTypeName:"ROTO",leagueSubTypeName:"NONE"},firstScoringPeriodId:1,gameId:4,groups:[{groupId:283659657,groupSize:6,groupName:"Roto Test League",groupManager:!1,draftDate:1,draftType:2,draftStatus:2,leagueStatus:3,fantasyCastHref:"https://fantasy.espn.com/hockey/fantasycast?leagueId=283659657&teamId=2",href:"https://fantasy.espn.com/hockey/league?leagueId=283659657&seasonId=2026",draftTypeName:"Autopick"}],logoType:"VECTOR",logoUrl:"https://g.espncdn.com/lm-static/fhl/images/default_logos/6.svg",restrictionType:0,seasonId:2026,entryURL:"https://fantasy.espn.com/hockey/team?leagueId=283659657&teamId=2&seasonId=2026",scoreboardFeedURL:"https://lm-api-reads.fantasy.espn.com/apis/v3/games/fhl/seasons/2026/segments/0/leagues/283659657?view=scoreboard&filter=%7B%22schedule%22%3A%7B%22filterTeamIds%22%3A%7B%22value%22%3A%5B2%5D%7D%2C%22filterCurrentMatchupPeriod%22%3A%7B%22value%22%3Atrue%7D%7D%7D&peek=true",abbrev:"FHL",name:"Fantasy Hockey 2026",description:"Fantasy Hockey",logoURL:"https://g.espncdn.com/s/fhllm/14/images/shell/bgHead_leaguemanager.png",signupURL:"https://fantasy.espn.com/hockey/welcome",href:"https://www.espn.com/fantasy/hockey/",lineup:{proGameToNumPlayersStarting:{401802606:1,401802605:1,401802604:2}},currentLineup:{3101:3,5037:3,5349:3,2590852:3,2967072:7,3020225:5,3069341:4,3527554:7,3899937:3,3899972:4,3904177:7,3988803:4,4196914:5,4233594:3,4233875:3,4697386:4,4697397:3,4697449:4,4874740:7,5080145:7,5149170:6,5206628:3},restrictionTypeName:"NONE"},inSeason:!0,isLive:!1,currentScoringPeriodId:35},contentSourceId:10,sortGlobal:1411,isHidden:!1,typeId:9,type:{id:9,name:"Fantasy League Manager",code:"fantasy",isDeletable:!1,isDelegated:!1,maxAllowed:500},bu:0}],fantasyData:{totalFantasyLeagues:23,leaguesBySportLeague:{NFL:8,MLB:8,NBA:2,NHL:1,WNBA:4},totalChallengeEntries:7,challengeInformation:[{id:263,gameType:"PICKEM",challengeName:"Pigskin Win Totals",challengeAbbrev:"Pigskin Win Totals",scoringFormatIds:[1],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/149a15a7-10e7-421a-ae38-d7ff4df3f8de.png",logoDark:"https://chui-assets-cdn.espn.com/1ab5b81f-0114-4ef0-aced-a096cfa487b1.png",logo1x1:"https://chui-assets-cdn.espn.com/10dfa661-6adc-41c2-b391-9ae64baf1b50.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/10dfa661-6adc-41c2-b391-9ae64baf1b50.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:1},{id:264,gameType:"CONTESTANT_POOL",challengeName:"Eliminator Challenge 2025",challengeAbbrev:"Eliminator Challenge",scoringFormatIds:[4],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/4ae2d3e1-ce2d-4ff0-b3f2-57e966c3e9c8.png",logoDark:"https://chui-assets-cdn.espn.com/4beecd18-7bb5-441b-913c-a1ac5f12b893.png",logo1x1:"https://chui-assets-cdn.espn.com/28fdbb06-fff0-45f4-a1fe-d09c1393302a.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/28fdbb06-fff0-45f4-a1fe-d09c1393302a.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:3},{id:265,gameType:"PICKEM",challengeName:"Pigskin Pick'em 2025",challengeAbbrev:"Pigskin Pick'em",scoringFormatIds:[1,3,2],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/08166f17-1808-4634-b21a-66629878274c.png",logoDark:"https://chui-assets-cdn.espn.com/213d8b5f-6117-480c-b160-4a3993a3c88e.png",logo1x1:"https://chui-assets-cdn.espn.com/e06aca34-f148-4f1e-87e0-4c1d7492cc42.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/e06aca34-f148-4f1e-87e0-4c1d7492cc42.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"nfl"}],userEntryCount:3},{id:266,gameType:"PICKEM",challengeName:"College Pick'em 2025",challengeAbbrev:"College Pick'em",scoringFormatIds:[1,3,2],state:"LIVE",logoUrls:{logo:"https://chui-assets-cdn.espn.com/056a9567-dae4-4185-b4d6-a723df87f988.png",logoDark:"https://chui-assets-cdn.espn.com/780faa3b-eda2-4b06-a276-b218c586901c.png",logo1x1:"https://chui-assets-cdn.espn.com/c7f88874-19f6-4352-a54b-60f7d94bed2f.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/c7f88874-19f6-4352-a54b-60f7d94bed2f.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0},{id:269,gameType:"BRACKET",challengeName:"CFP Bracket Challenge",challengeAbbrev:"CFP Bracket Challenge",scoringFormatIds:[5],state:"LANDER",logoUrls:{logo:"https://chui-assets-cdn.espn.com/2fb0bf85-e01c-40a9-88b1-3421d30fe3b2.png",logoDark:"https://chui-assets-cdn.espn.com/09fec69d-94e1-4c8f-9bb4-0610009999dd.png",logo1x1:"https://chui-assets-cdn.espn.com/40159d72-8861-450f-926a-a493947b47b1.png",logo1x1Dark:"https://chui-assets-cdn.espn.com/40159d72-8861-450f-926a-a493947b47b1.png"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0},{id:270,gameType:"PICKEM",challengeName:"Capital One Bowl Mania 2025",challengeAbbrev:"Capital One Bowl Mania",scoringFormatIds:[1,3,2],state:"LANDER",logoUrls:{logo:"https://chui-assets-cdn.espn.com/3862fdaa-aad9-417b-a471-7041697a1c7d.png",logoDark:"https://chui-assets-cdn.espn.com/3862fdaa-aad9-417b-a471-7041697a1c7d.png",logo1x1:"https://chui-assets-cdn.espn.com/a7cd3fde-d093-4375-917a-f983291d2481.jpeg",logo1x1Dark:"https://chui-assets-cdn.espn.com/a7cd3fde-d093-4375-917a-f983291d2481.jpeg"},mappings:[{type:"SPORT",value:"football"},{type:"LEAGUE",value:"college-football"}],userEntryCount:0}],challengeScoreboardEnabled:!0,leagueScoreboardEnabled:{1:!0,2:!0,3:!0,4:!0,5:!0}}};function Bt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var St=class{constructor(t,e,n,i={}){Bt(this,"fantasyItems",new _.a([])),Bt(this,"isDataLoading",new _.a(!1)),Bt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),Bt(this,"isLoadingTc",new _.a(!1)),Bt(this,"eventId",void 0),Bt(this,"delegate",void 0),Bt(this,"analyticsService",void 0),Bt(this,"fantasyService",void 0),Bt(this,"fantasyPolling",void 0),Bt(this,"leagueManagerPolling",void 0),Bt(this,"tournamentPolling",void 0),Bt(this,"errorState",new _.a("none")),Bt(this,"leagueSortOrder",new Map),Bt(this,"itemToLeagueKey",new Map),Bt(this,"useMockData",!1),Bt(this,"_promoData",null),Bt(this,"_fantasyLeagues",[]),Bt(this,"_tournamentChallenges",[]),Bt(this,"_promoItem",null),Bt(this,"_tcProcessingCount",0),this.useMockData=i.useMockData||!1,this.eventId=t,this.delegate=e,this.analyticsService=n,this.fantasyService=new gt,this.fantasyPolling=new yt(this.fantasyService),this.leagueManagerPolling=new Et(this.fantasyService),this.tournamentPolling=new Ct(this.fantasyService)}async init(){this.trackPanelView(),await this.fetchData()}handleFetchError(t,e="fetchData"){const n=e.startsWith("FantasyViewModel.")?e.slice("FantasyViewModel.".length):e;Object(p.a)("FantasyViewModel",n,t),this.isDataLoading.value=!1,this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure")}async fetchData(){try{this.isDataLoading.value=!0;if(!await this.delegate.userIsAuthenticated())return this.isDataLoading.value=!1,void this.append({id:"not-logged-in",type:"notLoggedIn"});this.fantasyItems.value.find(t=>"notLoggedIn"===t.type)&&(this.fantasyItems.value=[]);const t=await this.delegate.getUserSWID()||"",e=await this.delegate.getUserToken()||"";if(this.useMockData)return void await this.fetchMockData();await this.fantasyPolling.refresh({eventId:this.eventId,swid:t,jwt:e},this.processFantasy.bind(this),this.handleFetchError.bind(this))}catch(t){this.handleFetchError(t)}}onEngage(t){this.analyticsService.panelClick({type:"espnFantasy",name:"fantasy_item_clicked",metadata:{card:t}})}onAskLogin(){this.fantasyItems.value=[],this.delegate.onPanelEvent({type:"fantasy:request:login",payload:{onLoginSuccess:async()=>{await this.fetchData()}}})}cleanup(){this.fantasyPolling.stop(),this.fantasyPolling.removeLastResponseHash(),this.leagueManagerPolling.stopAll(),this.tournamentPolling.stopAll(),this.leagueSortOrder.clear(),this.itemToLeagueKey.clear(),this._fantasyLeagues=[],this._tournamentChallenges=[],this._promoItem=null,this._tcProcessingCount=0,this.isLoadingTc.value=!1,this.fantasyItems.value=[],this.hasEverSuccessfullyLoaded.value=!1}async trackPanelView(){try{await this.analyticsService.panelView("espnFantasy")}catch(t){Object(p.a)("FantasyViewModel","trackPanelView",t)}}getHidePickemsAndChallenges(){return!0===ge.getMaestroEventViewModel().getFeatureFlag({panelType:"espnFantasy",featureFlag:"hide_pickems"})}async processFantasy(t){try{const a=await this.delegate.getUserToken()||"";this.leagueManagerPolling.stopAll(),this.tournamentPolling.stopAll(),this._tcProcessingCount=0,this.isLoadingTc.value=!1;const o=this.getHidePickemsAndChallenges();this.leagueSortOrder.clear(),this.itemToLeagueKey.clear(),this._fantasyLeagues=[],this._tournamentChallenges=[];const l=new Set,c=t.preferences||[],u=c.some(t=>14===t.typeId),h=c.some(t=>14!==t.typeId);if(!c.length||u&&o&&!h){const t=await this.getPromoData();t&&(this._promoItem={id:"promo",type:"promo",background:t.fantasy.promotion.background,description:t.fantasy.promotion.description,logo:t.fantasy.promotion.logo,qrCode:t.fantasy.promotion.qrCode,title:t.fantasy.promotion.title})}for(let t=0;t<c.length;t++){var e,n,i,r,s;const u=c[t],h=(null===(e=u.metaData)||void 0===e?void 0:e.entry)||{},d=h.abbrev,f=h.seasonId,_=null===(n=h.groups)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.groupId,p=null===(r=h.groups)||void 0===r||null===(s=r[0])||void 0===s?void 0:s.draftDate;if(14===u.typeId&&!o&&u.id&&h.challengeId&&!l.has(u.id)){l.add(u.id),this._tcProcessingCount++;const t="tc-"+h.challengeId;this.tournamentPolling.refresh(t,{challengeId:String(h.challengeId),competitionId:this.eventId,token:a},t=>{this.parseTournamentChallenge(t),this._tcProcessingCount--,0===this._tcProcessingCount&&(this.isLoadingTc.value=!1,this.rebuildFantasyItems())},t=>{this.handleFetchError(t,"FantasyViewModel.processFantasy.tournamentChallenge"),this._tcProcessingCount--,0===this._tcProcessingCount&&(this.isLoadingTc.value=!1,this.rebuildFantasyItems())})}else{if(!(d&&f&&_&&h.entryId))continue;const e=`${d}-${_}-${f}`;this.leagueSortOrder.set(e,t),this.leagueManagerPolling.refresh(e,{game:d,leagueId:_,seasonId:f,token:a,proGameId:this.eventId,teamId:h.entryId},t=>{var n,i,r;if(!1===(null===(n=h.entryMetadata)||void 0===n?void 0:n.draftComplete))this.append(this.parseInactiveLeague(t,p),e);else if(void 0!==(null===(i=t.matchups)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.home)){const n=this.parseHeadToHead(t,u);if(n)for(const t of n)this.append(t,e)}else if(At(t)){const n=this.parseRoto(t,u);if(n)for(const t of n)this.append(t,e)}},t=>{this.handleFetchError(t,"FantasyViewModel.processFantasy.leagueManager")})}}this.isLoadingTc.value=this._tcProcessingCount>0,this.hasEverSuccessfullyLoaded.value=!0,this.errorState.value="none",this.isDataLoading.value=!1,this.rebuildFantasyItems()}catch(t){this.handleFetchError(t,"FantasyViewModel.processFantasy")}}parseRoto(t,e){var n;if(!(null!==(n=t.matchups)&&void 0!==n&&n.length&&t.leagueName&&t.scoringType&&t.gameId))return null;const i=[];for(const n of t.matchups){var r;if(null===(r=n.teams)||void 0===r||!r.length)continue;const a=n.teams[0];if(!a.logo||!t.sportLogo||!t.sportColor||void 0===a.points)continue;const o=a.roster||[],l=[],c=[];for(const t of o){var s;t.player&&(t.player.abbrevName&&t.player.headshot&&null!==(s=t.player.proTeam)&&void 0!==s&&s.triCode&&t.slot&&(l.push({athleteHeadshot:t.player.headshot,athleteAbbrevName:t.player.abbrevName,athletesSlot:t.slot,teamTriCode:t.player.proTeam.triCode,proGameStatusLines:t.player.proGameStatusLines||[]}),t.player.currentlyWatching&&void 0!==t.player.points&&c.push({abbrevName:t.player.abbrevName,points:t.player.points+" FPTS"})))}i.push({id:Object(L.b)(JSON.stringify(e)).toString(),type:"matchup-single",topPlayers:this.parseTopPlayers(t.topPlayers||[]),league:{color:t.sportColor,logo:t.sportLogo,subtitle:t.name,title:t.leagueName},team:{logo:a.logo,scoringType:t.scoringType.includes("SEASON")?"SEASON":t.scoringType,points:a.points},roster:l,activeAthletes:c})}return i}append(t,e){if(!t)return;if("notLoggedIn"===t.type)return void(this.fantasyItems.value=[t]);if("promo"===t.type&&(this._promoItem=t),e&&this.itemToLeagueKey.set(t.id,e),"matchup-pair"===t.type||"matchup-single"===t.type||"inactiveLeague"===t.type){const e=this._fantasyLeagues.findIndex(e=>e.id===t.id);-1!==e?this._fantasyLeagues[e]=t:this._fantasyLeagues.push(t),this._fantasyLeagues.sort((t,e)=>{var n,i;const r=this.itemToLeagueKey.get(t.id),s=this.itemToLeagueKey.get(e.id);return(void 0!==r&&null!==(n=this.leagueSortOrder.get(r))&&void 0!==n?n:Number.MAX_SAFE_INTEGER)-(void 0!==s&&null!==(i=this.leagueSortOrder.get(s))&&void 0!==i?i:Number.MAX_SAFE_INTEGER)})}const n=this._tournamentChallenges.findIndex(t=>t.id===e);if("fantasy-header"===t.type)-1!==n?this._tournamentChallenges[n].header=t:e&&this._tournamentChallenges.push({type:"fantasy-group",id:e,header:t,items:[]});else if("tournament-bracket-card"===t.type||"tournament-overflow-qr"===t.type)if(-1!==n){const e=this._tournamentChallenges[n],i=e.items.findIndex(e=>e.id===t.id);-1!==i?e.items[i]=t:e.items.push(t)}else e&&this._tournamentChallenges.push({type:"fantasy-group",id:e,header:{type:"fantasy-header",id:e+"-header",title:""},items:[t]});this.rebuildFantasyItems()}rebuildFantasyItems(){const t=[];this._tournamentChallenges.length>0&&t.push(...this._tournamentChallenges),this._fantasyLeagues.length>0&&t.push({type:"fantasy-group",id:"header-fantasy-leagues-group",header:{type:"fantasy-header",id:"header-fantasy-leagues",title:"Fantasy Leagues"},items:this._fantasyLeagues}),this._promoItem&&0===this._tournamentChallenges.length&&0===this._fantasyLeagues.length&&0===t.length&&!this.isLoadingTc.value&&t.push(this._promoItem),this.fantasyItems.value=t}parseHeadToHead(t,e){var n;if(!(null!==(n=t.matchups)&&void 0!==n&&n.length&&t.leagueName&&t.sportColor&&t.sportLogo&&t.gameId))return null;const i=[];for(const n of t.matchups){var r,s;if(!n.home||!n.away)continue;const h=[],d=[],f=n.home.roster||[],_=n.away.roster||[];for(let t=0;t<_.length;t++){var a,o,l,c,u;const e=_[t],i=f[t];e.player&&i.player&&(e.player.abbrevName&&e.player.headshot&&e.slot&&null!==(a=e.player.proTeam)&&void 0!==a&&a.triCode&&null!==(o=n.away)&&void 0!==o&&o.record&&i.player.abbrevName&&i.player.headshot&&i.slot&&null!==(l=i.player.proTeam)&&void 0!==l&&l.triCode&&null!==(c=n.home)&&void 0!==c&&c.record&&(h.push({away:{abbrevName:e.player.abbrevName,headshot:e.player.headshot,points:e.player.points,slot:e.slot,stats:e.player.proGameStatusLines||[],triCode:e.player.proTeam.triCode,projectedPoints:e.player.projectedPoints},home:{abbrevName:i.player.abbrevName,headshot:i.player.headshot,points:i.player.points,slot:i.slot,stats:i.player.proGameStatusLines||[],triCode:null===(u=i.player.proTeam)||void 0===u?void 0:u.triCode,projectedPoints:i.player.projectedPoints}}),i.player.currentlyWatching&&void 0!==i.player.points&&d.push({abbrevName:i.player.abbrevName,points:i.player.points+" FPTS"})))}i.push({id:Object(L.b)(JSON.stringify(e)).toString(),type:"matchup-pair",awayTeam:{logo:n.away.logo,name:n.away.name,points:"H2H_POINTS"===t.scoringType?String(n.away.points):n.away.score,projectedPoints:null!==(r=n.away.projectedPointsLive)&&void 0!==r?r:n.away.projectedPoints,record:n.away.record,winProbability:n.away.winProbability},homeTeam:{logo:n.home.logo,name:n.home.name,points:"H2H_POINTS"===t.scoringType?String(n.home.points):n.home.score,projectedPoints:null!==(s=n.home.projectedPointsLive)&&void 0!==s?s:n.home.projectedPoints,record:n.home.record,winProbability:n.home.winProbability},league:{color:t.sportColor,logo:t.sportLogo,subtitle:n.name,title:t.leagueName},roster:h,activeAthletes:d,topPlayers:this.parseTopPlayers(t.topPlayers||[])})}return i}parseTopPlayers(t){const e=[];for(const s of t){var n,i,r;if(!s.abbrevName||!s.headshot||null===(n=s.proTeam)||void 0===n||!n.triCode||void 0===s.points)continue;let t="";void 0!==s.percentRostered&&s.percentRostered>0&&null!==(i=s.playerStatus)&&void 0!==i&&i.startsWith("Rostered")&&(t=s.playerStatus),e.push({abbrevName:s.abbrevName,headshot:s.headshot,position:(null===(r=s.positions)||void 0===r?void 0:r.split(",")[0])||"",teamTriCode:s.proTeam.triCode,points:s.points,rosteredBy:t})}return e}parseInactiveLeague(t,e){if(!t.sportColor||!t.sportLogo||!t.leagueName)return null;let n=void 0;if(e){const t=new Date(Number(e));isNaN(t.getTime())||(n=t.getTime())}return{id:Object(L.a)(`${t.gameId}-inactive-${t.leagueName}`),leagueColor:t.sportColor,leagueLogo:t.sportLogo,leagueName:t.leagueName,type:"inactiveLeague",draftDate:n}}async getPromoData(){if(this._promoData)return this._promoData;try{return this._promoData=await this.fantasyService.getPromo(),this._promoData}catch(t){return Object(p.a)("FantasyViewModel","getPromoData",t),null}}async parseTournamentChallenge(t){var e;if(!t.id)return;const n=(null===(e=t.entries)||void 0===e?void 0:e.filter(t=>t.id))||[];if(0===n.length)return;const i={type:"fantasy-header",id:t.id+"-header",title:t.abbrev?"Your Top "+t.abbrev:"Tournament Challenge"};this.append(i,t.id);const r=this._tournamentChallenges.findIndex(e=>e.id===t.id);-1!==r&&(this._tournamentChallenges[r].items=[]);const s=n.length,a=n.slice(0,5);for(const e of a){var o,l;let n,i;const r=t.propositions||[];if(1===r.length&&e.picks){const t=r[0];if(t.competitionId&&String(t.competitionId)===this.eventId&&t.id&&t.outcomes){const r=e.picks.find(e=>e.propositionId===t.id);if(null!=r&&r.outcomeId){const e=t.outcomes.find(t=>t.id===r.outcomeId);null!=e&&e.name&&(n=e.name,i=e.primaryLogo)}}}const s={type:"tournament-bracket-card",id:e.id,name:e.name||"",rank:e.rank||0,score:e.score||0,percentile:Math.round(100*(e.percentile||0)),entryStatusIcon:e.entryStatusIcon||"",finalPick:e.finalPick?{propositionId:e.finalPick.propositionId,outcomeId:e.finalPick.outcomeId,primaryLogo:null===(o=e.finalPick.outcomePicked)||void 0===o?void 0:o.primaryLogo,secondaryLogo:null===(l=e.finalPick.outcomePicked)||void 0===l?void 0:l.secondaryLogo,result:e.finalPick.result}:{propositionId:"",outcomeId:""},isComplete:e.isComplete||!1,picks:e.picks,tournamentId:t.id,tournamentAbbrev:t.abbrev||"",tournamentLogo:t.logo||"",scoringPeriodLabel:t.scoringPeriodLabel||"",propositions:t.propositions,userPickName:n,userPickLogo:i,leagueColor:t.secondaryColor||"#000000"};this.append(s,t.id)}if(s>5&&"LIVE"===t.state){const e=await this.getPromoData(),n=!0===t.locked?"tc-live":"tc-pre",i=null==e?void 0:e[n];if(i){const e={type:"tournament-overflow-qr",id:t.id+"-overflow",background:i.promotion.background,logo:i.promotion.logo,qrCode:i.promotion.qrCode,title:i.promotion.title,description:i.promotion.description,tournamentId:t.id};this.append(e,t.id)}}}async fetchMockData(){this.hasEverSuccessfullyLoaded.value=!0,await this.processFantasy(xt),this.errorState.value="none",this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",setTimeout(()=>{this.fetchData()},100)}setDataToPanel(t){t.leagueManagerOverrideBaseUrl&&(this.fantasyService.leagueManagerOverrideBaseUrl=t.leagueManagerOverrideBaseUrl),t.fantasyOverrideBaseUrl&&(this.fantasyService.fantasyOverrideBaseUrl=t.fantasyOverrideBaseUrl),t.gambitOverrideBaseUrl&&(this.fantasyService.gambitOverrideBaseUrl=t.gambitOverrideBaseUrl)}};function Tt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var jt=class{constructor(t){Tt(this,"networkManager",void 0),Tt(this,"eventId",void 0),this.eventId=t,this.networkManager=new T.b({externalBaseURL:"https://site.api.espn.com"})}pollShopData(t,e,n){return this.networkManager.pollExternalApiRequestWithHeaders({endpoint:`/apis/site/v2/events/${this.eventId}/shop`,interval:t,method:T.a.GET,params:{deviceType:"ictv"},headers:{},onData:e,onError:n})}},qt=n(51);const Pt={shop:[{sections:[{title:"Chiefs Shop",items:[{type:"product",name:"Men's Kansas City Chiefs Patrick Mahomes Nike Red Game Player Jersey",image:{href:"https://fanatics.frgimages.com/kansas-city-chiefs/mens-kansas-city-chiefs-patrick-mahomes-nike-red-game-player-jersey_pi3453000_ff_3453170-8a4fb50f27b4aacd8c3b_full.jpg"},price:{displayRetail:"$119.99"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs-mahomes-jersey",link:{href:"https://fanatics.com/chiefs-mahomes-jersey",text:"Scan to shop"}}},{type:"product",name:"Kansas City Chiefs New Era 2024 AFC Conference Champions Locker Room 9FORTY Adjustable Hat - Red",image:{href:"https://fanatics.frgimages.com/kansas-city-chiefs/kansas-city-chiefs-new-era-2024-afc-conference-champions-locker-room-9forty-adjustable-hat-red_pi5595000_ff_5595784_full.jpg"},price:{displayRetail:"$34.99",displaySale:"$24.99"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs-hat",link:{href:"https://fanatics.com/chiefs-hat",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Chiefs merch",image:{href:"https://a.espncdn.com/i/teamlogos/nfl/500/kc.png"},detail:{title:"Chiefs Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/chiefs",link:{href:"https://fanatics.com/chiefs",text:"Scan to browse all"}}}]},{title:"49ers Shop",items:[{type:"product",name:"Men's San Francisco 49ers Brock Purdy Nike Scarlet Game Player Jersey",image:{href:"https://fanatics.frgimages.com/san-francisco-49ers/mens-san-francisco-49ers-brock-purdy-nike-scarlet-game-player-jersey_pi5068000_ff_5068449_full.jpg"},price:{displayRetail:"$119.99"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers-purdy-jersey",link:{href:"https://fanatics.com/49ers-purdy-jersey",text:"Scan to shop"}}},{type:"product",name:"Men's San Francisco 49ers George Kittle Nike Scarlet Game Player Jersey",image:{href:"https://fanatics.frgimages.com/san-francisco-49ers/mens-san-francisco-49ers-george-kittle-nike-scarlet-game-player-jersey_pi4234000_ff_4234524_full.jpg"},price:{displayRetail:"$119.99",displayClearance:"$79.99"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers-kittle-jersey",link:{href:"https://fanatics.com/49ers-kittle-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all 49ers merch",image:{href:"https://a.espncdn.com/i/teamlogos/nfl/500/sf.png"},detail:{title:"49ers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/49ers",link:{href:"https://fanatics.com/49ers",text:"Scan to browse all"}}}]},{title:"NFL Shop",items:[{type:"product",name:"NFL Nike Official Authentic Game Football",image:{href:"https://fanatics.frgimages.com/nfl/nfl-nike-official-authentic-game-football_pi4759000_ff_4759291_full.jpg"},price:{displayRetail:"$99.99"},detail:{title:"NFL Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/nfl-football",link:{href:"https://fanatics.com/nfl-football",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all NFL merch",image:{href:"https://a.espncdn.com/i/teamlogos/leagues/500/nfl.png"},detail:{title:"NFL Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/nfl",link:{href:"https://fanatics.com/nfl",text:"Scan to browse all"}}}]}]}]},It={shop:[{sections:[{title:"Lakers Shop",items:[{type:"product",name:"Men's Los Angeles Lakers LeBron James Nike Purple Swingman Jersey - Icon Edition",image:{href:"https://fanatics.frgimages.com/los-angeles-lakers/mens-los-angeles-lakers-lebron-james-nike-purple-swingman-jersey-icon-edition_pi4548000_ff_4548764_full.jpg"},price:{displayRetail:"$129.99"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers-lebron-jersey",link:{href:"https://fanatics.com/lakers-lebron-jersey",text:"Scan to shop"}}},{type:"product",name:"Men's Los Angeles Lakers Anthony Davis Nike Gold Swingman Jersey - City Edition",image:{href:"https://fanatics.frgimages.com/los-angeles-lakers/mens-los-angeles-lakers-anthony-davis-nike-gold-swingman-jersey-city-edition_pi5129000_ff_5129446_full.jpg"},price:{displayRetail:"$129.99"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers-davis-jersey",link:{href:"https://fanatics.com/lakers-davis-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Lakers merch",image:{href:"https://a.espncdn.com/i/teamlogos/nba/500/lal.png"},detail:{title:"Lakers Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/lakers",link:{href:"https://fanatics.com/lakers",text:"Scan to browse all"}}}]}]}]},Nt={shop:[{sections:[{title:"Texas Football Shop",items:[{type:"product",name:"Texas Longhorns Champion University Tee - Burnt Orange",image:{href:"https://fanatics.frgimages.com/texas-longhorns/texas-longhorns-champion-university-tee-burnt-orange_pi4892000_ff_4892615_full.jpg"},price:{displayRetail:"$34.99"},detail:{title:"Texas Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-tee",link:{href:"https://fanatics.com/texas-tee",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Texas merch",image:{href:"https://a.espncdn.com/i/teamlogos/ncaa/500/251.png"},detail:{title:"Texas Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas",link:{href:"https://fanatics.com/texas",text:"Scan to browse all"}}}]},{title:"Texas A&M Shop",items:[{type:"product",name:"Texas A&M Aggies New Era Maroon 9FORTY Adjustable Hat",image:{href:"https://fanatics.frgimages.com/texas-am-aggies/texas-am-aggies-new-era-maroon-9forty-adjustable-hat_pi4156000_ff_4156429_full.jpg"},price:{displayRetail:"$29.99"},detail:{title:"Texas A&M Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-am-hat",link:{href:"https://fanatics.com/texas-am-hat",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all Texas A&M merch",image:{href:"https://a.espncdn.com/i/teamlogos/ncaa/500/245.png"},detail:{title:"Texas A&M Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/texas-am",link:{href:"https://fanatics.com/texas-am",text:"Scan to browse all"}}}]}]}]},zt={shop:[{sections:[],defaultItem:{detail:{disclaimer:"Visit shop.espn.com to explore more products and exclusive offers.",title:"Shop the ESPN Store",backgroundImage:"https://placedog.net/568x704"}}}]},Ot={shop:[{sections:[{title:"Team Shop",items:[{type:"product",name:"Premium Team Jersey - Official Merchandise",image:{href:"https://via.placeholder.com/400x400/0066cc/ffffff?text=Team+Jersey"},price:{displayRetail:"$89.99"},detail:{title:"Team Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/team-jersey",link:{href:"https://fanatics.com/team-jersey",text:"Scan to shop"}}},{type:"browse",name:"Want More?",caption:"Browse all team merch",image:{href:"https://via.placeholder.com/400x400/0066cc/ffffff?text=Team+Logo"},detail:{title:"Team Shop",qrCode:"https://api.qrserver.com/v1/create-qr-code/?size=300x300&data=https://fanatics.com/team",link:{href:"https://fanatics.com/team",text:"Scan to browse all"}}}]}]}]};function Rt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Dt{constructor(t){Rt(this,"polling",{interval:3e4,task:null,lastResponseHash:null}),Rt(this,"shopService",void 0),this.shopService=t}refresh(t,e){this.stop(),this.start(t,e)}stop(){this.polling.task&&(this.polling.task.stop(),this.polling.task=null)}removeLastResponseHash(){this.polling.lastResponseHash=null}start(t,e){try{this.polling.task=this.shopService.pollShopData(this.polling.interval,n=>{this.updateInterval(n.headers,t,e),this.processPolledData(n.data,t)},t=>this.handlePollingError(t,e))}catch(t){Object(p.a)("ShopPolling","pollShop",t),null==e||e()}}updateInterval(t,e,n){const i=this.getResponseHeaderPollingIntervalValue(t);i&&i!==this.polling.interval&&(console.log(`[SHOP] Updating shop polling interval from ${this.polling.interval}ms to ${i}ms`),this.polling.interval=i,this.refresh(e,n))}getResponseHeaderPollingIntervalValue(t){const e=t["polling-interval"];if(!e)return null;const n=parseInt(e,10);return isNaN(n)||n<=0?(console.warn(`[SHOP] Invalid polling interval header received: ${e}.`),null):1e3*n}processPolledData(t,e){const n=Object(L.b)(JSON.stringify(t));this.polling.lastResponseHash!==n?(this.polling.lastResponseHash=n,e(t)):console.log("[SHOP] Shop Response hash is the same as last successful response - skipping update")}handlePollingError(t,e){Object(p.a)("ShopPolling","handlePollingError",t),null==e||e()}}function Mt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Lt extends m.a{constructor(t,e,n={}){super(),Mt(this,"sections",new _.a([])),Mt(this,"isDataLoading",new _.a(!0)),Mt(this,"errorState",new _.a("none")),Mt(this,"hasEverSuccessfullyLoaded",new _.a(!1)),Mt(this,"promoData",new _.a(null)),Mt(this,"shopService",void 0),Mt(this,"analyticsService",void 0),Mt(this,"shopPolling",void 0),Mt(this,"useMockData",!1),Mt(this,"mockDataType","nfl"),Mt(this,"initialized",!1),this.shopService=new jt(t),this.analyticsService=e,this.shopPolling=new Dt(this.shopService),this.useMockData=n.useMockData||!1,this.mockDataType=n.mockDataType||"nfl"}init(){this.trackPanelView(),this.fetchNewData(),this.initialized=!0}cleanup(){this.shopPolling.stop(),this.initialized=!1}async trackPanelView(){try{var t;const e=(null===(t=ge.getMaestroEventViewModel().statsViewModel)||void 0===t?void 0:t.currentGameState.value)||"unknown";await this.analyticsService.panelView("espnShop",{game_state:[e]})}catch(t){Object(p.a)("ShopViewModel","trackPanelView",t)}}parsePriceToNumber(t){const e=t.replace(/[^0-9.,]/g,""),n=e.lastIndexOf(","),i=e.lastIndexOf(".");let r;return r=n>i?e.replace(/\./g,"").replace(",","."):i>n?e.replace(/,/g,""):-1!==n?e.replace(",","."):e,Number(r)||0}async trackItemClick(t,e,n){try{var i,r,s,a;let h=0,d=null;const f=(null===(i=ge.getMaestroEventViewModel().statsViewModel)||void 0===i?void 0:i.currentGameState.value)||"unknown";if(e&&Object(qt.a)(e)){var o,l,c,u;const t=null===(o=e.price)||void 0===o?void 0:o.displayRetail,n=(null===(l=e.price)||void 0===l?void 0:l.displayClearance)||(null===(c=e.price)||void 0===c?void 0:c.displaySale)||(null===(u=e.price)||void 0===u?void 0:u.displayRetail);if(n&&t){const e=this.parsePriceToNumber(t),i=this.parsePriceToNumber(n);h=e>0?Math.round(100*(1-i/e)):0,d=n}}await this.analyticsService.panelClick({type:"espnShop",name:"shop_item_clicked",metadata:{card:[t],game_state:[f],product:(null==n||null===(r=n.product)||void 0===r?void 0:r.id)||null,entity_type:[(null==n||null===(s=n.product)||void 0===s?void 0:s.type)||"unknown"],entity_name:[(null==n||null===(a=n.product)||void 0===a?void 0:a.shortDisplayName)||"unknown"],price:d,sale:[h+"%"]}})}catch(t){Object(p.a)("ShopViewModel","trackItemClick",t)}}refreshPolling(){try{if(this.useMockData)return;this.shopPolling.refresh(this.processShopData.bind(this),this.setTabLoadFailure.bind(this))}catch(t){Object(p.a)("ShopViewModel","refreshPolling",t),this.setTabLoadFailure()}}processShopData(t){try{var e;const n=null===(e=t.shop)||void 0===e?void 0:e[0],i=(null==n?void 0:n.sections)||[];if((null==i||!i.length)&&null!=n&&n.defaultItem)return this.errorState.value="emptyShop",this.sections.value=[],void(this.promoData.value=n.defaultItem);this.sections.value=i,this.errorState.value="none",this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value&&(this.isDataLoading.value=!1)}catch(t){Object(p.a)("ShopViewModel","processShopData",t),this.setTabLoadFailure()}}setTabLoadFailure(){this.hasEverSuccessfullyLoaded.value||(this.errorState.value="tabLoadFailure",this.sections.value=[]),this.isDataLoading.value&&(this.isDataLoading.value=!1)}fetchNewData(){this.isDataLoading.value=!0;try{if(this.useMockData)return this.sections.value=[],void this.fetchMockData();this.refreshPolling()}catch(t){Object(p.a)("ShopViewModel","fetchNewData",t),this.setTabLoadFailure()}}fetchMockData(){let t;switch(this.mockDataType){case"nba":t=It;break;case"ncf":t=Nt;break;case"empty":t=zt;break;case"single":t=Ot;break;case"nfl":default:t=Pt}this.processShopData(t),this.hasEverSuccessfullyLoaded.value=!0,this.isDataLoading.value=!1}clearTabLoadFailure(){this.errorState.value="none",this.shopPolling.removeLastResponseHash(),setTimeout(()=>{this.refreshPolling()},100)}}var Ft=Lt,Ut=n(57),Vt=n(202);function Wt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Ht extends m.a{constructor(t,e){super(),Wt(this,"streamState",new _.a(null)),Wt(this,"lastStreamStateHash",0),Wt(this,"directorState",new _.a(null)),Wt(this,"lastDirectorStateHash",0),Wt(this,"session",null),Wt(this,"analyticsService",void 0),Wt(this,"delegate",void 0),this.delegate=t,this.analyticsService=e}init(){this.analyticsService.panelView("multiviewPanel").catch(t=>{Object(p.a)("MultiviewViewModel","init.panelView",t)})}setDataToPanel(t){if(!this.session&&(t=>"string"==typeof t.apiKey&&t.apiKey.length>0&&"string"==typeof t.eventId&&t.eventId.length>0)(t))try{this.session=Object(Vt.createMultiViewSession)(t.apiKey,t.eventId),this.session.subscribeStream(t=>{const e=Object(L.b)(JSON.stringify(t));e!==this.lastStreamStateHash&&(this.lastStreamStateHash=e,this.streamState.value=t,this.delegate.onPanelEvent({type:"multiviewPanel:stream-state-changed",payload:t}))}),this.session.subscribeDirector(t=>{const e=Object(L.b)(JSON.stringify(t));e!==this.lastDirectorStateHash&&(this.lastDirectorStateHash=e,this.directorState.value=t,this.delegate.onPanelEvent({type:"multiviewPanel:director-state-changed",payload:t}))}),this.session.connect()}catch(t){const e=t instanceof Error?t.message:"Failed to initialize MultiView session";Object(p.a)("MultiviewViewModel","setDataToPanel",t),this.setError(e)}}toggleSource(t){var e;null===(e=this.session)||void 0===e||e.toggleSource(t)}selectLayout(t){var e;null===(e=this.session)||void 0===e||e.selectLayout(t)}retryDirector(){var t;null===(t=this.session)||void 0===t||t.retryDirector()}getTrackReference(t){var e,n;return null!==(e=null===(n=this.session)||void 0===n?void 0:n.getTrackReference(t))&&void 0!==e?e:null}cleanup(){var t;null===(t=this.session)||void 0===t||t.close(),this.session=null,this.streamState.value=null,this.directorState.value=null,this.setError(null)}}function $t(t,e){const n=t=>String(t).trim().split(".").map(t=>{const e=parseInt(t,10);return Number.isFinite(e)?e:0}),i=n(t),r=n(e),s=Math.max(i.length,r.length);for(let t=0;t<s;t++){var a,o;const e=null!==(a=i[t])&&void 0!==a?a:0,n=null!==(o=r[t])&&void 0!==o?o:0;if(e!==n)return e<n?-1:1}return 0}var Yt=n(29),Gt=n(203),Kt=n(41);function Xt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class Jt extends m.a{constructor(t,e){super(),this.analyticsService=t,this.delegate=e,Xt(this,"handle",null),Xt(this,"overlayData",new _.a(null)),Xt(this,"willAppearParams",new _.a(null)),Xt(this,"overlayTimeout",null);try{this.handle=R.FoxSession.Companion.startStandalone(Object(Gt.createFirebaseProvider)())}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","constructor",t)}}init(){if(this.handle)try{this.setOverlayConfig(),this.setClientSideRules(),this.handle.subscribe(this.onOverlayData.bind(this))}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","init",t)}}async onOverlayData(t){var e;if(!t)return;const n=await this.getOverlayWillAppearCallbackParams();this.willAppearParams.value=n,n.canAppear?(this.overlayData.value=t,this.overlayTimeout&&clearTimeout(this.overlayTimeout),this.overlayTimeout=setTimeout(()=>{this.onDismiss(),this.isFocused()&&this.deliverFocus()},1e3*(null!==(e=null==t?void 0:t.durationSeconds)&&void 0!==e?e:5))):Object(p.b)("MaestroBroadcastOverlayViewModel","onOverlayData","Overlay will-appear callback prevented overlay from appearing, ignoring payload",{willAppearParams:n})}recordPanelView(t){var e;Object(p.b)("MaestroBroadcastOverlayViewModel","recordPanelView","Recording panel view for panelType="+t),null===(e=this.handle)||void 0===e||e.recordPanelView(t)}recordEngagement(t){var e;Object(p.b)("MaestroBroadcastOverlayViewModel","recordEngagement","Recording panel engagement for panelType="+t),null===(e=this.handle)||void 0===e||e.recordEngagement(t)}getOverlayWillAppearCallbackParams(){return new Promise(t=>{let e=!1;const n=n=>{e||(e=!0,clearTimeout(i),t((t=>{const e="object"==typeof t&&null!==t?t:{},n=e.suggestedPosition,i=n&&"object"==typeof n&&"number"==typeof n.x&&"number"==typeof n.y?{x:n.x,y:n.y}:void 0;return{canAppear:"boolean"==typeof e.canAppear?e.canAppear:c,canFocus:"boolean"==typeof e.canFocus?e.canFocus:u,suggestedPosition:i}})(n)))},i=setTimeout(()=>{Object(p.b)("MaestroBroadcastOverlayViewModel","getOverlayWillAppearCallbackParams","will-appear callback not invoked in time, applying PRD defaults"),n(void 0)},Jt.WILL_APPEAR_TIMEOUT_MS);this.delegate.onOverlayEvent({type:"will-appear",payload:{callback:t=>n(t)}})})}deinit(){var t,e,n;null===(t=this.handle)||void 0===t||t.dismissCurrent(),null===(e=this.handle)||void 0===e||e.unsubscribe(),null===(n=this.handle)||void 0===n||n.close(),this.handle=null,this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.willAppearParams.value=null}refresh(){this.setOverlayConfig(),this.setClientSideRules()}setClientSideRules(){const t=ge.getPageConfigs().reduce((t,e)=>{var n;return t.concat(null!==(n=e.clientRules)&&void 0!==n?n:[])},[]);var e;t.length&&(Object(p.b)("MaestroBroadcastOverlayViewModel","setClientSideRules","Setting client rules"),null===(e=this.handle)||void 0===e||e.setRules(JSON.stringify(t)))}setOverlayConfig(){var t;const e=ge.getGlobalConfig();if(!e)return void Object(p.c)("MaestroBroadcastOverlayViewModel","setOverlayConfig","Global Config not found. Can\t initialize Overlay handler");const n=ge.getSiteID(),i=ge.getPageConfigs().map(t=>{var e;return null===(e=t.page)||void 0===e?void 0:e._id}).filter(Boolean);Object(p.b)("MaestroBroadcastOverlayViewModel","setConfig","Setting Overlay config",{siteId:n,shards:e.shards,pageIds:i}),null===(t=this.handle)||void 0===t||t.setOverlayConfig(n,e.shards,i)}recordPanelData(t,e){var n;Object(p.b)("MaestroBroadcastOverlayViewModel","recordPanelData",`Recording panel data for panelType=${t}, data=${JSON.stringify(e)}`),null===(n=this.handle)||void 0===n||n.updatePanelData(t,JSON.stringify(e))}getOverlayBindableValue(t,e){var n,i;const r=null==t||null===(n=t.bindableProperties)||void 0===n?void 0:n.find(t=>e.includes(t.key));return null!==(i=null==r?void 0:r.value)&&void 0!==i?i:null}getOverlayText(t){var e;return null!==(e=this.getOverlayCtaText(t))&&void 0!==e?e:this.getOverlayBindableValue(t,["descriptionText"])}getOverlayCtaText(t){return this.getOverlayBindableValue(t,["ctaText"])}async trackOverlayView(){try{const t=this.overlayData.value;if(!t)return;const e={overlayId:t.overlayId,overlayName:t.overlayName,templateId:t.templateId||"unknown",templateName:t.templateName||"unknown"},n=this.getOverlayText(t);await this.analyticsService.overlayView(e,{trigger_type:t.triggerType.name,timecoded:"TIMECODED"===t.triggerType.name,overlay_text:n})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayView",t)}}async trackOverlayClick(){try{var t,e,n;const i=this.overlayData.value,r=null!==(t=null==i||null===(e=i.ctaData)||void 0===e||null===(n=e.find(t=>"panelType"===t.key))||void 0===n?void 0:n.value)&&void 0!==t?t:null,s=this.getOverlayText(i),a=this.getOverlayCtaText(i);await this.analyticsService.overlayClick(this.getAnalyticsOverlayData(),{action:"open_panel",panel_target:r,overlay_cta_text:a,overlay_text:s})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayClick",t)}}async trackOverlayDismiss(t){try{if(!t)return;const e={overlayId:t.overlayId,overlayName:t.overlayName,templateId:t.templateId||"unknown",templateName:t.templateName||"unknown"},n=this.getOverlayText(t);await this.analyticsService.overlayDismiss(e,{overlay_text:n})}catch(t){Object(p.a)("MaestroBroadcastOverlayViewModel","onOverlayDismiss",t)}}getAnalyticsOverlayData(){var t,e,n,i;return{overlayId:(null===(t=this.overlayData.value)||void 0===t?void 0:t.overlayId)||"unknown",overlayName:(null===(e=this.overlayData.value)||void 0===e?void 0:e.overlayName)||"unknown",templateId:(null===(n=this.overlayData.value)||void 0===n?void 0:n.templateId)||"unknown",templateName:(null===(i=this.overlayData.value)||void 0===i?void 0:i.templateName)||"unknown"}}async onAppear(){var t;null!==(t=this.willAppearParams.value)&&void 0!==t&&t.canFocus&&ge.getMaestroEventViewModel().navigation.setFocus(Kt.a),await this.trackOverlayView(),this.delegate.onOverlayEvent({type:"did-appear",payload:null})}async onEngage(){if(!this.overlayData.value)return;let t;var e,n;"show_panel"===this.overlayData.value.ctaType&&(t=null===(e=this.overlayData.value.ctaData)||void 0===e||null===(n=e.find(t=>"panelType"===t.key))||void 0===n?void 0:n.value);t?(await this.trackOverlayClick(),this.delegate.onOverlayEvent({type:"did-engage",payload:{ctaType:"show_panel"===this.overlayData.value.ctaType?"show_panel":"unknown",ctaValue:t}}),this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.onDismiss()):Object(p.c)("MaestroBroadcastOverlayViewModel","onEngage","CTA value is missing for overlay engagement",{overlayData:this.overlayData.value})}onDismiss(){var t;const e=this.overlayData.value;null===(t=this.handle)||void 0===t||t.dismissCurrent(),this.overlayData.value=null,this.willAppearParams.value=null,this.delegate.onOverlayEvent({type:"did-dismiss",payload:null}),this.trackOverlayDismiss(e).catch(t=>{Object(p.a)("MaestroBroadcastOverlayViewModel","onDismiss",t)})}isFocused(){return ge.getMaestroEventViewModel().navigation.focusKey===Kt.a}setDataToOverlay(t){this.willAppearParams.value&&(this.willAppearParams.value={...this.willAppearParams.value,suggestedPosition:t.suggestedPosition})}onArrowPress(t){this.deliverFocus(t)}onBackPress(){this.overlayTimeout&&(clearTimeout(this.overlayTimeout),this.overlayTimeout=null),this.onDismiss(),this.deliverFocus("back")}deliverFocus(t){const e=ge.getMaestroEventViewModel();e.navigation.focusKey=null,requestAnimationFrame(()=>{e.navigation.pause(),this.delegate.startFocusManagement({fromTarget:"overlay",keyPress:t})})}onUpdatePlayerTimeCode(t){var e;null===(e=this.handle)||void 0===e||e.updateTimecode(t)}}function Zt(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}Xt(Jt,"WILL_APPEAR_TIMEOUT_MS",2e3);class Qt extends m.a{constructor(t=[],e=[],n,i){super(),Zt(this,"_eventIds",new _.a([])),Zt(this,"_pageIds",new _.a([])),Zt(this,"playerTimeCode",null),Zt(this,"analyticsService",void 0),Zt(this,"delegate",void 0),Zt(this,"keyPlaysViewModel",null),Zt(this,"fantasyViewModel",null),Zt(this,"betsViewModel",null),Zt(this,"statsViewModel",null),Zt(this,"shopViewModel",null),Zt(this,"builderPanelViewModel",null),Zt(this,"multiViewViewModel",null),Zt(this,"multiViewPanelViewModel",null),Zt(this,"foxStatsViewModel",null),Zt(this,"foxKeyPlaysViewModel",null),Zt(this,"panelManagerViewModel",void 0),Zt(this,"overlayManagerViewModel",void 0),Zt(this,"navigation",void 0),Zt(this,"authErrorService",void 0),Zt(this,"PANELS_LIFECYCLE_MAP",{builderBlockPanel:{cleanup:()=>{var t;null===(t=this.builderPanelViewModel)||void 0===t||t.cleanup(),this.builderPanelViewModel=null},init:()=>{this.builderPanelViewModel=new O.a(this.analyticsService)}},espnBet:{cleanup:()=>{var t;null===(t=this.betsViewModel)||void 0===t||t.cleanup(),this.betsViewModel=null},init:()=>{this.betsViewModel=new it(this.primaryEventId,this.delegate,this.analyticsService)}},espnFantasy:{cleanup:()=>{var t;null===(t=this.fantasyViewModel)||void 0===t||t.cleanup(),this.fantasyViewModel=null},init:()=>{this.fantasyViewModel=new St(this.primaryEventId,this.delegate,this.analyticsService)}},espnKeyPlays:{cleanup:()=>{var t;null===(t=this.keyPlaysViewModel)||void 0===t||t.cleanup(),this.keyPlaysViewModel=null},init:()=>{this.keyPlaysViewModel=new X(this.analyticsService)}},espnShop:{cleanup:()=>{var t;null===(t=this.shopViewModel)||void 0===t||t.cleanup(),this.shopViewModel=null},init:()=>{this.shopViewModel=new Ft(this.primaryEventId,this.analyticsService)}},espnStats:{cleanup:()=>{var t;null===(t=this.statsViewModel)||void 0===t||t.cleanup(),this.statsViewModel=null},init:()=>{this.statsViewModel=new mt(this.primaryEventId,this.delegate,this.analyticsService)}},foxKeyPlays:{cleanup:()=>{var t;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.deinit(),this.foxKeyPlaysViewModel=null},init:()=>{this.foxKeyPlaysViewModel=new Y(this.eventIds.value,this.delegate,this.analyticsService)},refresh:()=>{this.foxKeyPlaysViewModel&&this.foxKeyPlaysViewModel.refresh(this.eventIds.value)},onHide:()=>{var t,e;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.clearProgress(),null===(e=this.foxKeyPlaysViewModel)||void 0===e||e.pause()},onShow:()=>{var t,e;null===(t=this.foxKeyPlaysViewModel)||void 0===t||t.clearProgress(),null===(e=this.foxKeyPlaysViewModel)||void 0===e||e.resume()}},foxMultiView:{cleanup:()=>{var t;null===(t=this.multiViewViewModel)||void 0===t||t.cleanup(),this.multiViewViewModel=null},init:()=>{this.multiViewViewModel=new Ut.c(this.eventIds.value,this.delegate,this.analyticsService,this.authErrorService)},refresh:()=>{this.multiViewViewModel&&this.multiViewViewModel.refresh(this.eventIds.value)},onHide:()=>{var t;return null===(t=this.multiViewViewModel)||void 0===t?void 0:t.pause()},onShow:()=>{var t;return null===(t=this.multiViewViewModel)||void 0===t?void 0:t.resume()}},foxStats:{cleanup:()=>{var t;null===(t=this.foxStatsViewModel)||void 0===t||t.deinit(),this.foxStatsViewModel=null},init:()=>{this.foxStatsViewModel=new V(this.eventIds.value,this.analyticsService)},refresh:()=>{this.foxStatsViewModel&&this.foxStatsViewModel.refresh(this.eventIds.value)},onHide:()=>{var t;return null===(t=this.foxStatsViewModel)||void 0===t?void 0:t.pause()},onShow:()=>{var t;return null===(t=this.foxStatsViewModel)||void 0===t?void 0:t.resume()}},multiviewPanel:{cleanup:()=>{var t;null===(t=this.multiViewPanelViewModel)||void 0===t||t.cleanup(),this.multiViewPanelViewModel=null},init:()=>{this.multiViewPanelViewModel=new Ht(this.delegate,this.analyticsService),this.multiViewPanelViewModel.init()}},helloWorld:{cleanup:()=>{},init:()=>{}}}),this._pageIds.value=[...e],this._eventIds.value=[...t],this.delegate=n,this.analyticsService=i,this.panelManagerViewModel=new B,this.overlayManagerViewModel=new Jt(this.analyticsService,this.delegate),this.navigation=new v.b,this.authErrorService=new z(this.delegate)}startFocusManagement(t){return t?"overlay"===t.toTarget?this.focusOverlay():"sidebar"===t.toTarget?this.focusSidebar():void 0:(Object(p.c)("MaestroEventViewModel","startFocusManagement","startFocusManagement called without params. Defaulting to sidebar."),this.focusSidebar())}focusSidebar(){const t=this.navigation.focusKey;t&&this.navigation.isFocusableComponent(t)?this.navigation.setFocus(t):this.focusActivePanelNavigationButton(),requestAnimationFrame(()=>{this.navigation.resume()})}focusOverlay(){this.isOverlayShowing()?(this.navigation.setFocus(Kt.a),requestAnimationFrame(()=>{this.navigation.resume()})):Object(p.c)("MaestroEventViewModel","startFocusManagement","Attempting to focus overlay, but no overlay is currently showing.")}get primaryEventId(){return this.eventIds.value[0]||""}async initViewModels(){await this.syncPanelViewModelsFromConfig()}async syncPanelViewModelsFromConfig(){const t=ge.getPageConfigs(),e=e=>I.isPanelAvailableInAny(t,e),n=this.getPanelViewModelMap();for(const t in this.PANELS_LIFECYCLE_MAP){const{cleanup:i,init:r,refresh:s}=this.PANELS_LIFECYCLE_MAP[t];if(e(t)){if(n[t]&&s)s();else if(!n[t])try{r()}catch(e){console.warn(`Failed to initialize view model for panel "${t}". This panel will not be available. Error:`,e),i()}}else i()}}setActivePanel(t){const e=this.panelManagerViewModel.getIndex(t);null!==e?(this.panelManagerViewModel.setActivePanel(t),this.navigation.paused?this.navigation.focusKey="PANEL_NAV_BUTTON_"+e:this.focusActivePanelNavigationButton()):console.warn(`Panel type "${t}" not found.`)}focusActivePanelNavigationButton(){const t=this.panelManagerViewModel.currentPanel;let e=0;var n;t&&(e=null!==(n=this.panelManagerViewModel.getIndex(t))&&void 0!==n?n:0);const i="PANEL_NAV_BUTTON_"+e;this.navigation.isFocusableComponent(i)?this.navigation.setFocus("PANEL_NAV_BUTTON_"+e):console.warn(`Focusable component with key "${i}" not found. Cannot set focus to active panel's navigation button.`)}updatePlayerTimeCode(t){var e,n,i,r;const s=new Date(t);if(isNaN(s.getTime()))return console.warn("Invalid timestamp provided:",t),void console.warn("Make sure the timestamp is a valid number. \nhttps://developers.maestro.io/sdk/web/maestro-event-interface/state/updatePlayerTimeCode");this.playerTimeCode=t,null===(e=this.keyPlaysViewModel)||void 0===e||e.onUpdatePlayerTimeCode(this.playerTimeCode),null===(n=this.foxKeyPlaysViewModel)||void 0===n||n.onUpdatePlayerTimeCode(this.playerTimeCode),null===(i=this.statsViewModel)||void 0===i||i.onUpdatePlayerTimeCode(this.playerTimeCode),null===(r=this.foxStatsViewModel)||void 0===r||r.onUpdatePlayerTimeCode(this.playerTimeCode),this.overlayManagerViewModel.onUpdatePlayerTimeCode(this.playerTimeCode)}getPlayerTimeCode(){return this.playerTimeCode}getViewModelForPanel(t){var e;return null!==(e=this.getPanelViewModelMap()[t])&&void 0!==e?e:null}getPanelViewModelMap(){return{espnStats:this.statsViewModel,espnBet:this.betsViewModel,espnKeyPlays:this.keyPlaysViewModel,espnFantasy:this.fantasyViewModel,espnShop:this.shopViewModel,builderBlockPanel:this.builderPanelViewModel,foxKeyPlays:this.foxKeyPlaysViewModel,foxMultiView:this.multiViewViewModel,foxStats:this.foxStatsViewModel,multiviewPanel:this.multiViewPanelViewModel,helloWorld:null}}setDataToPanel(t){const e=Object.keys(t),n=this.getPanelViewModelMap();for(const i of e){const e=t[i];if(!e)continue;const r=n[i];r?r.setDataToPanel&&r.setDataToPanel(e):console.log(`[setDataToPanel] Panel '${i}' not initialized/supported. Data ignored.`)}}setDataToOverlay(t){this.overlayManagerViewModel.setDataToOverlay(t)}async deinit(){this.cleanupPanelViewModels(),this.panelManagerViewModel.cleanup(),this.overlayManagerViewModel.deinit(),this.navigation.destroy(),this.authErrorService.reset();try{await this.didHidePanel()}catch(t){Object(p.a)("MaestroEventViewModel","deinit.didHidePanel",t)}}updateKeyPlaysData(t){return this.keyPlaysViewModel?this.keyPlaysViewModel.setKeyPlays(t,this.playerTimeCode):Promise.resolve()}updateUserSettings(t){return w.getInstance().updateSettings(t),Promise.resolve()}didStartPlayingClip(t){this.keyPlaysViewModel&&(this.keyPlaysViewModel.lastPlayedClipIndex.value=t,this.keyPlaysViewModel.currentClipPlaybackProgress.value=0,this.keyPlaysViewModel.currentlyPlayingClipIndex.value=t,this.keyPlaysViewModel.clearLoadFailureStatus(t))}didStopPlayingClip(t){this.keyPlaysViewModel&&(this.keyPlaysViewModel.lastPlayedClipIndex.value=t,this.keyPlaysViewModel.currentlyPlayingClipIndex.value=null,this.keyPlaysViewModel.currentClipPlaybackProgress.value=null)}didFailToPlayClip(t){var e;null===(e=this.keyPlaysViewModel)||void 0===e||e.handleKeyPlayLoadFailure(t)}didUpdatePlaybackProgressOfClip(t,e){this.keyPlaysViewModel&&(this.keyPlaysViewModel.currentClipPlaybackProgress.value=e,this.keyPlaysViewModel.clearLoadFailureStatus(t))}async didShowPanel(){for(const e of Object.values(this.PANELS_LIFECYCLE_MAP)){var t;null===(t=e.onShow)||void 0===t||t.call(e)}}async didHidePanel(){for(const e of Object.values(this.PANELS_LIFECYCLE_MAP)){var t;null===(t=e.onHide)||void 0===t||t.call(e)}}currentEventDoesNotSupportKeyPlays(){this.keyPlaysViewModel&&(this.keyPlaysViewModel.errorState.value="unsupportedEvent")}getCurrentEventID(){const t=this._eventIds.value;return 0===t.length?null:1===t.length?t[0]:[...t]}getCurrentEventIDs(){return[...this._eventIds.value]}async refresh(t,e,n){this._eventIds.value=[...t],this._pageIds.value=[...e],this.delegate=n,this.authErrorService.setDelegate(n),await this.syncPanelViewModelsFromConfig(),this.panelManagerViewModel.setPanels(),this.overlayManagerViewModel.refresh()}getCurrentlyPlayingClipIndex(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.currentlyPlayingClipIndex.value)&&void 0!==t?t:null}getLastPlayedClipIndex(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.lastPlayedClipIndex.value)&&void 0!==t?t:null}getCurrentClipPlaybackProgress(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.currentClipPlaybackProgress.value)&&void 0!==t?t:null}getKeyPlaysCount(){var t,e;return null!==(t=null===(e=this.keyPlaysViewModel)||void 0===e?void 0:e.allItems.length)&&void 0!==t?t:0}get eventIds(){return this._eventIds}get pageIds(){return this._pageIds}deliverFocus(){this.navigation.pause(),this.delegate.startFocusManagement({fromTarget:"sidebar",keyPress:"left"})}isOverlayShowing(){return null!==this.overlayManagerViewModel.overlayData.value}cleanupPanelViewModels(){for(const t in this.PANELS_LIFECYCLE_MAP){const{cleanup:e}=this.PANELS_LIFECYCLE_MAP[t];e()}}getFeatureFlag({panelType:t,featureFlag:e}){var n,i,r;const s=ge.getPageConfig(),a=null==s||null===(n=s.panels)||void 0===n||null===(i=n.find(e=>e.panel_type===t))||void 0===i?void 0:i.renderer;if(null!=a&&a.client_settings){var o,l,c;const t=null==a||null===(o=a.client_settings)||void 0===o?void 0:o[e],n=null==t?void 0:t.default,i=Yt.version,r=null!==(l=(null!==(c=null==t?void 0:t.rules)&&void 0!==c?c:[]).filter(t=>{var e,n;if("bbd"!==t.platform)return!1;if(null==i||""===i)return!1;const r=String(null!==(e=t.since_version)&&void 0!==e?e:""),s=String(null!==(n=t.below_version)&&void 0!==n?n:""),a=String(i),o=""===r||$t(a,r)>=0,l=""===s||$t(a,s)<0;return o&&l}).pop())&&void 0!==l?l:null;if(r)return r.value;if(void 0!==n)return n}return null==a||null===(r=a.block_data)||void 0===r?void 0:r[e]}}var te=n(188),ee=n.n(te);function ne(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class ie{static resetServerTimeCacheForTests(){ie.cachedServerTimeDiff=null,ie.serverTimeCachedAt=0,ie.serverTimeInFlight=null}constructor(){ne(this,"client",void 0),this.client=new S.a({baseURL:"https://insights.maestro.io",backoff:2,delay:1e3,retries:1})}isEnabled(){var t,e,n;const i=ge.getGlobalConfig();return null===(t=null==i||null===(e=i.bbd)||void 0===e||null===(n=e.analytics)||void 0===n?void 0:n.enabled)||void 0===t||t}async action(t){if(this.isEnabled())if(t.i_id)try{await this.client.post("/action",t)}catch(t){Object(p.a)("InsightsService","action",t)}else console.warn("InsightsService: Missing i_id in payload, skipping action:",t);else console.warn("InsightsService: Analytics is disabled in global config")}async batchAction(t){if(this.isEnabled())try{const e=await this.client.post("/action",t,{mode:"batch"});if("partial"===e.status){const n=new Error(`Batch action partially failed: ${e.failed} of ${t.length}`);Object(p.a)("InsightsService","batchActionPartialFailure",n)}}catch(t){Object(p.a)("InsightsService","batchAction",t)}else console.warn("InsightsService: Analytics is disabled in global config")}async getServerTime(){if(!this.isEnabled())return{time:Date.now(),diff:0};const t=Date.now();if(null!==ie.cachedServerTimeDiff&&t-ie.serverTimeCachedAt<6e4){return{time:Date.now()+ie.cachedServerTimeDiff,diff:ie.cachedServerTimeDiff}}if(ie.serverTimeInFlight)return ie.serverTimeInFlight;ie.serverTimeInFlight=this.fetchServerTime();try{return await ie.serverTimeInFlight}finally{ie.serverTimeInFlight=null}}async fetchServerTime(){const t=Date.now();try{const e=await this.client.get("/time",{_:`${Date.now()}-${this.randomId()}`,client_time:t}),n=Date.now();return ie.cachedServerTimeDiff=e.diff,ie.serverTimeCachedAt=n,{time:n+e.diff,diff:e.diff}}catch(t){return Object(p.a)("InsightsService","fetchServerTime",t),{time:Date.now(),diff:0}}}randomId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}}ne(ie,"cachedServerTimeDiff",null),ne(ie,"serverTimeCachedAt",0),ne(ie,"serverTimeInFlight",null);var re=n(64),se=n(13);function ae(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class oe{constructor(){ae(this,"currentTime",0),ae(this,"serverOffsetTime",0),ae(this,"insightsService",void 0),ae(this,"cacheManager",void 0),this.insightsService=new ie,this.cacheManager=new re.a}async getPayload(t,e){return this.currentTime=Date.now(),this.serverOffsetTime=await this.getDeviceOffset(),{...this.getPageInsights(e),...this.getDeviceInsights(),...this.getInsightsInsights(e),...this.getMetadataInsights(),...this.getReferrerInsights(),...this.getSessionInsights(),...this.getSiteInsights(e),...this.getUserInsights(),...this.getEventInsights(t)}}getEventInsights(t){const e=t.ontology;return{e_d:"maestro",e_m:Object.values(t.metadata||{}).length>0?JSON.stringify(t.metadata):null,e_t:this.currentTime+this.serverOffsetTime,e_u:se.d.location.href,e0:e.kingdom,e1:e.phylum,e2:e.class,e3:e.order,e4:e.family,e5:e.genus,e6:e.species,t:this.currentTime}}getPageInsights(t){return{p_c:"pages",p_id:null==t?void 0:t.page._id,p_n:null==t?void 0:t.page.name,p_s:null==t?void 0:t.page.slug,p_t:null==t?void 0:t.page.type}}getDevicePermanentID(){const t=se.b.getItem("mio:device:permanentId");if(t)return t;const e=this.randomId();return se.b.setItem("mio:device:permanentId",e),e}getDeviceCreated(){const t=this.cacheManager.getCache("mio:device:created");if(t)return Number(t);const e=(new Date).getTime();return this.cacheManager.setCache("mio:device:created",e.toString()),e}getTabID(){const t=se.c.getItem("mio:device:tabId");if(t)return t;const e=this.randomId();return se.c.setItem("mio:device:tabId",e),e}getDeviceInsights(){return{d_ct:this.getDeviceCreated(),d_nd:!1,d_np:se.d.navigator.platform,d_pid:this.getDevicePermanentID(),d_sh:se.d.screen.height,d_sw:se.d.screen.width,d_tid:this.getTabID(),d_tim:this.currentTime,d_tof:this.serverOffsetTime,d_ua:se.d.navigator.userAgent}}randomId(){return Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15)}async getDeviceOffset(){const t=Date.now(),{diff:e,time:n}=await this.insightsService.getServerTime(),i=Date.now();return(e-(i-t)-(i-n))/2}getInsightsInsights(t){return{i_id:t.insights._id}}getMetadataInsights(){return{m_iv:"1.00.0"}}getReferrerInsights(){return{r_d:"$direct",r_s:null,r_u:"$direct"}}getSessionID(){const t=se.c.getItem("mio:session:id");if(t)return t;const e=this.randomId();return se.c.setItem("mio:session:id",e),e}getSessionInsights(){return{se_id:this.getSessionID(),se_s:this.currentTime}}getSiteInsights(t){return{si_d:t.site.domainUrl,si_id:t.site._id,si_pid:t.site.package.id+"-sapphire",si_pv:t.site.package.version+"-sapphire",si_s:t.site.slug}}getUserInsights(){return{u_a:null,u_c:null,u_e:null,u_id:null,u_li:!1,u_n:null,u_nu:!1,u_s:null,u_u:null,u_un:null}}}function le(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var ce=class{constructor(){le(this,"insightsService",void 0),le(this,"insightsPayloadBuilder",void 0),le(this,"SDKSessionId",""),le(this,"pageIdSessionIdMap",{}),le(this,"pinchBackSessionId",""),le(this,"pageSessionBeaconTimeoutId",null),le(this,"isPageSessionBeaconRunning",!1),le(this,"isPageSessionActive",!1),this.insightsService=new ie,this.insightsPayloadBuilder=new oe}isTestEnvironment(){return!1}async trackAction(t){if(this.isTestEnvironment())return;ge.getMaestroEventViewModel().delegate.trackAction(t.event);const e=await this.insightsPayloadBuilder.getPayload({ontology:{class:t.event.e2_class,family:t.event.e4_family,order:t.event.e3_order,kingdom:t.event.e0_kingdom,phylum:t.event.e1_phylum,genus:t.event.e5_genus,species:t.event.e6_species},metadata:t.event.metadata},t.pageConfig);await this.insightsService.action(e)}async trackMultiEventImpression(t){if(this.isTestEnvironment())return;const e=[];for(const n of t){ge.getMaestroEventViewModel().delegate.trackImpression(n.event);const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:n.event.e0_kingdom,phylum:n.event.e1_phylum,class:n.event.e2_class,order:n.event.e3_order,family:n.event.e4_family,genus:n.event.e5_genus,species:n.event.e6_species},metadata:n.event.metadata},n.pageConfig);e.push(t)}await this.insightsService.batchAction(e)}async trackImpression(t){if(this.isTestEnvironment())return;ge.getMaestroEventViewModel().delegate.trackImpression(t.event);const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:t.event.e0_kingdom,phylum:t.event.e1_phylum,class:t.event.e2_class,order:t.event.e3_order,family:t.event.e4_family,genus:t.event.e5_genus,species:t.event.e6_species},metadata:t.event.metadata},t.pageConfig);await this.insightsService.action(e)}isMultiEvent(){return ge.getMaestroEventViewModel().getCurrentEventIDs().length>1}async overlayView(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayViewSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayViewMultiEvent(t,n,e):void 0}async overlayViewMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_view",e0_kingdom:"overlay",e1_phylum:"view",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventImpression(i)}async overlayViewSingleEvent(t,e,n){await this.trackImpression({event:{name:"overlay_view",e0_kingdom:"overlay",e1_phylum:"view",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async panelView(t,e){const n=ge.getPageConfigs(),i=ge.getMaestroEventViewModel().overlayManagerViewModel;i&&i.recordPanelView(t);const r=n.filter(e=>{var n,i,r;const s=null===(n=e.panels)||void 0===n?void 0:n.find(e=>e.panel_type===t);return s&&!1!==(null===(i=s.renderer)||void 0===i||null===(r=i.supported_platforms)||void 0===r?void 0:r.bbd)});return 1===r.length?this.panelViewSingleEvent(t,r[0],e):this.isMultiEvent()&&r.length>1?this.panelViewMultiEvent(t,e,r):void 0}async panelViewMultiEvent(t,e,n){const i=[];for(const r of n){const n=this.getPanelDataFromPageConfig(t,r);i.push({event:{name:"panel_selected",e0_kingdom:"panel",e1_phylum:"view",e2_class:n.panel_type,e3_order:n.panel_id,e4_family:n.panel_name,metadata:{...e||{},...this.getBaseMetadataFromPageConfig(r)}},pageConfig:r})}await this.trackMultiEventImpression(i)}async panelViewSingleEvent(t,e,n){const i=this.getPanelDataFromPageConfig(t,e);await this.trackImpression({event:{name:"panel_selected",e0_kingdom:"panel",e1_phylum:"view",e2_class:i.panel_type,e3_order:i.panel_id,e4_family:i.panel_name,metadata:{...n||{},...this.getBaseMetadataFromPageConfig(e)}},pageConfig:e})}async overlayClick(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayClickSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayClickMultiEvent(t,n,e):void 0}async overlayClickSingleEvent(t,e,n){await this.trackAction({event:{name:"overlay_pressed",e0_kingdom:"overlay",e1_phylum:"engage",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async overlayClickMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_pressed",e0_kingdom:"overlay",e1_phylum:"engage",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventAction(i)}async overlayDismiss(t,e){const n=ge.getPageConfigs();return 1===n.length?this.overlayDismissSingleEvent(t,n[0],e):this.isMultiEvent()&&n.length>1?this.overlayDismissMultiEvent(t,n,e):void 0}async overlayDismissSingleEvent(t,e,n){await this.trackAction({event:{name:"overlay_dismissed",e0_kingdom:"overlay",e1_phylum:"dismiss",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:e})}async overlayDismissMultiEvent(t,e,n){const i=[];for(const r of e)i.push({event:{name:"overlay_dismissed",e0_kingdom:"overlay",e1_phylum:"dismiss",e2_class:"rive",e3_order:t.overlayId,e4_family:t.overlayName,e6_species:t.overlayId,metadata:n||{}},pageConfig:r});await this.trackMultiEventAction(i)}async panelClick(t){const e=ge.getMaestroEventViewModel().overlayManagerViewModel;e&&e.recordEngagement(t.type);const n=ge.getPageConfigs().filter(e=>{var n,i,r;const s=null===(n=e.panels)||void 0===n?void 0:n.find(e=>e.panel_type===t.type);return s&&!1!==(null===(i=s.renderer)||void 0===i||null===(r=i.supported_platforms)||void 0===r?void 0:r.bbd)});return 1===n.length?this.panelClickSingleEvent(t,n[0]):this.isMultiEvent()&&n.length>1?this.panelClickMultiEvent(t,n):void 0}async panelClickSingleEvent(t,e){const n=this.getPanelDataFromPageConfig(t.type,e);await this.trackAction({event:{name:t.name,e0_kingdom:"panel",e1_phylum:"engage",e2_class:n.panel_type,e3_order:n.panel_id,e4_family:n.panel_name,metadata:{...this.getBaseMetadataFromPageConfig(e),...t.metadata}},pageConfig:e})}async panelClickMultiEvent(t,e){const n=[];for(const i of e){const e=this.getPanelDataFromPageConfig(t.type,i);n.push({event:{name:t.name,e0_kingdom:"panel",e1_phylum:"engage",e2_class:e.panel_type,e3_order:e.panel_id,e4_family:e.panel_name,metadata:{...this.getBaseMetadataFromPageConfig(i),...t.metadata}},pageConfig:i})}await this.trackMultiEventAction(n)}async trackMultiEventAction(t){if(this.isTestEnvironment())return;const e=[];for(const n of t){ge.getMaestroEventViewModel().delegate.trackAction(n.event);const t=await this.insightsPayloadBuilder.getPayload({ontology:{class:n.event.e2_class,family:n.event.e4_family,order:n.event.e3_order,kingdom:n.event.e0_kingdom,phylum:n.event.e1_phylum,genus:n.event.e5_genus,species:n.event.e6_species},metadata:n.event.metadata||{}},n.pageConfig);e.push(t)}await this.insightsService.batchAction(e)}getBaseMetadataFromPageConfig(t){if(!t)return console.warn("Page Config not found. Could not extract metadata."),{league:"",airing:"",event:"",sport:""};const e=t.page.metadata,n="airing"===(null==e?void 0:e.external_field_4)&&e.external_field_1||"",i="event"===(null==e?void 0:e.external_field_4)&&e.external_field_1||"unknown",r=(null==e?void 0:e.external_field_2)||"";return{league:(null==e?void 0:e.external_field_3)||"",airing:n,event:i,sport:r}}getPanelDataFromPageConfig(t,e){if(!e)return console.warn("Page Config not found. Could not extract panel data."),{panel_id:"",panel_name:"",panel_type:""};const n=e.panels.find(e=>e.panel_type===t);return n?{panel_id:n._id,panel_name:n.panel_name||"",panel_type:n.panel_type||""}:(console.warn(`Panel of type ${t} not found in Page Config.`),{panel_id:"",panel_name:"",panel_type:""})}async SDKSessionStart(t){if(!t.length)throw new Error("No Page Configs found for SDKSessionStart. Cannot start session without page context.");return this.SDKSessionId=Math.random().toString(36).substring(2,15),t.length>1?this.SDKMultiEventSessionStart(t):this.SDKSingleEventSessionStart(t[0])}async SDKMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"sdk"},metadata:{version:Yt.version}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","SDKMultiEventSessionStart",t)}}async SDKSingleEventSessionStart(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"sdk"},metadata:{version:Yt.version}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","SDKSingleEventSessionStart",t)}}async pageSessionStart(t){if(!t.length)throw new Error("No Page Configs found for pageSessionStart. Cannot start session without page context.");t.forEach(t=>{this.pageIdSessionIdMap[t.page._id]=Math.random().toString(36).substring(2,15)}),this.isPageSessionActive=!0,t.length>1?await this.pageMultiEventSessionStart(t):await this.pageSingleEventSessionStart(t[0]),this.scheduleNextBeacon()}async pageSingleEventSessionStart(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id]}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","pageSingleEventSessionStart",t)}}async pageMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id]}},n);e.push(t)}await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pageMultiEventSessionStart",t)}}async pageSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for pageSessionEnd. Cannot end session without page context.");try{t.length>1?await this.pageMultiEventSessionEnd(t):await this.pageSingleEventSessionEnd(t[0])}finally{t.forEach(t=>{delete this.pageIdSessionIdMap[t.page._id]}),0===Object.keys(this.pageIdSessionIdMap).length&&(this.isPageSessionActive=!1,this.pageSessionBeaconTimeoutId&&(clearTimeout(this.pageSessionBeaconTimeoutId),this.pageSessionBeaconTimeoutId=null))}}async pageSingleEventSessionEnd(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id]}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","pageSingleEventSessionEnd",t)}}async pageMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"page"},metadata:{version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id]}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pageMultiEventSessionEnd",t)}}async pinchBackSessionStart(t){if(!t.length)throw new Error("No Page Configs found for pinchBackSessionStart. Cannot start session without page context.");return this.pinchBackSessionId=Math.random().toString(36).substring(2,15),t.length>1?this.pinchBackMultiEventSessionStart(t):this.pinchBackSingleEventSessionStart(t[0])}async pinchBackSingleEventSessionStart(t){try{const e=this.getBaseMetadataFromPageConfig(t),n=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"pinchback"},metadata:{...e,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(n)}catch(t){Object(p.a)("AnalyticsService","pinchBackSingleEventSessionStart",t)}}async pinchBackMultiEventSessionStart(t){try{const e=[];for(const n of t){const t=this.getBaseMetadataFromPageConfig(n),i=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"start",class:"pinchback"},metadata:{...t,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(i)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pinchBackMultiEventSessionStart",t)}}async pinchBackSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for pinchBackSessionEnd. Cannot end session without page context.");try{t.length>1?await this.pinchBackMultiEventSessionEnd(t):await this.pinchBackSingleEventSessionEnd(t[0])}finally{this.pinchBackSessionId=""}}async pinchBackSingleEventSessionEnd(t){try{const e=this.getBaseMetadataFromPageConfig(t),n=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"pinchback"},metadata:{...e,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(n)}catch(t){Object(p.a)("AnalyticsService","pinchBackSingleEventSessionEnd",t)}}async pinchBackMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=this.getBaseMetadataFromPageConfig(n),i=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"pinchback"},metadata:{...t,version:Yt.version,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(i)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","pinchBackMultiEventSessionEnd",t)}}async SDKSessionEnd(t){if(!t.length)throw new Error("No Page Configs found for SDKSessionEnd. Cannot end session without page context.");try{if(t.length>1)return this.SDKMultiEventSessionEnd(t);const e=ge.getPageConfig();if(!e)return;await this.SDKSingleEventSessionEnd(e)}finally{this.SDKSessionId=""}}deinit(){this.pageSessionBeaconTimeoutId&&(clearTimeout(this.pageSessionBeaconTimeoutId),this.pageSessionBeaconTimeoutId=null)}async SDKSingleEventSessionEnd(t){try{const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"sdk"},metadata:{version:Yt.version}},t);await this.insightsService.action(e)}catch(t){Object(p.a)("AnalyticsService","SDKSingleEventSessionEnd",t)}}async SDKMultiEventSessionEnd(t){try{const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"end",class:"sdk"},metadata:{version:Yt.version}},n);e.push(t)}return await this.insightsService.batchAction(e)}catch(t){Object(p.a)("AnalyticsService","SDKMultiEventSessionEnd",t)}}scheduleNextBeacon(){var t,e;if(!this.isPageSessionActive)return;const n=ge.getGlobalConfig(),i=(null==n||null===(t=n.bbd)||void 0===t||null===(e=t.analytics)||void 0===e?void 0:e.beacon_interval)||240;this.pageSessionBeaconTimeoutId=setTimeout(async()=>{await this.sendSessionBeacon()},1e3*i)}async sendSessionBeacon(){if(!this.isPageSessionBeaconRunning&&this.isPageSessionActive){this.isPageSessionBeaconRunning=!0;try{await this.sessionBeacon()}catch(t){Object(p.a)("AnalyticsService","sendSessionBeacon",t)}finally{this.isPageSessionBeaconRunning=!1,this.isPageSessionActive&&this.scheduleNextBeacon()}}}async sessionBeacon(){if(this.isMultiEvent()){const t=ge.getPageConfigs();return this.multiEventSessionBeacon(t)}const t=ge.getPageConfig();if(t)return this.singleEventSessionBeacon(t)}async singleEventSessionBeacon(t){const e=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"beacon",class:"frequent"},metadata:{paywall_gated:!1,viewer_id:this.insightsPayloadBuilder.getDevicePermanentID(),is_billable:!1,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[t.page._id],pinchback_session:this.pinchBackSessionId}},t);await this.insightsService.action(e)}async multiEventSessionBeacon(t){const e=[];for(const n of t){const t=await this.insightsPayloadBuilder.getPayload({ontology:{kingdom:"session",phylum:"beacon",class:"frequent"},metadata:{paywall_gated:!1,viewer_id:this.insightsPayloadBuilder.getDevicePermanentID(),is_billable:!1,session:this.SDKSessionId,page_session:this.pageIdSessionIdMap[n.page._id],pinchback_session:this.pinchBackSessionId}},n);e.push(t)}return await this.insightsService.batchAction(e)}};const ue={_id:"6274067af74b66a544018dac",button:{borderRadius:"rounded",textCapitalization:"uppercase"},colors:{accentPrimary:"#FFFFFF",accentSecondary:"#3C3F47",accentTertiary:"#0C0C0E",surface1:"#080A0C",surface2:"#12141A",surface3:"#1B1E26",surface4:"#242833",surface5:"#363C4D",surface6:"#3E4759",highlightPrimary:"#FFFFFF",highlightSecondary:"#9A9EA9",highlightTertiary:"#0A0C0F",alertConfirmation:"#43D48F",alertWarning:"#F58B00",alertError:"#FF0000",text100:"#F8F9FA",text200:"#C2C5CB",text300:"#8D919D",text400:"#5C606B",text500:"#0C0C0E"},creator:"016901e60000000000000000",name:"Dark Mode",type:"classic",mode:"dark",owner:"016901e60000000000000000",typography:{body:"BentonSans-Medium",headline:"BentonSans-Medium"}},he={body:"var(--font-tertiary)",headline:"var(--font-primary)",title:"var(--font-secondary)"},de={body:"BentonSans",headline:"BentonSansBold",title:"BentonSansMedium"},fe=()=>{var t;const e=ge.getPageConfig();return(null==e||null===(t=e.theme)||void 0===t?void 0:t.colors)||ue.colors},_e=()=>Object(j.b)(ge.getSiteID())?he:de;function pe(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class me{constructor(t){pe(this,"renderer",void 0),pe(this,"siteID",""),pe(this,"maestroEventViewModel",null),pe(this,"pageConfigs",[]),pe(this,"globalConfig",null),pe(this,"globalConfigPoller",null),pe(this,"_analyticsService",null),pe(this,"isProdEnv",!0),pe(this,"activePanelUnmountFn",null),pe(this,"activeOverlayUnmountFn",null),this.renderer=t}get analyticsService(){return this._analyticsService||(this._analyticsService=new ce),this._analyticsService}static getInstance(){if(!me.instance){const t=new l;me.instance=new me(t)}return me.instance}async userDidStartWatchingEvent({eventId:t,pageId:e,userSettings:n,delegate:i,useProdEnv:r=!0}){this.isProdEnv=r;const s=this.getSiteID();if(!s||""===s.trim())throw new Error("siteID must be set before calling userDidStartWatchingEvent.");const a=Array.isArray(t)?t:t?[t]:[],o=Array.isArray(e)?e:e?[e]:[];if(0===a.length&&0===o.length)throw new Error("Either eventId or pageId must be provided to load the page configuration.");const l=new I(s,this.isProdEnv),c=[...this.pageConfigs];let u=[];if(o.length>0){const t=await l.fetchPageConfigsByPageIds(s,o);u=t.filter(t=>null!==t)}else{const t=await l.fetchPageConfigsByMetadata(s,a);u=t.filter(t=>null!==t)}if(0===u.length)throw new Error(`Could not determine page configuration for siteId: ${s}, pageId: ${o.join(",")} and eventId: ${a.join(",")}.`);if(this.pageConfigs=u,this.globalConfigPoller||(this.globalConfigPoller=l.pollGlobalConfig(t=>{this.globalConfig=t})),n&&w.getInstance().updateSettings(n),this.maestroEventViewModel){const t=u.filter(t=>!c.some(e=>e.page._id===t.page._id)),e=c.filter(t=>!u.some(e=>e.page._id===t.page._id));return e.length>0&&await this.analyticsService.pageSessionEnd(e),t.length>0&&await this.analyticsService.pageSessionStart(t),await this.maestroEventViewModel.refresh(a,o,i),this.maestroEventViewModel}return await this.analyticsService.SDKSessionStart(this.pageConfigs),this.maestroEventViewModel=new Qt(a,o,i,this.analyticsService),await this.maestroEventViewModel.initViewModels(),await this.analyticsService.pageSessionStart(this.pageConfigs),await this.enableOverlays(),(()=>{const t=fe(),e=_e();Object.keys(t).forEach(e=>{document.documentElement.style.setProperty("--sdk-"+e,t[e])}),Object.keys(e).forEach(t=>{document.documentElement.style.setProperty("--sdk-font-"+t,e[t])})})(),this.maestroEventViewModel}async enableOverlays(){this.activeOverlayUnmountFn&&this.activeOverlayUnmountFn();const t=(()=>{const t=document.getElementById("maestro__sdk__overlay");if(t)return t;const e=document.createElement("div");return e.id="maestro__sdk__overlay",document.body.appendChild(e),e})();this.activeOverlayUnmountFn=await this.renderer.renderOverlay(t.id)}async userDidStopWatchingEvent(t){if(this.activePanelUnmountFn&&await this.activePanelUnmountFn(),this.activeOverlayUnmountFn){this.activeOverlayUnmountFn(),this.activeOverlayUnmountFn=null;const t=document.getElementById("maestro__sdk__overlay");t&&document.body.removeChild(t)}await this.analyticsService.pageSessionEnd(this.pageConfigs),this.maestroEventViewModel&&(await this.maestroEventViewModel.deinit(),this.maestroEventViewModel=null),await this.analyticsService.SDKSessionEnd(this.pageConfigs),this.analyticsService.deinit(),this.pageConfigs=[],this.globalConfig=null,this.globalConfigPoller&&(this.globalConfigPoller.stop(),this.globalConfigPoller=null),(()=>{const t=fe(),e=_e();Object.keys(t).forEach(t=>{document.documentElement.style.removeProperty("--sdk-"+t)}),Object.keys(e).forEach(t=>{document.documentElement.style.removeProperty("--sdk-font-"+t)})})()}configure(t){this.setSiteID(t.siteID),t.userSettings&&w.getInstance().updateSettings(t.userSettings),Object(p.b)("MaestroWebSDK","configure","SDK configured",{configParams:t})}setSiteID(t){if(!t||""===t.trim())throw new Error("Site ID must be provided");this.siteID=t}getSiteID(){return this.siteID}getIsProdEnv(){return this.isProdEnv}getMaestroEventViewModel(){if(!this.maestroEventViewModel)throw new Error("No Maestro Event View Model set");return this.maestroEventViewModel}async renderPanel(t){await this.analyticsService.pinchBackSessionStart(this.pageConfigs);const e=await this.renderer.renderPanel(t);let n=!1;const i=async()=>{n||(n=!0,e(),await this.analyticsService.pinchBackSessionEnd(this.pageConfigs),this.activePanelUnmountFn===i&&(this.activePanelUnmountFn=null))};return this.activePanelUnmountFn=i,i}getPageConfig(){var t;return null!==(t=this.pageConfigs[0])&&void 0!==t?t:null}getPageConfigs(){return this.pageConfigs}getGlobalConfig(){return this.globalConfig}}pe(me,"instance",void 0);const ve=me.getInstance();var ge=e.default=ve},function(t,e,n){"use strict";n.d(e,"a",(function(){return h})),n.d(e,"b",(function(){return d})),n.d(e,"c",(function(){return f}));var i=n(29),r=n(13);const s=[/bbd-web-sdk\.us-central1-dev\.gcp\.maestro\.io/];let a=null,o=[],l=!1;const c=async()=>{if(!a&&!l&&Object(r.a)()){l=!0;try{const{BrowserClient:t,defaultStackParser:e,defaultIntegrations:c,makeFetchTransport:u}=await Promise.resolve().then(n.bind(null,316)),h=null!==s.find(t=>t.test(r.d.location.href));a=new t({dsn:"https://91444a71cbaefc62e8dc813f22bad3bf@o4506894189330432.ingest.us.sentry.io/4509946717470720",transport:u,stackParser:e,integrations:c.filter(t=>!["BrowserApiErrors","Breadcrumbs","GlobalHandlers"].includes(t.name)),tracesSampleRate:h?1:.1,release:i.version,environment:h?"development":"production",enabled:!/localhost/.test(r.d.location.href)}),o.forEach(({error:t,extra:e})=>{var n;null===(n=a)||void 0===n||n.captureException(t,e)}),o=[]}catch(t){console.error("[maestro-web-sdk] Failed to load Sentry:",t)}finally{l=!1}}};const u="[maestro-web-sdk]";function h(t,e,n,i){((t,e)=>{a?a.captureException(t,e):(o.push({error:t,extra:e}),c())})(n,{context:`${t}.${e}`,...i}),i?console.error(`${u}[${t}] ${e}:`,n,i):console.error(`${u}[${t}] ${e}:`,n)}function d(t,e,n,i){i?console.info(`${u}[${t}] ${e}:`,n,i):console.info(`${u}[${t}] ${e}:`,n)}function f(t,e,n,i){i?console.warn(`${u}[${t}] ${e}:`,n,i):console.warn(`${u}[${t}] ${e}:`,n)}},function(t,e,n){"use strict";var i=n(0),r=n.n(i);function s(){return(s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class o extends r.a.Component{constructor(t){super(t),a(this,"state",{failed:!1}),a(this,"handleError",()=>{this.setState({failed:!0})})}componentDidUpdate(t){t.src!==this.props.src&&this.state.failed&&this.setState({failed:!1})}render(){return this.state.failed?(console.warn("Image failed to load:",this.props.src),null):this.props.src?r.a.createElement("img",s({alt:this.props.alt||"Image"},this.props,{onError:this.handleError})):(console.warn("Image source is empty"),null)}}e.a=o},function(t,e,n){"use strict";function i(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}n.d(e,"a",(function(){return r}));class r{constructor(t){i(this,"listeners",[]),i(this,"_value",void 0),this._value=t}get value(){return this._value}set value(t){this._value=t,this.notify()}subscribe(t){return this.listeners.push(t),()=>{this.listeners=this.listeners.filter(e=>e!==t)}}notify(){this.listeners.forEach(t=>t(this._value))}}},,,function(t,e,n){"use strict";var i=n(49);e.a=i.b},function(t,e,n){"use strict";var i=n(36);e.a=i.a},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return a}));const i=()=>"undefined"!=typeof window,r={getItem:t=>i()?localStorage.getItem(t):null,setItem:(t,e)=>{i()&&localStorage.setItem(t,e)},removeItem:t=>{i()&&localStorage.removeItem(t)},get length(){return i()?localStorage.length:0},key:t=>i()?localStorage.key(t):null},s={getItem:t=>i()?sessionStorage.getItem(t):null,setItem:(t,e)=>{i()&&sessionStorage.setItem(t,e)}},a={get location(){return i()?window.location:{href:""}},get navigator(){return i()?window.navigator:{userAgent:"",platform:""}},get screen(){return i()?window.screen:{height:0,width:0}}}},function(t,e,n){"use strict";(function(t){function i(t){return t&&t.Math==Math?t:void 0}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a}));const r="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof t&&i(t)||function(){return this}()||{};function s(){return r}function a(t,e,n){const i=n||r,s=i.__SENTRY__=i.__SENTRY__||{};return s[t]||(s[t]=e())}}).call(this,n(43))},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i={ESPN_KEY_PLAYS:"espnKeyPlays",ESPN_STATS:"espnStats",ESPN_BETS:"espnBet",ESPN_FANTASY:"espnFantasy",ESPN_SHOP:"espnShop",HELLO_WORLD:"helloWorld",FOX_KEY_PLAYS:"foxKeyPlays",FOX_MULTI_VIEW:"foxMultiView",FOX_STATS:"foxStats",MULTI_VIEW_PANEL:"multiviewPanel",BUILDER_BLOCK_PANEL:"builderBlockPanel"}},function(t,e,n){"use strict";n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return r}));const i=t=>t.toLowerCase().trim().replace(/[\s\W-]+/g,"-").replace(/^-+|-+$/g,"");function r(t){let e=0;for(let n=0;n<t.length;n++){e=(e<<5)-e+t.charCodeAt(n),e&=e}return e}},function(t,e,n){"use strict";var i=n(0),r=n.n(i),s=n(48);e.a=({children:t})=>{const e=Object(i.useRef)(null),{setRef:n,removeRef:a}=Object(s.a)();return Object(i.useEffect)(()=>{const t=e.current;return t&&n(t),()=>{t&&a(t)}},[n,a]),r.a.createElement("div",{className:"focusable-item",ref:e},t)}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return l})),n.d(e,"c",(function(){return f})),n.d(e,"d",(function(){return r})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return d})),n.d(e,"g",(function(){return g})),n.d(e,"h",(function(){return v})),n.d(e,"i",(function(){return h})),n.d(e,"j",(function(){return u})),n.d(e,"k",(function(){return _})),n.d(e,"l",(function(){return c})),n.d(e,"m",(function(){return m})),n.d(e,"n",(function(){return p}));const i=Object.prototype.toString;function r(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}function s(t,e){return i.call(t)===`[object ${e}]`}function a(t){return s(t,"ErrorEvent")}function o(t){return s(t,"DOMError")}function l(t){return s(t,"DOMException")}function c(t){return s(t,"String")}function u(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function h(t){return s(t,"Object")}function d(t){return"undefined"!=typeof Event&&g(t,Event)}function f(t){return"undefined"!=typeof Element&&g(t,Element)}function _(t){return s(t,"RegExp")}function p(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function m(t){return h(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function v(t){return"number"==typeof t&&t!=t}function g(t,e){try{return t instanceof e}catch(t){return!1}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return u})),n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return c})),n.d(e,"d",(function(){return p})),n.d(e,"e",(function(){return _})),n.d(e,"f",(function(){return l})),n.d(e,"g",(function(){return o})),n.d(e,"h",(function(){return h})),n.d(e,"i",(function(){return a})),n.d(e,"j",(function(){return f})),n.d(e,"k",(function(){return d})),n.d(e,"l",(function(){return m}));const i=Object.prototype.toString;function r(t){switch(i.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return p(t,Error)}}function s(t,e){return i.call(t)===`[object ${e}]`}function a(t){return s(t,"String")}function o(t){return null===t||function(t){return"object"==typeof t&&null!==t&&"__sentry_template_string__"in t&&"__sentry_template_values__"in t}(t)||"object"!=typeof t&&"function"!=typeof t}function l(t){return s(t,"Object")}function c(t){return"undefined"!=typeof Event&&p(t,Event)}function u(t){return"undefined"!=typeof Element&&p(t,Element)}function h(t){return s(t,"RegExp")}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function f(t){return l(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}function _(t){return"number"==typeof t&&t!=t}function p(t,e){try{return t instanceof e}catch(t){return!1}}function m(t){return!("object"!=typeof t||null===t||!t.__isVue&&!t._isVue)}},function(t,e,n){"use strict";n.d(e,"b",(function(){return s})),n.d(e,"a",(function(){return a}));var i=n(0);function r(t){if(!t)return;const e=t.getBoundingClientRect();t.style.maxHeight=window.innerHeight-e.top+"px"}function s(){const t=Object(i.useRef)(null),e=Object(i.useCallback)(()=>{r(t.current)},[]);Object(i.useEffect)(()=>(window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}),[e]);return Object(i.useCallback)(e=>{t.current=e,r(e)},[])}function a(t){const e=()=>{r(t())};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return l})),n.d(e,"b",(function(){return c})),n.d(e,"c",(function(){return d})),n.d(e,"d",(function(){return o}));var i=n(211),r=n(31),s=n(19),a=n(24);n(46);function o(t,e,n){if(!(e in t))return;const i=t[e],r=n(i);"function"==typeof r&&function(t,e){try{const n=e.prototype||{};t.prototype=e.prototype=n,l(t,"__sentry_original__",e)}catch(t){}}(r,i),t[e]=r}function l(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){r.a&&a.c.log(`Failed to add non-enumerable property "${e}" to object`,t)}}function c(t){if(Object(s.b)(t))return{message:t.message,name:t.name,stack:t.stack,...h(t)};if(Object(s.c)(t)){const e={type:t.type,target:u(t.target),currentTarget:u(t.currentTarget),...h(t)};return"undefined"!=typeof CustomEvent&&Object(s.d)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function u(t){try{return Object(s.a)(t)?Object(i.a)(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function h(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function d(t){return function t(e,n){if(function(t){if(!Object(s.f)(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(e)){const i=n.get(e);if(void 0!==i)return i;const r={};n.set(e,r);for(const i of Object.keys(e))void 0!==e[i]&&(r[i]=t(e[i],n));return r}if(Array.isArray(e)){const i=n.get(e);if(void 0!==i)return i;const r=[];return n.set(e,r),e.forEach(e=>{r.push(t(e,n))}),r}return e}(t,new Map)}},function(t,e,n){"use strict";(function(t){function i(t){return t&&t.Math==Math?t:void 0}n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s})),n.d(e,"c",(function(){return a}));const r="object"==typeof globalThis&&i(globalThis)||"object"==typeof window&&i(window)||"object"==typeof self&&i(self)||"object"==typeof t&&i(t)||function(){return this}()||{};function s(){return r}function a(t,e,n){const i=n||r,s=i.__SENTRY__=i.__SENTRY__||{};return s[t]||(s[t]=e())}}).call(this,n(43))},function(t,e,n){"use strict";n.d(e,"a",(function(){return o}));var i=n(44),r=n(64),s=n(38);function a(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}const o={GET:"GET",POST:"POST",PUT:"PUT",DELETE:"DELETE"};e.b=class{constructor(t={},e){a(this,"cacheManager",void 0),a(this,"maestroClient",void 0),a(this,"externalClient",void 0),a(this,"pollingTasks",void 0),a(this,"localStorage",void 0),this.pollingTasks=new Map,this.cacheManager=t.cacheManager||new r.a(t.defaultCacheDuration),this.maestroClient=t.networkClient||new i.a({baseURL:"https://api.maestro.io",retries:3,delay:1e3,backoff:2}),this.externalClient=t.externalNetworkClient||new i.a({baseURL:t.externalBaseURL||"",retries:3,delay:1e3,backoff:2}),this.localStorage=e||"undefined"!=typeof globalThis&&globalThis.localStorage||{length:0,clear:()=>{},getItem:()=>null,key:()=>null,removeItem:()=>{},setItem:()=>{}}}setAuthentication(t,e){this.maestroClient.setAuthentication(t,e)}async withCache(t,e,n){const i=this.cacheManager.produceCacheKey(JSON.stringify({endpoint:t.endpoint,params:t.params,data:null}));if(e){const t=this.cacheManager.getCache(i);if(t)return t}const r=await n();return e&&this.cacheManager.setCache(i,r),r}handleError(t){if(t.response){var e;const n=t.response.status,i=(null===(e=t.response.data)||void 0===e?void 0:e.message)||t.message;throw 401===n||403===n?new s.a(n,i,t.response.data):404===n?new s.d(i):n>=500?new s.e(n,i):new s.b(n,i)}throw t.request?new s.c("Network request failed"):t}async maestroApiRequest({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,maestroDefaultHeaders:a=null,skipResponseBodyDeserialization:l=!1}){const c={"x-maestro-maestro-kit-flavor":"MaestroKit_Web",...r};a&&(c["x-maestro-client-id"]=a.siteId,c.Authorization="Bearer "+a.jwt,c["Content-type"]="application/json");const u=e===o.GET&&s,h=async()=>{let r;if(e===o.GET)r=await this.maestroClient.get(t,n,c);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);r=await this.maestroClient.post(t,i)}return l&&!r&&(r={}),r};try{return await this.withCache({endpoint:t,params:n},u,h)}catch(t){return this.handleError(t)}}async externalApiRequest({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,skipResponseBodyDeserialization:a=!1}){const l=e===o.GET&&s,c=async()=>{let s;if(e===o.GET)s=await this.externalClient.get(t,n,r);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);s=await this.externalClient.post(t,i,n,r)}return a&&!s&&(s={}),s};try{return await this.withCache({endpoint:t,params:n},l,c)}catch(t){return this.handleError(t)}}async externalApiRequestWithHeaders({endpoint:t,method:e=o.GET,params:n={},data:i=null,headers:r={},useCache:s=!1,skipResponseBodyDeserialization:a=!1}){const l=e===o.GET&&s,c=this.cacheManager.produceCacheKey(JSON.stringify({endpoint:t,params:n,data:null}));if(l){const t=this.cacheManager.getCache(c);if(t)return{data:t,headers:{}}}try{let s;if(e===o.GET)s=await this.externalClient.getWithHeaders(t,n,r);else{if(e!==o.POST)throw new Error(`Method ${e} not implemented`);s=await this.externalClient.postWithHeaders(t,i,n,r)}return a&&!s.data&&(s.data={}),l&&this.cacheManager.setCache(c,s.data),s}catch(t){return this.handleError(t)}}pollMaestroApiRequest({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},maestroDefaultHeaders:a=null,skipResponseBodyDeserialization:l=!1,onData:c,onError:u}){const h=`${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var d;this.pollingTasks.has(h)&&(null===(d=this.pollingTasks.get(h))||void 0===d||d.controller.abort(),this.pollingTasks.delete(h));const f=new AbortController,_=f.signal;return(async()=>{for(;!_.aborted;){try{const e=await this.maestroApiRequest({endpoint:t,method:n,params:i,data:r,headers:s,maestroDefaultHeaders:a,skipResponseBodyDeserialization:l,useCache:!1});c(e)}catch(t){u&&u(t)}_.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(h,{controller:f,interval:e}),{stop:()=>{var t;this.pollingTasks.has(h)&&(null===(t=this.pollingTasks.get(h))||void 0===t||t.controller.abort(),this.pollingTasks.delete(h))}}}pollExternalApiRequest({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},skipResponseBodyDeserialization:a=!1,onData:l,onError:c}){const u=`external-${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var h;this.pollingTasks.has(u)&&(null===(h=this.pollingTasks.get(u))||void 0===h||h.controller.abort(),this.pollingTasks.delete(u));const d=new AbortController,f=d.signal;return(async()=>{for(;!f.aborted;){try{const e=await this.externalApiRequest({endpoint:t,method:n,params:i,data:r,headers:s,skipResponseBodyDeserialization:a,useCache:!1});l(e)}catch(t){c&&c(t)}f.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(u,{controller:d,interval:e}),{stop:()=>{var t;this.pollingTasks.has(u)&&(null===(t=this.pollingTasks.get(u))||void 0===t||t.controller.abort(),this.pollingTasks.delete(u))}}}pollExternalApiRequestWithHeaders({endpoint:t,interval:e,method:n=o.GET,params:i={},data:r=null,headers:s={},skipResponseBodyDeserialization:a=!1,onData:l,onError:c}){const u=`external-headers-${t}-${JSON.stringify(i)}-${JSON.stringify(r)}`;var h;this.pollingTasks.has(u)&&(null===(h=this.pollingTasks.get(u))||void 0===h||h.controller.abort(),this.pollingTasks.delete(u));const d=new AbortController,f=d.signal;return(async()=>{for(;!f.aborted;){try{const e=await this.externalApiRequestWithHeaders({endpoint:t,method:n,params:i,data:r,headers:s,skipResponseBodyDeserialization:a,useCache:!1});l(e)}catch(t){c&&c(t)}f.aborted||await new Promise(t=>setTimeout(t,e))}})(),this.pollingTasks.set(u,{controller:d,interval:e}),{stop:()=>{var t;this.pollingTasks.has(u)&&(null===(t=this.pollingTasks.get(u))||void 0===t||t.controller.abort(),this.pollingTasks.delete(u))}}}stopAllPolling(){for(const[t,{controller:e}]of this.pollingTasks.entries())e.abort(),this.pollingTasks.delete(t)}clearAllCache(){const t=this.localStorage.length;for(let e=0;e<t;e++){const t=this.localStorage.key(e);t&&t.startsWith("maestro-cache-")&&this.localStorage.removeItem(t)}}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s})),n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return l})),n.d(e,"d",(function(){return a}));var i=n(31),r=n(14);const s=["debug","info","warn","error","log","assert","trace"],a={};function o(t){if(!("console"in r.a))return t();const e=r.a.console,n={},i=Object.keys(a);i.forEach(t=>{const i=a[t];n[t]=e[t],e[t]=i});try{return t()}finally{i.forEach(t=>{e[t]=n[t]})}}const l=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return i.a?s.forEach(n=>{e[n]=(...e)=>{t&&o(()=>{r.a.console[n](`Sentry Logger [${n}]:`,...e)})}}):s.forEach(t=>{e[t]=()=>{}}),e}()},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return s}));var i=n(6);const r=(t,e,n)=>{try{const i=new URL(t);if("static-media.fox.com"!==i.hostname)return t;const r=i.searchParams.has("fit"),s=i.searchParams.has("downsize");return r||s?t:(i.searchParams.set("downsize",`${e}:${n}`),i.toString())}catch(e){return Object(i.a)("url","applyFoxCdnImageResize",e),t}},s=(t,e,n)=>{try{const i=new URL(t);return i.searchParams.set("w",e.toString()),i.searchParams.set("h",n.toString()),i.toString()}catch(e){return Object(i.a)("url","setImageDimensions",e),t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return s}));var i=n(8);function r(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class s{constructor(){r(this,"_isLoading",new i.a(!1)),r(this,"_error",new i.a(null))}get isLoading(){return this._isLoading}get error(){return this._error}setLoading(t){this._isLoading.value=t}setError(t){this._error.value=t}}},function(t,e,n){"use strict";n.d(e,"a",(function(){return o})),n.d(e,"b",(function(){return h})),n.d(e,"c",(function(){return p})),n.d(e,"d",(function(){return _})),n.d(e,"e",(function(){return a})),n.d(e,"f",(function(){return c})),n.d(e,"g",(function(){return l})),n.d(e,"h",(function(){return u}));var i=n(205),r=n(18),s=n(40);function a(t,e,n){if(!(e in t))return;const i=t[e],r=n(i);if("function"==typeof r)try{l(r,i)}catch(t){}t[e]=r}function o(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function l(t,e){const n=e.prototype||{};t.prototype=e.prototype=n,o(t,"__sentry_original__",e)}function c(t){return t.__sentry_original__}function u(t){return Object.keys(t).map(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&")}function h(t){if(Object(r.d)(t))return{message:t.message,name:t.name,stack:t.stack,...f(t)};if(Object(r.f)(t)){const e={type:t.type,target:d(t.target),currentTarget:d(t.currentTarget),...f(t)};return"undefined"!=typeof CustomEvent&&Object(r.g)(t,CustomEvent)&&(e.detail=t.detail),e}return t}function d(t){try{return Object(r.c)(t)?Object(i.c)(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function f(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function _(t,e=40){const n=Object.keys(h(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Object(s.d)(n[0],e);for(let t=n.length;t>0;t--){const i=n.slice(0,t).join(", ");if(!(i.length>e))return t===n.length?i:Object(s.d)(i,e)}return""}function p(t){return function t(e,n){if(Object(r.i)(e)){const i=n.get(e);if(void 0!==i)return i;const r={};n.set(e,r);for(const i of Object.keys(e))void 0!==e[i]&&(r[i]=t(e[i],n));return r}if(Array.isArray(e)){const i=n.get(e);if(void 0!==i)return i;const r=[];return n.set(e,r),e.forEach(e=>{r.push(t(e,n))}),r}return e}(t,new Map)}},function(t,e,n){"use strict";var i,r=n(189),s=Object.prototype.toString,a=(i=Object.create(null),function(t){var e=s.call(t);return i[e]||(i[e]=e.slice(8,-1).toLowerCase())});function o(t){return t=t.toLowerCase(),function(e){return a(e)===t}}function l(t){return Array.isArray(t)}function c(t){return void 0===t}var u=o("ArrayBuffer");function h(t){return null!==t&&"object"==typeof t}function d(t){if("object"!==a(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype}var f=o("Date"),_=o("File"),p=o("Blob"),m=o("FileList");function v(t){return"[object Function]"===s.call(t)}var g=o("URLSearchParams");function A(t,e){if(null!=t)if("object"!=typeof t&&(t=[t]),l(t))for(var n=0,i=t.length;n<i;n++)e.call(null,t[n],n,t);else for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.call(null,t[r],r,t)}var b,y=(b="undefined"!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(t){return b&&t instanceof b});t.exports={isArray:l,isArrayBuffer:u,isBuffer:function(t){return null!==t&&!c(t)&&null!==t.constructor&&!c(t.constructor)&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)},isFormData:function(t){return t&&("function"==typeof FormData&&t instanceof FormData||"[object FormData]"===s.call(t)||v(t.toString)&&"[object FormData]"===t.toString())},isArrayBufferView:function(t){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&u(t.buffer)},isString:function(t){return"string"==typeof t},isNumber:function(t){return"number"==typeof t},isObject:h,isPlainObject:d,isUndefined:c,isDate:f,isFile:_,isBlob:p,isFunction:v,isStream:function(t){return h(t)&&v(t.pipe)},isURLSearchParams:g,isStandardBrowserEnv:function(){return("undefined"==typeof navigator||"ReactNative"!==navigator.product&&"NativeScript"!==navigator.product&&"NS"!==navigator.product)&&("undefined"!=typeof window&&"undefined"!=typeof document)},forEach:A,merge:function t(){var e={};function n(n,i){d(e[i])&&d(n)?e[i]=t(e[i],n):d(n)?e[i]=t({},n):l(n)?e[i]=n.slice():e[i]=n}for(var i=0,r=arguments.length;i<r;i++)A(arguments[i],n);return e},extend:function(t,e,n){return A(e,(function(e,i){t[i]=n&&"function"==typeof e?r(e,n):e})),t},trim:function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")},stripBOM:function(t){return 65279===t.charCodeAt(0)&&(t=t.slice(1)),t},inherits:function(t,e,n,i){t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,n&&Object.assign(t.prototype,n)},toFlatObject:function(t,e,n){var i,r,s,a={};e=e||{};do{for(r=(i=Object.getOwnPropertyNames(t)).length;r-- >0;)a[s=i[r]]||(e[s]=t[s],a[s]=!0);t=Object.getPrototypeOf(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},kindOf:a,kindOfTest:o,endsWith:function(t,e,n){t=String(t),(void 0===n||n>t.length)&&(n=t.length),n-=e.length;var i=t.indexOf(e,n);return-1!==i&&i===n},toArray:function(t){if(!t)return null;var e=t.length;if(c(e))return null;for(var n=new Array(e);e-- >0;)n[e]=t[e];return n},isTypedArray:y,isFileList:m}},function(t){t.exports=JSON.parse('{"name":"@maestro_io/maestro-web-sdk","private":false,"version":"6.0.3","type":"commonjs","license":"MIT","main":"dist/maestro-web-sdk.umd.js","module":"dist/maestro-web-sdk.esm.js","types":"dist/index.d.ts","files":["dist"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/maestro-web-sdk.esm.js","require":"./dist/maestro-web-sdk.umd.js","default":"./dist/maestro-web-sdk.esm.js"}},"sideEffects":["*.css"],"engines":{"node":">=18"},"scripts":{"dev":"nodemon","sdk-only":"webpack-dev-server --config webpack/webpack.dev.js","lint":"eslint src --ext .ts,.tsx --ignore-pattern \'**/*.test.*\'","test":"jest","build":"webpack --config webpack/webpack.prod.js && tsc --emitDeclarationOnly --declarationDir dist/types && dts-bundle --name @maestro_io/maestro-web-sdk --main dist/types/src/index.d.ts --out ../../index.d.ts && rm -rf dist/types","types":"tsc -b","analyze":"ANALYZE=true webpack --config webpack/webpack.prod.js","format":"prettier --write .","format:check":"prettier --check ."},"devDependencies":{"@babel/core":"7.12.3","@babel/plugin-proposal-class-properties":"7.12.1","@babel/plugin-syntax-dynamic-import":"^7.8.3","@babel/preset-env":"7.12.1","@babel/preset-react":"7.12.1","@babel/preset-typescript":"7.12.1","@lessthan3/maestro-fox-domain":"4.0.20-218","@types/enzyme-adapter-react-16":"^1.0.6","@types/jest":"24.0.25","@types/node":"^18.0.0","@types/prop-types":"^15.7.10","@types/react":"16.14.34","@types/react-dom":"16.9.18","@typescript-eslint/eslint-plugin":"2.34.0","@typescript-eslint/parser":"2.34.0","babel-jest":"26.6.3","babel-loader":"8","css-loader":"5","dts-bundle":"^0.7.3","dotenv":"^16.6.1","enzyme":"3.11.0","enzyme-adapter-react-16":"1.15.7","eslint":"6.8.0","eslint-config-prettier":"6.0.0","eslint-plugin-react":"7.20.0","file-loader":"^6.2.0","globals":"^10","html-webpack-plugin":"4","husky":"^6.0.0","identity-obj-proxy":"^3.0.0","jest":"26.6.3","nodemon":"^3.1.9","prettier":"2.0.5","react":"16.14.0","react-dom":"16.14.0","react-test-renderer":"16.14.0","style-loader":"2","tsconfig-paths-webpack-plugin":"^4.2.0","typescript":"^4","webpack":"4","webpack-bundle-analyzer":"3.9.0","webpack-cli":"3.3.12","webpack-dev-server":"3.11.2"},"dependencies":{"@rive-app/webgl2":"^2","@sentry/browser":"7.68.0","axios":"^0.27.2","firebase":"^11.1.0","prop-types":"15.8.1"},"peerDependencies":{"react":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0","react-dom":"^16.0.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"resolutions":{"sockjs-client":"1.5.1","cheerio":"0.22.0","@sentry/replay":"0.6.14"}}')},function(t,e,n){"use strict";var i=n(53).a,r=n(1),s=n.n(r),a=n(83),o={insert:"head",singleton:!1},l=(s()(a.a,o),a.a.locals,n(328)),c=n(0),u=n.n(c);function h(){return(h=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}class d extends u.a.Component{render(){const{children:t,focused:e,focusKey:n,parentFocusKey:r,preferredChildFocusKey:s,forgetLastFocusedChild:a,trackChildren:o,autoRestoreFocus:l,blockNavigationOut:c,hasFocusedChild:d,focusable:f,onEnterPress:_,onEnterRelease:p,onBackPress:m,onArrowPress:v,onBecameFocused:g,onBecameBlurred:A,realFocusKey:b,setFocus:y,navigateByDirection:w,stealFocus:E,onUpdateFocus:k,onUpdateHasFocusedChild:C,...x}=this.props;return u.a.createElement(i,h({className:"action-button T05_ALT"},x),t)}}var f=Object(l.a)()(d);e.a=f},function(t,e,n){"use strict";n.d(e,"a",(function(){return i}));const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__},function(t,e,n){"use strict";var i=n(7),r=n(0),s=n.n(r);function a(){return(a=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t}).apply(null,arguments)}function o(t,e,n){return(e=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}class l extends s.a.Component{constructor(t){super(t),o(this,"mounted",!1),o(this,"state",{loaded:!1}),o(this,"onLoad",()=>{this.mounted&&this.setState({loaded:!0})}),this.state={loaded:!1}}componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}render(){return s.a.createElement(s.a.Fragment,null,!this.state.loaded&&s.a.createElement(i.a,a({crossOrigin:"anonymous"},this.props,{src:"data:image/jpeg;base64,/9j/4AAQSkZJRgABAgEASABIAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/2wBDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQH/wAARCACQALgDAREAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD+O4tkcn0/z79ev/161Mg3dv8AD64/rjp3oAC3b3+n6e/8+negAB/z/Prn/DgUAG736cflyP5Z/CgA3Hpn/wDWOf65/WgYBvQ+n6H+eR396BBuzjnn6/55Geo+vU5oANxznPIoANx9cf8A18/j3Iz160AG73H8vftjsPy+goAM/wCfzx/9b/8AXQAu7/Pv0z9ff3+mABM/5/8Arfl9KAFLHue3+eP89u4FACbj69P0HP5D/PWgAzznJ57/AP16ADd/n36c9s9j6980ALuOePXOP8849B0oATJ9enT24oACxHOfT/Ae3f8AzzQAbvU/rj6D/wCsPwoAMn8+vv8AX/HrQBX3fTpj19c9Tx0IP/1qBgW9+vX3/wA/yoEG70PX16/rz2/HFAxSx554znr+X5f0oEJn8x+f/wCr6UDDceuen/6v6UCDd/8AX/n29eD6/SgYbvc/X8uc+nA60ALuPr0/z/kdKADcT39vw/r7fn1OaAE3HjnpjH8vzoEG737d+Tzx9aBiZ/l9OPfpwP8APagQu7pz7cH05oGLvP8AnOfXHXI46j6d6AE3die2Ov4/p/n1oAN2O/4E/U+vPP8AKgA3YPXB6/59aADcfX8vp7e39fegA3c8n9cHP/6qADd1Pr1/qP06fhQIN2e/t/n/AD9epyALuP8An/PrzmgZW3H1/wA//qoAM5/Hn/Pbv9fSgQm739Md/Tt/n8qBjtx/yAP88UtNQ/r+rCZ9/wDPt+fb29qYBu9/19un0PUj0HXvQAbj1z/nP9O/4+9AC7++eOvtx69Py9e1ABuOMf5GPf8AxoA77RfCayxR3Wps+JAHS0RihCHlfPcfMCw5MabWUYDODuRQR2cGm6fagCCzt48dGESmT8ZGBkY+7MTQBbeNJBtdEdem11DD06EEUAYd74a0m8BP2cW0hHElriLBznmMAwtz1zHk88gnNAzgdX8O3ulAzA/arQHHnxgq0YPQTR/N5YyMB1LR5xllZlWgDnN3p/nj3/DP4UAG7/OPxxj36460CDd05/Dt6/rj8aBhu568/wCf8KAF3f5P6f047mj+tgE3f5+vr6/4HnjFABuzznOefr/nOPb8BQAZz/n/ABoAN3/1vz7fyx+lAEG4+v8An+nXHHFABuP6f4/55oATcfX/AD0/rQAbsd+n+fx6fjjHajQA3f4+3H+f50AG7oO/Pr/kUABP+fr/AJHWgBdx9f8APOP5/nR/X9fcB23hDRUvZH1G6USQ28gjgiYZWScBXLsDwViBTavIZ25xsIYC56jQIKACgAoAayq6srAMrAqysAQykYIIPBBBwQeCKAPFvEWmjStSlhjVhbSbZ7XIJAR/vRhj18qQMnUnYEZjk0DMLdjvyfb0oAXcev8A9b/Pt+fWgPxE3H1/z/j/AJ70AGeB+Yo/UA3Z6H8v88ZoAXcRzn/PvQAm/wBwPp/P/wCv29uy0D+v6/r8w3Ed/wDPvTD+u5X3Y+n/AOruMfh2pf1/XyAXd/n3/Xrjkd6P6/r+rgJu9/1P1ph8g3H1/L/Ofr/9agA3e/6/57/rQGobvfHX8c+/f8aA8hd/8vT0/wDrnjt+FL+v6/rzATPX9aYX/r+r9z3Tw7YjT9ItIiMSSxi5n9fNnAcqR28tNkX/AADPJJJANygQUAFABQAUAYmv6UmradLDj/SI1aW1fHzLMqnCZ/uTAeW46chsbkXAB4USfp/Tn9KWgw3ev+f8/n+Zo0D+vv8A6/rcXcfX/J7f/q/wo0ATd/L9O3+fr2p6AG457/y//V/jR/WoBn/D/wDXil/Xp94XDd7++c/5/wAj0p6BqLuPqaWgFfd3z/n8aNAE3H3/AM9x/j6e1GnoH+Qu4nP5/wA+9MA3c+4+v8/z6YpAJuPr/np+f8u1GgBuz6f/AK/85/8ArUABbn/P+effr0o/HUCxap591bQnpNPDEevSSRUPA5PXH8u1H9f1+If1/X9aH0eBjgcAcADtTELQAUAFABQAUANYkKxUbmCkhem4gcDPueKAPmtpCzMzYyxLEehJJ4HUAc4FLqNDd34c8+v09Pw6Uaf1/X4gG739vT/Pb/OKNA/r5i7un9P8+5+maNg+QmfwpgG4+v8An29/15paB/X9f8EXceuaNAE3H1P+f8/pRoBBuPr7f57/AOfSjQBN34n/AD9D059fSjQP6/q39feG7tx/nPH8/wAelGgBu/z+n8/1o/r9WHqG7/J/+v8AT8KNP60DUN3H+foP8/1oHcXdx1/z/X/OKNBE9pP9nurWYn5YbiGU/SORG+vReMfhQB9LgggEHIPII5BB6EGmIWgAoAKACgAoAQkAEk4ABJJ6ADkk/SgD5kmkV5ZXUbVeR3VfRWbIGBwMAjpSK16f1/WozcfX/Pr9ffrRp/X9fkINx/z/AJ/KjQLibs9+v+f6fpQFxd3+f8/Sj+vmO/8AX9f1+IFj74+uf89aP67CDefX8/8AP8/ejToAm73/AM9KBkG7/OP8/wD1+/agP63/AK/rQTefX6f5/wA/kaNNf6/r+uwg3H1/yf8AGj+vu/r/ADC/9foKW/z/AJ6f0/KjTT+v6/q4f1/Wv/BDd/k+/b6f59KNBhux6fTtRp/XmFw3Z/P/AD+P+PFH/B/r+vzDb+v6/wCHOk8KaXBrOrpaXQdrdYJ55VjfYxCKqL8w5A8yVOnJ6dM0aC6HvdrCba3gt97SeREkKyN990jUIjPjgyFAN7AAM+5gqghQxFigAoAKACgAoAr3UH2m2nt/MaITxPC0iAF0SRSjlM8B9pOxiGCthirAbSAeB+KtKh0bV5LS23i3aGGeISNvcLIpRwWwNw82OTBPIBxzjNIdzm93T/P+evejQf8AX9f1+Iu70/z/APX4oD+v6+8TP+f89KP6/wCHF/X/AAwbv0/n2/8Arf8A6qNB3At15o0F8v6/4cXf2z/k/wCTiiw/kG78P5f5H0o6Bf8Ar7itmjQLilv/AK/+etH9ff8AMX9eX9f8AN35f/r74o03H/X9bibv8f8AP1/X8KNA/rzDd6/55o0/r+vmAbv8/rRoFw3flz/hRp/X9f16hc9E+GpB1q7B+9/Zc2Pcfa7Mt+u3rz1x3o6iPbKYgoAKACgAoAKACgDxH4kkDXLXHB/sqAn/AMC73H48c57AUmNHnu7tn8v8/n/jRoP+v6/r/gGfejQLi7j60aB/X9fqJu9Sfzo0C/l+P/AF3Hv09/8AP+frRp/wwX8ugm7v+f8An/PPvRp/X5Brp/W4u71/z/npQBW3++KAf9fl/X9MXcfyoC/9f1YN/P8An/P/AOr2oDtp/X9dbBu/n/8Ar/lRp/Xb+tg+Qbvx/wA/jRoF/L9P63DcfX/J/pRp/X9bgG7/AD/n1o03C52XgK9S18SWiu2xbyKe0yem+RPMiUn/AG5YY0A/vsKEwZ9C0yQoAKACgAoAKACgD558eXyXfiS7VGDLZpDZgggjfEu+Zep5SeSRGHGGUgj1Xf8Ar+upS06f8McduP8ASloH9f18hC3v/n/P609A/r+t+n9MUPjv/WjT+v6/rQPUN35/5z1o0+QCbv8AP50aBf8Ar+v+GF3H/P8An3o0C4bv8/59qPw/rQCvu7f4/l19T/Klp/X9f8AP6/r+thN2Oh/SndB/Wwu73/X/AD9KV0H9f1/XmJu/z/n/ADij/MLsXd/nt6Yx+lAX8v6/rqG7/P8An0/SjT+v60C4Bv8AP/16en/AC4qyMjK6MUdSGVlbayspDBlYYIYEAhhggjINHYL+R6n4O8Zavd61Z6dql8Z7W4SWGPfDbq3niMvCXmSJZXLFDGNznc8i7snBBcT8j2umIKACgAoAKAPFfGHjTV7PWb3TtLvfItrdYoHKwwO/nmMNPslkiaRCrP5eVIKvGWQjOaLjPK2kZ2Z3dmd2LM7MWZmbkszE5ZmJyWJJJOSc0h/10G7v8e1Gn9f1/wAEL+X9eX9ai7v85+vv/n6ZpBcTd7/j/jj2p6Bf/gff26i7v8+/r+n09qWn9f1YNf6/rzDd+HP+f8+9GgXDd/L/AD7UBt0/4cTf74H+e/6UAV93v/n+VGgf15hu/n/9Y/nRdB/X3f5i7vf/AD/n/PoaBf8Ar+v68uxux+v/ANf8KNAv/X9f8OG7/H8aNPwC/wDX9XDf0/z/APX/AF+tAeQbu3v/AJ5o0C/+Wv8AX+YbuO9A7/f/AF/X5m/4Vfb4k0Q5xnUrRf8AvqUJjnPXOB/k00J/1/XmfVFMkKACgAoAKAPlXxRIW8R652xql6vXP3J3X+gI9BxzS0/r7ijC3e9LQL7Buxij+v68wv27Cbvfp/8Aro+QC7vwo0C/kG40f1/X9feFw3elH9f1/XULhu/+t0oC/r/XcN3H+fT/AD/WjT+v1C/3/wBP8yvu/wA8f5/z9KLhcN2OPz/H9KNAuG7vn8fr/n/PWjQP6/r+vIN3+fxouh6Bv9/8/wA/89aBBu/z/n6//Wo0DTsG7/PPaj7h3/r+ugbvU9ef84oF9/8Al5HQeFBv8S6EOf8AkKWbdR/BMr9+3y8jqRwOaYX8j6vpkhQAUAFABQB8neKsr4k11WHP9q3zfg9w7r+akEfXip6lf1/X6mDu/XrRoF9tv8g3etGnYExN2P8AP0ov/X9f5hf+v6Qu7/P9KNAv5XE3fh/+rn/PSj+v6/r5hf8Ary/ryFDf596P66h/X9f8OG7/AD+nb0/xo0/r+uof1/X6ib+/9OvH+f50B/X9P1/4cg3f0/z/ACoVgv5Cbz7/AP1v8/56UB8hd3v+v+fw6UB8vw/roJu6fT1/z60f1/X9dB/IN3f9f8P/AK1H9f0gF3e9HUX9f1cN/v8A5x0o0/UPl5irudgigszEKqqNzMxOAoUZJJPAA5J4FAX/AK/zPZfB/wAPdbsdU0zWNRa0tobdzcNaeZJJebjC4jRkWLyEId1L/vyyAMNu4Yqgb/r5nuNBIUAFABQAUAeGeL/h7rl5qmp6vp5tLmC4c3K2qyOl5u8tfMRY3iELsXU7Ns+58gbQxxSKTPGySpKkFWBIKkEEEcEEcEEdCCMjvSuguG7n/P8An/PWi4XDd7/T/P8An+lAw3//AFv/AK30/wAaBBu/Pp/WjQd/IN+e/wDn/Io/r+v68g+Qbv8AP5Yo0F+AbvX/AD3o0D+tivu9D7/5/LjtQP8Ay6/1uG76/j/n3oC6Ddnv/n/P/wCv1AE3f59qLiuG7/PH+fSgdySJJJpEigjkmlkYIkUaNJJIx6KqIC7MT/CASaAuekaH8MNe1MJNqGzR7ViCRcAyXroepW0Ujyzxgi5lgcHBEbCnYVz2HRPAfh3Q2imitWvLyIhlvL5hPIrjBDRRAJbRFGGY3SHzV4JlYgGnYR2dAgoAKACgAoAKACgDidc8AeHdcaSd7d7G9lJZ7uxYRNI5YszSwsHt5WdiTI5iEz55lFFh3PH9c+GPiDTN0tgE1m2GebVSl4qgZy9o7EsT0AtpbhieqqDSsO55xIJInaOZHjkjYo8cisjo6nBVkYBlYHgggEHORUh8hu7+f+e/5U9B6Bv/AM/5557/AI0v6/roL+v66BuPt9P1/P8AWmP+vl/XQN3+fTvQIN3v2xQPQr7v/wBX+fpRcLhu9evHv6/WgP6/r/hxN34/5/z0oC/9f1/w5e0/T9Q1WcW2m2dxeznkpbxNIVH96QgbY055eQqg7sM0fIL/ANf1/X6euaD8Iruby5/EF4trEQGaxsystyf9iW5Ia3hPXPki54OA6nkOwrnsWj+G9F0GIR6ZYQwNjDXBXzLuTPXzLmTdMQeuwMI1yQiKOKYjcoEFABQAUAFABQAUAFABQAUAFAGBrXhnRPEEZTU7GKWTbtS6QeVeRY+75dymJNqnny3Lwk/fjYcUDvY8c174R39v5k+gXa30Iyy2V2VhvFA6JHPhbadveQWnHHzHqrdh3PJr6wvtLuGtdQtLizuF5MVxE8bEdAy7gA6H+F0LI3VWIpev9f1/THdf1/X9eRS3f45/z/k0Bfy/r/gChv8AP4H/ABzRcPz/AK/rUN359/50XC+xX3e/+f0pBdCbvf05/wA9v8igD1zwN8N5dbji1bW/MttKfElrbITHc365BEjNjMFm4+66kTTqd0JjjKTPSXcTf9bn0Np+m2GlW62unWcFnboABHBGqAkcbnYfNI56tJIzOxJLMSSaYi9QIKACgAoAKACgAoAKACgAoAKACgAoAKACgChqGmafqtu1rqVnb3tuwP7ueNX2kjG+Nj88UgH3ZImSRTyrAjNAHzt46+HM2gpJqujmW60kZa4hfL3GnA8b2Ycz2vYykeZCP9duXM1S12KTPKN3+f8APP8An3oGJu9/8/596Xy/r8A/r+kQbvf/ADxRcNP6X6HoPw58KjxPrYe6TdpWmCO6vRj5bh2Y/ZrI9eLhkdpeObeGZAyO6MGtfkDZ9aKqoqoiqiIoVEUBVVVGFVVGAqqAAAAAAMCqIHUAFABQAUAFABQAUAFABQAUAFABQAUAFABQAUAFADWVXVkdVdHUq6MAysrDDKynIZWBIIIIIODxQB8k/ETwuPDGuH7MpGmakr3ViAPlhw/+kWYPf7O7IU/6YSwhizbyZenoUn/XyOA3/j3/AM/5/KkPRAD/2Q==",alt:"Player Headshot Loading"})),s.a.createElement(i.a,a({crossOrigin:"anonymous",onLoad:this.onLoad,alt:"Athlete Thumbnail",style:{...this.props.style||{},display:this.state.loaded?"block":"none"}},this.props)))}}var c=l;e.a=c},function(t,e,n){"use strict";n.d(e,"a",(function(){return r})),n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s}));var i=n(4);class r{constructor(t,e,n){this.name=t,this.instanceFactory=e,this.type=n,this.multipleInstances=!1,this.serviceProps={},this.instantiationMode="LAZY",this.onInstanceCreated=null}setInstantiationMode(t){return this.instantiationMode=t,this}setMultipleInstances(t){return this.multipleInstances=t,this}setServiceProps(t){return this.serviceProps=t,this}setInstanceCreatedCallback(t){return this.onInstanceCreated=t,this}}
283
283
  /**
284
284
  * @license
285
285
  * Copyright 2019 Google LLC