PageSourceSearch

https://www.sparta.no/assets/EmbeddedStandingsSection-Bo8ZotwU.js

js sparta.no collected 2026-09-25 08:48:37 UTC 2,426 bytes, 1 lines download raw bytes

1import{ab as E,g as T,c7 as P,w as $,j as _,d_ as A,r as k,z as U,B as b,C as S,I as B,d$ as j,Y as R}from"./index-CDP80RXc.js";import{T as x}from"./TableStandings-2INHjDU_.js";import{E as z}from"./EmbeddedSectionEmpty-B1r2gOdn.js";import{u as G,a as H}from"./ArticleHtmlRenderer-CdDCNHI5.js";import"./TeamNameIcon-DGyFUPvy.js";import"./legacy-style-scoping-DLBkiVNm.js";import"./useListAdSlots-Snf4t29a.js";function h(e){if(e==null||typeof e!="object"||Array.isArray(e))return!1;try{const{tableStandingsData:r}=A(e);return!!(r!=null&&r.length)}catch{return!1}}function I(e){if(Array.isArray(e)){const t=e.filter(s=>typeof s=="string").map(s=>s.trim()).filter(Boolean);return t.length>0?t:null}if(typeof e!="string"||!e.trim())return null;try{const t=JSON.parse(e);if(Array.isArray(t)&&t.every(s=>typeof s=="string")){const s=t.map(a=>a.trim()).filter(Boolean);return s.length>0?s:null}}catch{}const r=e.split(",").map(t=>t.trim()).filter(Boolean);return r.length>0?r:null}const J=E({name:"EmbeddedStandingsSection",components:{TableStandings:x,EmbeddedSectionEmpty:z},setup(){const e=T(),r=P(),{sectionConfig:t,mode:s}=G(),{resolvedPayload:a}=H(),l=k(null);let c=0;const y=_(()=>{const n=a.value;return h(n)?n:l.value??n});return $([a,()=>{var n;return(n=t.value)==null?void 0:n.ssgtUuid}],async([n,u])=>{const d=++c;if(l.value=null,h(n)||s.value==="static")return;const o=typeof u=="string"?u.trim():"";if(o)try{const f=await r.getLiveTeamStandings(o);if(d!==c)return;l.value=h(f)?f:null}catch{d===c&&(l.value=null)}},{immediate:!0}),{standingsBind:_(()=>{var u,d;const n=y.value;if(n==null||typeof n!="object"||Array.isArray(n))return null;try{const{tableStandingsData:o,provider:f,dataColumn:m}=A(n);if(!(o!=null&&o.length))return null;const v=typeof((u=t.value)==null?void 0:u.highlightTeamUuid)=="string"?t.value.highlightTeamUuid.trim():"";let i=m??null;const g=I((d=t.value)==null?void 0:d.selectedStandingsColumns);return g&&(m!=null&&m.length)?i=g.map(p=>m.find(C=>C.name===p)).filter(p=>p!=null):g&&(i=g.map(p=>({name:p,highlighted:!1}))),{tableStandings:o,statsProvider:f??"",currentRoute:e,...v?{highlightTeamUuid:v}:{},...i!=null&&i.length?{dynamicColumns:i}:{}}}catch{return null}})}}});function L(e,r,t,s,a,l){const c=b("table-standings"),y=b("embedded-section-empty");return e.standingsBind?(S(),B(c,j(R({key:0},e.standingsBind)),null,16)):(S(),B(y,{key:1}))}const Q=U(J,[["render",L]]);export{Q as default};

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.