PageSourceSearch

https://gocreighton.com/_nuxt/r-RNHsoD2.js

js gocreighton.com collected 2026-10-02 03:38:18 UTC 6,802 bytes, 1 lines download raw bytes

1import{a as e}from"./DH_oPWig.js";import{dt as t,nt as n,qt as r,w as i,wt as a,zt as o}from"./BaBhFZm2.js";import{n as s}from"./CU89Zi3L.js";import{t as c}from"./oQPVSlJP.js";import{nt as l}from"./DGJ9b2SS.js";import{Ft as u,L as d,Pt as f,a as p,it as m,n as h,t as g}from"./B_M9pfkk.js";import{i as _,r as v}from"./DpVdTrDr2.js";import{t as y}from"./Cx96G32M2.js";var b=e=>{let t=`props`in e?e.props:e;return{sportId:`sport_id`in t?t.sport_id==`0`?void 0:t.sport_id:`sportId`in t?t.sportId:void 0,locationIndicator:`extra`in t&&t.extra?.location_indicator?t.extra.location_indicator:`locationIndicator`in t?t.locationIndicator:void 0,gameId:`extra`in t&&t.extra?.game_id?t.extra.game_id:`gameId`in t?t.gameId:void 0,spotLight:`extra`in t&&t.extra?.spotlight?t.extra.spotlight:`spotLight`in t?t.spotLight:void 0,streamingProvider:`extra`in t&&t.extra?.streaming_provider?t.extra.streaming_provider:`streamingProvider`in t?t.streamingProvider:void 0,ticketedOnly:`ticketedOnly`in t?t.ticketedOnly:void 0,withCoverageOnly:`withCoverageOnly`in t?t.withCoverageOnly:void 0,groupedByDates:`groupedByDates`in t?t.groupedByDates:void 0,startDate:`startDate`in t?t.startDate:void 0,endDate:`endDate`in t?t.endDate:void 0,pageIndex:`pageIndex`in t?t.pageIndex:void 0,pageSize:`pageSize`in t?t.pageSize:void 0}},x=class{fetch;resource=`/api/v2.1/EventsResults/upcoming`;constructor({fetch:e}){this.fetch=e}async get(e){let t=b(e),n=`props`in e&&`start`in e.props?e.props.start:void 0,r=`props`in e&&`count`in e.props?e.props.count:void 0,i;return(n||r)&&(i=new g(n,r),t.pageIndex=i.pageIndex,t.pageSize=i.pageSize),this.fetch(this.resource,{params:t}).then(e=>{if(!e)return[];let t=e.items?.map(e=>f(e));return i?i.getData(t):t}).catch(e=>(console.error(`[EventRepo] get() Request error caught`,e),[]))}},S=class{fetch;resource=`/api/v2/LiveStats`;constructor({fetch:e}){this.fetch=e}async getLiveStats(){return this.fetch(this.resource,{timeout:5e3}).then(e=>d(e?.Games??[])).catch(e=>(console.error(`[LiveStatsRepo] getLiveStats() Request error failed`,e),null))}async getGameLiveStats(e){return this.fetch(`${this.resource}/details`,{params:{gameId:e},timeout:5e3}).then(e=>e).catch(e=>(console.error(`[LiveStatsRepo] getGameLiveStats() Request error failed`,e),null))}},C=s(`live-stats`,{state:()=>({liveStats:null,detailedLiveStats:{},isLoading:!1}),actions:{async fetchLiveStats({fetch:e}){if(!this?.liveStats){let t=await new S({fetch:e}).getLiveStats();this.liveStats=t}},async fetchDetailedLiveStats({gameId:e,fetch:t}){let n=l(`gameId_${e}`);if(!(n in this.detailedLiveStats)){let r=await new S({fetch:t}).getGameLiveStats(e);this.detailedLiveStats[n]=r}}},getters:{getLiveStats(e){return e.liveStats},getLoadingFlag(e){return e.isLoading},statsAvailable(e){return!!(e.liveStats&&Object.keys(e.liveStats)?.length)},getLiveStatsByGameId:e=>t=>{if(e.liveStats&&t in e.liveStats&&e.liveStats[t]&&e.liveStats[t]?.HasStarted&&!e.liveStats[t]?.IsComplete)return e.liveStats[t]},getDetailedLiveStatsByGameId:e=>t=>{let n=l(`gameId_${t}`);return n in e.detailedLiveStats?e.detailedLiveStats[n]:null}}}),w=s(`event`,{state:()=>({events:{},isLoading:{},isLoadingMore:{},moreToLoad:{}}),actions:{async fetchEvents(e){let{fetch:t,...n}=e;if(!(e.hash in this.events)){this.isLoading[e.hash]=!0;let r=await new x({fetch:t}).get(n);this.events[e.hash]=r,this.isLoading[e.hash]=!1}this.fetchGameCenterLiveGames({payload:n,fetch:t})},async fetchMoreEvents(e){let{fetch:t,...n}=e;this.isLoadingMore[e.hash]=!0;let r=await new x({fetch:t}).get(n),{props:i}=e;(!r||!r.length||r.length&&i.count&&r.length<i.count)&&(this.moreToLoad[e.hash]=!1),e.hash in this.events&&(this.events[e.hash]=[...this.events[e.hash]??[],...r]),this.isLoadingMore[e.hash]=!1},async fetchEventsLiveStats(e){let t=this.getEvents(e.hash);if(!t||!t?.length)return;let n=C();if(n.statsAvailable||await n.fetchLiveStats({fetch:e.fetch}),n.statsAvailable)for(let r of t){let t=n.getLiveStatsByGameId(r.id??0);if(!t||!Object.keys(t)?.length)continue;let i=null;e?.props?.extra&&Object?.keys(e.props.extra)?.length&&`detailedLiveStats`in e.props.extra&&e.props.extra.detailedLiveStats&&(await n.fetchDetailedLiveStats({gameId:r.id??0,fetch:e.fetch}),i=n.getDetailedLiveStatsByGameId(r.id??0));let a=this.events[e.hash]?.findIndex(e=>e&&e.id===r.id);if(a!==void 0&&a>-1){let n=this.events[e.hash]?.[a],r=m(t,n?.location_indicator);
1i&&(r=p(r,i)),this.events?.[e.hash]&&this.events[e.hash]?.length&&this.events?.[e.hash]?.[a]&&(this.events[e.hash][a]={...n,is_live:!0,livestats:r})}}},async fetchGameCenterLiveGames({payload:e,fetch:t}){let n=this.getEvents(e.hash);if(!n||!n?.length)return;let r=y();if(r.liveGamesAvailable||await r.fetchLiveGames({fetch:t}),r.liveGamesAvailable)for(let t of n){let n=r.getLiveGameById(t.id??0);if(!n||!Object.keys(n)?.length)continue;let i=this.events[e.hash]?.findIndex(e=>e&&e.id===t.id);if(i!==void 0&&i>-1){let t=this.events[e.hash]?.[i];this.events?.[e.hash]&&this.events[e.hash]?.length&&this.events?.[e.hash]?.[i]&&t&&(n.game_state===h.Live||t.game_state!==n.game_state)&&(this.events[e.hash][i]={...t,is_live:n.game_state===h.Live,livestats:n.game_state===h.Live?u(n):null})}}}},getters:{getEvents:e=>t=>t in e.events?e.events[t]:[],getLoadingMoreFlag:e=>t=>t in e.isLoadingMore?e.isLoadingMore[t]??!1:!1,getLoadingFlag:e=>t=>t in e.isLoading?e.isLoading[t]??!1:!1,getMoreToLoad:e=>t=>t in e.moreToLoad?e.moreToLoad[t]??!0:!0}}),T=(e,t,r,s)=>{let l=c(),u={abbreviation:`All`,facebook:null,gender:null,global_sport_id:null,global_sport_shortname:null,global_sport_name_slug:null,id:0,instagram:null,non_sport:!1,pinterest:null,short_title:`All`,shortname:`all`,tickets:null,title:e.defaultSportTitle||`Choose Sport`,twitter:null,url:null,youtube:null},d=o(Object.assign({},u)),f=i(()=>{let e=l.getRealSports;return e&&e.length?[Object.assign({},u),...e]:[]}),p=e=>{if(d.value&&e&&e.target){let n=Number.parseInt(e.target.value);m(n),t.value=n,r(s)}},m=e=>{let t=f.value.find(t=>t.id==e);t?d.value=Object.assign({},t):d.value=Object.assign({},f.value[0])};return n(async()=>{e.sportId&&m(e.sportId),a(()=>e.sportId,m)}),{sports:f,selectedSport:d,updateSport:p}},E={__name:`EventsComponent`,props:{...v},setup(a){let o=w(),s=a,{$customFetch:c}=e(),{initialize:l,loadMore:u,getComponentData:d,currentSportId:f,config:p,hash:m}=_({props:s,fetch:c}),{sports:h,selectedSport:g,updateSport:v}=T(s,f,d,o.fetchEvents),y=i(()=>o.getEvents(m())),b=i(()=>o.getMoreToLoad(m())),x=i(()=>o.getLoadingMoreFlag(m())),S=i(()=>o.getLoadingFlag(m()));return n(async()=>{await d(o.fetchEvents),l(o.fetchMoreEvents)}),(e,n)=>t(e.$slots,`content`,{data:r(y),config:r(p),loadMore:r(u),moreToLoad:r(b),isLoadingMore:r(x),isLoading:r(S),currentSportId:r(f),sports:r(h),selectedSport:r(g),updateSport:r(v)})}};export{T as n,w as r,E as t};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.