PageSourceSearch

https://k40.si/_nuxt/yfklhYiw.js

js k40.si collected 2026-09-25 13:51:44 UTC 8,681 bytes, 1 lines download raw bytes

1import{_ as A}from"./CH6-vK2M.js";import{_ as F}from"./oJElOrtJ.js";import{_ as O,a as Y}from"./BeI_i1Ij.js";import{bc as H,bb as Q,b9 as V,ba as q,bf as X,bn as Z,bt as G,bo as J}from"./BuaA-AAG.js";import{E as K}from"./BMlBBUZx.js";import{l as L}from"./BNJNkpLl.js";import{F as y,a4 as r,Z as n,O as p,S as C,Y as D,X as w,$ as v,_ as N,N as B,a3 as R,l as W,ah as $,m as ee,n as te,D as se,u as E,a9 as ae,ap as ne,c as oe}from"./DwVXjd4k.js";import{d as ie}from"./CD8FTLXy.js";import{u as le}from"./B-hxfmjI.js";import{j as re}from"./CLxy4Izf.js";import{_ as ce}from"./C1M8riiC.js";import"./Ds2d0CcM.js";import"./DwsdCcO3.js";import"./D9njsQ-u.js";import"./CrWHElcP.js";import"./BLI-fpgJ.js";import"./B2zTkBds.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};t.SENTRY_RELEASE={id:"8ef0489ae2edf7be7e43d61645026678227eb24c"};var s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="bda5243e-8eb6-452c-928b-3647ba475bf5",t._sentryDebugIdIdentifier="sentry-dbid-bda5243e-8eb6-452c-928b-3647ba475bf5")}catch{}})();const me={props:{item:{type:Object,required:!0},highlighted:{type:Boolean,default:!1}},setup(){const{t}=V(),{currentSeason:s,clientSettings:e,crest:c}=q();return{currentSeason:s,clientSettings:e,crest:c,t}},data(){return{EmptyPlayer:K}},computed:{},methods:{getType(t){return this.t(`${t.toLowerCase()}.name`,1)},goTo(){var t;switch(this.item.type){case"Player":return{name:"players-player",params:{player:this.item.item.slug}};case"Club":return{name:"clubs-club",params:{club:this.item.item.slug}};case"League":return L((t=this.currentSeason)==null?void 0:t.slug,this.item.item.slug,this.item.item.isPlayoff,this.item.item.hideLeagueRanking);case"Season":return{name:"seasons-season",params:{season:this.item.item.slug}}}},goToSeason(){var t,s;switch(this.item.type){case"Player":return{name:"players-player",params:{player:this.item.item.slug},query:{seasons:(t=this.item.item.season)==null?void 0:t.slug}};case"Club":return{name:"seasons-season-clubs-club",params:{season:(s=this.item.item.season)==null?void 0:s.slug,club:this.item.item.slug}}}},goToLeague(t){var s,e,c;switch(this.item.type){case"Player":return{name:"players-player",params:{player:this.item.item.slug},query:{seasons:(s=this.item.item.season)==null?void 0:s.slug,leagues:t.slug}};case"Club":return{name:"seasons-season-leagues-league-clubs-club",params:{season:(e=this.item.item.season)==null?void 0:e.slug,league:(c=this.item.item.league)==null?void 0:c.slug,club:this.item.item.slug}}}},leagueUrl:L}},ue={class:"flex flex-col border-navy-10 dark:border-zinc-800 border rounded-lg bg-navy-5 dark:bg-zinc-900 overflow-hidden"},de={class:"w-full flex items-stretch"},fe={class:"mr-2 flex-none"},_e=["src","alt"],be=["src","alt"],he={class:"flex items-center justify-between w-full"},ge={class:"text-navy-100 dark:text-white text-base_sm"},ye={class:"text-navy-40 dark:text-zinc-400 text-label"},xe=["src","alt"],pe={class:"text-label_xs text-gray-900 dark:text-white font-semibold"},we={class:"flex gap-1 px-1"};function ve(t,s,e,c,b,i){var k,h,T,P,z;const m=Q;return r(),y("div",ue,[n("div",de,[p(m,{class:"w-full item-stretch flex items-center xl:cursor-pointer xl:hover:bg-offwhite dark:xl:hover:bg-zinc-950 py-3 xl:py-2 px-1",to:i.goTo()},{default:w(()=>{var l,u,d,x,I;return[n("div",fe,[e.item.type==="Player"?(r(),y("img",{key:0,src:(l=e.item.item)!=null&&l.avatar?e.item.item.avatar:b.EmptyPlayer,alt:(u=e.item.item)==null?void 0:u.name,class:"w-8 h-8 rounded-full object-cover"},null,8,_e)):(r(),y("img",{key:1,src:(d=e.item.item)!=null&&d.avatar?e.item.item.avatar:c.crest.sm,alt:(x=e.item.item)==null?void 0:x.name,class:"w-8 h-8 rounded-full object-cover"},null,8,be))]),n("div",he,[n("div",null,[n("p",ge,v((I=e.item.item)==null?void 0:I.name),1),n("p",ye,v(i.getType(e.item.type)),1)])])]}),_:1},8,["to"]),e.item.type==="Player"&&((k=e.item.item.club)!=null&&k.slug)?(r(),C(m,{key:0,to:{name:"clubs-club",params:{club:(h=e.item.item.club)==null?void 0:h.slug}},class:"w-10 h-14 xl:h-12 flex-none flex flex-col items-center justify-center gap-1 bg-navy-10 dark:bg-black/50 duration-150 hover:bg-navy-20 dark:hover:bg-black/30"},{default:w(()=>{var l,u,d,x;return[n("img",{src:(l=e.item.item.club)!=null&&l.logo?(u=e.item.item.club)==null?void 0:u.logo:c.crest.md,alt:(d=e.item.item.club)==null?void 0:d.shortName,class:"w-7 h-7 rounded-full object-cover bg-white dark:bg-zinc-600 p-[2px]"},null,8,xe),n("span",pe,v((x=e.item.item.club)==null?void 0:x.shortName),1)]}),_:1},8,["to"])):D("",!0)]),n("div",we,[e.item.type==="Player"&&((T=e.item.item)!=null&&T.season)?(r(),C(m,{key:0,class:"flex items-center justify-center p-1 my-1 w-full text-label bg-gradient text-gradient-text xl:cursor-pointer rounded-sm",to:i.goToSeason()},{default:w(()=>[N(v(e.item.item.season.name),1)]),_:1},8,["to"])):D("",!0),e.item.type==="Player"&&((P=e.item.item)!=null&&P.leagues)?(r(!0),y(B,{key:1},R(e.item.item.leagues,l=>(r(),C(m,{key:`${e.item.item.slug}-${l.slug}`,class:"flex items-center justify-center p-1 my-1 w-full text-label bg-gradient text-gradient-text xl:cursor-pointer rounded-sm",to:i.goToLeague(l)},{default:w(()=>[N(v(l.name),1)]),_:2},1032,["to"]))),128)):D("",!0),e.item.type==="Club"&&((z=e.item.item)!=null&&z.season)?(r(),C(m,{key:2,class:"flex items-center justify-center p-1 my-1 w-full text-label bg-gradient text-gradient-text xl:cursor-pointer rounded-sm",to:i.goToSeason()},{default:w(()=>[N(v(e.item.item.season.name),1)]),_:1},8,["to"])):D("",!0)])])}const ke=H(me,[["render",ve]]),Te={class:"flex-grow dark:bg-black"},Pe={id:"module-block",class:"w-full"},ze={class:"container px-4 pt-4 mx-auto mb-20"},Ie={class:"w-full max-w-[400px] flex-none mx-auto z-10 bg-white dark:bg-black sm:rounded-t-md mb-3"},je={class:"relative w-full"},Ce={class:"flex h-full absolute inset-y-0 left-0 items-center pl-3 pointer-events-none text-navy-40 dark:text-zinc-400"},De=["placeholder"],Ee={class:"flex flex-wrap -mx-2 self-stretch"},Ge=W({__name:"index",async setup(t){let s,e;const{clientSettings:c,currentSeasonAllLeagues:b,logo:i}=q(),{t:m}=V(),k=[{title:m("search"),route:!1,arrow:!0}],h=le("q"),{data:T,execute:P}=([s,e]=$(async()=>G("search",async()=>{const{data:a}=await J(`v2/website/search?search=${h.value}`);return a.value})),s=await s,e(),s),z=ee(()=>{var a;return(a=T.value)==null?void 0:a.map(o=>{if(o.type==="League"){const f=b==null?void 0:b.find(g=>{var j;return((j=g==null?void 0:g.league)==null?void 0:j.slug)===o.item.slug});o.item.isPlayoff=f==null?void 0:f.isPlayoff}return o}
1).filter(o=>((b==null?void 0:b.map(f=>{var g;return(g=f==null?void 0:f.league)==null?void 0:g.slug}))??[]).includes(o.item.slug)||o.type!=="League")}),{resolveUrl:l}=re(),u=m("pages.search.meta.title"),d=m("pages.search.meta.description",{clientName:c==null?void 0:c.title});X({title:()=>u,description:()=>d,ogTitle:()=>u,ogDescription:()=>d,ogImage:i==null?void 0:i.lg,ogUrl:l("search"),twitterTitle:()=>u,twitterDescription:()=>d,twitterImage:i==null?void 0:i.lg}),Z({link:[{rel:"canonical",href:l("search")}]});function x(){const a=document.createElement("input");a.setAttribute("type","text"),a.style.position="absolute",a.style.opacity="0",a.style.height="0",a.style.border="none",a.style.outline="none",a.style.fontSize="16px",document.body.prepend(a),a.focus(),setTimeout(()=>{var o;(o=document.getElementById("search"))==null||o.focus(),a.remove()})}const I=ie(function(){P()},300);return te(()=>h.value,()=>{I()}),se(()=>{x()}),(a,o)=>{const f=A,g=F,j=O,U=Y,M=ke;return r(),y("div",Te,[p(f,{class:"!pt-0"},{default:w(()=>[p(ce,{title:E(m)("search")},null,8,["title"])]),_:1}),n("main",Pe,[n("div",ze,[n("div",Ie,[n("div",je,[n("div",Ce,[p(g,{class:"h-4"})]),ae(n("input",{id:"search","onUpdate:modelValue":o[0]||(o[0]=_=>oe(h)?h.value=_:null),type:"text",class:"block h-10 bg-transparent dark:bg-zinc-900 border border-navy-40 dark:border-zinc-800 rounded-md text-navy dark:text-white placeholder-navy-40 dark:placeholder:text-zinc-400 text-sm focus:ring-0 focus:shadow-none focus:outline-none focus:border-navy-100 dark:focus:border-zinc-700 w-full pl-10",placeholder:E(m)("search"),autocomplete:"off"},null,8,De),[[ne,E(h)]])])]),p(U,null,{default:w(()=>[(r(),y(B,null,R(k,(_,S)=>p(j,{key:`breadcrumb-${S}`,route:_.route,"show-arrow":_.arrow,title:_.title},null,8,["route","show-arrow","title"])),64))]),_:1}),n("section",Ee,[(r(!0),y(B,null,R(E(z),(_,S)=>(r(),y("div",{key:`${_.type}-${_.item.slug}`,class:"flex-12 md:flex-6 xl:flex-4 p-2"},[p(M,{ref_for:!0,ref:`search-item-${S}`,item:_},null,8,["item"])]))),128))])])])])}}});export{Ge 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.