1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SearchResultItem-DOBGOv4U.js","assets/index-D-81gIvX.js","assets/index-DRMVa6F2.css","assets/SdpTextField-lmW-3umB.js","assets/SdpCheckBox-gwQ50P2R.js","assets/SdpCheckBox-CI4av3wx.css","assets/SdpTextField-Bvg1UDRB.css","assets/SdpDropdown-Cn8ao709.js","assets/SdpDropdown-BCq3GSJ_.css","assets/index-B-kVIXC8.js","assets/index-DXE9qYuN.css","assets/SdpPagination-BB_XvtFw.js","assets/SdpPagination-BoOUAV9T.css","assets/useListAdSlots-Bgts2JoK.js","assets/useScrollFloor-BU3ahEWv.js","assets/list-item-key.helpers-DLOog-cV.js","assets/SearchResultItem-BS0C1d_6.css"])))=>i.map(i=>d[i]); 2import{ab as ce,D as c,H as Z,G as I,C as l,E as i,F as n,z as J,Z as p,$ as V,P as de,Q as ue,a1 as pe,S as me,ac as he,f as _e,U as ye,a6 as ge,b as fe,ae as ve,w as G,bb as _,ax as Se,a$ as ke,s as be,_ as Ee,W as H,j as S,r as T,a5 as Te,I as W,J as A,ag as Pe,a9 as Ce,K as we,O as Ae,N as P,aa as Le,B as u}from"./index-D-81gIvX.js";import{S as Re}from"./SdpTextField-lmW-3umB.js";import{S as Ie}from"./SdpDropdown-Cn8ao709.js";import L from"./index-B-kVIXC8.js";import{S as Ye}from"./SdpPagination-BB_XvtFw.js";import{u as xe}from"./useListAdSlots-Bgts2JoK.js";import{u as Oe}from"./useScrollFloor-BU3ahEWv.js";import{g as Ke}from"./list-item-key.helpers-DLOog-cV.js";const Ne={class:"result-loader"},Ue={class:"img-loader"},qe={class:"loader-detail"},De=ce({__name:"SearchResultLoader",setup(t){return(s,o)=>(l(),c(I,null,Z(4,e=>i("div",{key:e,class:"result-loader-container"},[i("div",Ne,[i("div",Ue,[n(L,{type:"square",width:"100%",height:108,rounded:!0,animation:"wave",class:"pt-0"})]),i("div",qe,[n(L,{type:"square",width:100,height:30,rounded:!0,animation:"wave",class:"pt-1"}),n(L,{type:"square",width:e*50,height:30,rounded:!0,animation:"wave",class:"pt-1"},null,8,["width"]),n(L,{type:"square",width:"auto",height:30,rounded:!0,animation:"wave",class:"pt-1"}),n(L,{type:"square",width:120,height:20,rounded:!0,animation:"wave",class:"pt-1"})])])])),64))}}),Qe=J(De,[["__scopeId","data-v-34bdb805"]]),Ve=(t,s,o)=>t.indexOf("|")>=0?t:[s,o,t].join("|"),B=15,Y=["article","video","page"],Be=[p.QUERY,p.TYPES,p.PAGE],je=t=>{if(!t)return 1;const s=Number.parseInt(t,10);return!Number.isSafeInteger(s)||s<1?1:s},ze=t=>(t==null?void 0:t.trim())||void 0,Me=t=>{if(!t)return[];const s=new Set(t.split(",").map(o=>o.trim().toLowerCase()).filter(Boolean));return Y.filter(o=>s.has(o))},Fe=t=>({q:ze(V(t[p.QUERY])),types:Me(V(t[p.TYPES])),page:je(V(t[p.PAGE]))}),Ge=t=>({[p.QUERY]:t.q||void 0,[p.TYPES]:t.types.length?t.types.join(","):void 0,[p.PAGE]:t.page<=1?void 0:String(t.page)}),He=t=>t.join(","),We=t=>{if(!Array.isArray(t))return[];const s=new Set(t.map(e=>String(e==null?void 0:e.value))),o=Y.filter(e=>s.has(e));return o.length===Y.length?[]:o},X=t=>Math.ceil((Number(t)||0)/B),Ze=(t,s,o)=>{if(o!=="eq")return null;const e=Math.max(1,Math.min(t,X(s)||1));return e===t?null:e},Je={name:"SearchResultPage",components:{SyButton:me,SdpStreamlineIcon:pe,SearchResultLoader:Qe,SdpTextField:Re,SdpDropDown:Ie,SearchResultItem:be(()=>Ee(()=>import("./SearchResultItem-DOBGOv4U.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16]))),SdpPagination:Ye,SyHeading:ue,DynamicAd:de},setup(){var z;const t=he(H.SEARCH_TOP),s=xe(H.SEARCH_LIST),o=_e(),e=ye({mobile:980}).smaller("mobile"),j=ge(),m=Te(),y=T([]),g=T(!0),h=T(0),f=T(""),{t:x}=fe(),O=(z=o.instanceId)==null?void 0:z.split("_"),K="width: 140px",{floorStyle:N,isRestoringScroll:U,release:k}=Oe(),b=T(""),d=T([]);let v=0;const R=async(a,Q)=>{const C=++v;if(typeof window<"u"&&!U.value&&!Q.isRestoring&&Q.reason!=="init"&&window.scrollTo({top:0}),!a.q){y.value=[],h.value=0,f.value="",g.value=!1,k();return}g.value=!0;try{const w=await j.getSearchResults(a.q,a.page-1,B,He(a.types));if(C!==v)return;const M=w.results??[];M.forEach(ie=>{ie.isErrorImage=!1}),y.value=M,h.value=w.totalCount??0,f.value=w.relation??"",g.value=!1,k();const F=Ze(a.page,h.value,f.value);F!==null&&E({page:F},"replace")}catch(w){if(C!==v)return;y.value=[],h.value=0,f.value="",g.value=!1,k(),console.error(w)}},{state:r,commit:E}=ve({keys:Be,parse:Fe,serialize:Ge,onChange:R}),q=S(()=>r.value.page),$=S(()=>X(h.value)),D=S(()=>Y.map(a=>({name:x(`search.types.${a}`),value:a}))),ee=S(()=>r.value.types.length?D.value.filter(a=>r.value.types.includes(a.value)):D.value),te=S(()=>r.value.types.join(",")||"all");G(()=>r.value.q,a=>{b.value=a??""},{immediate:!0}),G(()=>r.value.types.join(","),()=>{d.value=[...r.value.types]},{immediate:!0});const ae=a=>{switch(a.type){case _.TYPE.ARTICLE:m.push({name:"SingleView",params:{id:a.identifier}});break;case _.TYPE.PAGE:if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/.test(a.identifier))m.push({name:"Layout",params:{id:a.identifier}});else{const{path:C}=a.extras??{};C&&m.push(C)}break;case _.TYPE.PLAYER:m.push(`/athlete-profile/${a.identifier}`);break;case _.TYPE.TEAM:m.push({path:`/team/${a.identifier}/${a.instanceId}/overview`});break;case _.TYPE.GAME:m.push({name:"GameCenter",params:{id:a.identifier}});break;case _.TYPE.VIDEO:m.push({name:"SingleVideo",params:{mediaString:Ve(a.identifier,_.TYPE.VIDEO,"staylive"),tags:`custom.${r.value.q??""}`}});break}},se=()=>{const a=b.value.trim();a&&E({q:a,types:[...d.value],page:1},"push",!0)},oe=a=>{d.value=We(a)},ne=a=>{E({page:a},"push")},re=S(()=>o.getSiteConfig.searchResultsImage),le=S(()=>(r.value.page-1)*B);return{results:y,capitalizeName:ke,isMobile:e,isLoading:g,pageOffset:le,placeholderImage:re,navigateToSearchResult:ae,draftQ:b,facetKey:te,filterTypeList:D,selectedTypeOptions:ee,totalCount:h,relation:f,currentPage:q,totalPages:$,floorStyle:N,onPageChange:ne,updateTypesFilter:oe,dropdownCustomStyle:K,onSearchButtonClick:se,dateFormatFull:Se,splitName:O,SEARCH_RESULT:_,searchTopSlot:t,searchListSlot:s,getStableListItemKey:Ke}}},Xe={class:"result-overview container"},$e={class:"search-input-container"},et={class:"w-full flex items-center"},tt={class:"text-grey-xDark block"},at={key:0,class:"no-result-found"},st={class:"no-search-result-txt"},ot={class:"mt-1"},nt={key:1,class:"search-container"},rt={key:2,class:"search-container"},lt={key:0,class:"block text-grey-xDark mb-3 text-sm"},it={key:1,class:"block text-grey-xDark mb-3 text-sm"},ct={key:0,class:"py-4 flex justify-start"};function dt(t,s,o,e,j,m){var k,b;const y=u("dynamic-ad"),g=u("sdp-text-field"),h=u("sy-button"),f=u("sdp-drop-down"),x=u("sdp-streamline-icon"),O=u("search-result-loader"),K=u("sy-heading"),N=u("search-result-item"),U=u("sdp-pagination");return l(),c(I,null,[e.searchTopSlot.isEnabled?(l(),W(y,{key:0,"custom-class":"mt-4","desktop-placement-key":((k=e.searchTopSlot.config)==null?void 0:k.desktopPlacementKey)??null,"mobile-placement-key":((b=e.searchTopSlot.config)==null?void 0:b.mobilePlacementKey)??null,"apply-header-offset":!0},null,8,["desktop-placement-key","mobile-placement-key"])):A("",!0),i("div",Xe,[i("div",{class:"results-container",style:Pe(e.floorStyle)},[i("div",$e,[n(g,{value:e.draftQ,"onUpdate:value":s[0]||(s[0]=d=>e.draftQ=d),placeholder:t.$t("search.placeholder_text"),class:"mr-3",clearable:!0,onKeyup:Ce(e.onSearchButtonClick,["enter"])},null,8,["value","placeholder","onKeyup"]),n(h,{primary:"",size:"small",onClick:e.onSearchButtonClick},{default:we(()=>[Ae(P(t.$t("search.placeholder")),1)]),_:1},8,["onClick"])]),i("div",et,[i("span",tt,P(t.$t("search.showing"))+":",1),(l(),W(f,{key:e.facetKey,options:e.filterTypeList,selected:e.selectedTypeOptions,placeholder:t.$t("search.types.filter_type"),"text-class":"text-xs",multi:!0,"custom-style":e.dropdownCustomStyle,onUpdateOption:e.updateTypesFilter},null,8,["options","selected","placeholder","custom-style","onUpdateOption"]))]),!e.isLoading&&e.results.length===0?(l(),c("div",at,[n(x,{class:"mx-auto",icon:"faceWithMonocole",category:"emoji",size:90}),i("div",st,P(t.$t("search.results.no_results"))+". ",1),i("div",ot,P(t.$t("search.results.try_another"))+". ",1)])):A("",!0),e.isLoading&&e.results.length===0?(l(),c("div",nt,[n(O)])):A("",!0),e.results.length>0?(l(),c("div",rt,[n(K,{primary:"","heading-label":t.$t("search.search_results"),heading:"heading 3",uppercase:!1},null,8,["heading-label"]),e.relation==="eq"?(l(),c("span",lt,P(t.$t("search.search_results_found",[e.totalCount])),1)):(l(),c("span",it,P(t.$t("search.search_results_gte",[e.totalCount])),1)),(l(!0),c(I,null,Z(e.results,(d,v)=>{var R,r,E;return l(),c(I,{key:e.getStableListItemKey("search-result",d,v)},[i("div",{class:Le(["item-container",{"bottom-border-0":Number(v)===(((R=e.results)==null?void 0:R.length)??0)-1}])},[n(N,{item:d,onErrorImage:q=>d.isErrorImage=q,onNavigateToSearch:e.navigateToSearchResult},null,8,["item","onErrorImage","onNavigateToSearch"])],2),e.searchListSlot.shouldShowAdAt(e.pageOffset+Number(v),e.isMobile)?(l(),c("div",ct,[n(y,{"desktop-placement-key":((r=e.searchListSlot.config)==null?void 0:r.desktopPlacementKey)??null,"mobile-placement-key":((E=e.searchListSlot.config)==null?void 0:E.mobilePlacementKey)??null},null,8,["desktop-placement-key","mobile-placement-key"])])):A("",!0)],64)}),128)),n(U,{"model-value":e.currentPage,pages:e.totalPages,"range-size":1,"onUpdate:modelValue":e.onPageChange},null,8,["model-value","pages","onUpdate:modelValue"])])):A("",!0)],4)])],64)}const ut=J(Je,[["render",dt],["__scopeId","data-v-e82c5ea5"]]),St=Object.freeze(Object.defineProperty({__proto__:null,default:ut},Symbol.toStringTag,{value:"Module"}));
2export{St as S,Ve as c};
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.