1import{_ as le}from"./D1KLRRyd.js";import{a as we,_ as De,g as Te}from"./CkSreoP_.js";import{d as ee,e as te,a as se,o as e,j as l,k as s,m as t,r as S,x as y,t as r,l as G,y as C,F as $,z as O,A as W,n as U,p as k,v as be,u as Ce,b as Le,c as $e,q as ue,a3 as Pe,D as Y,w as je,f as Ue,ab as Be,$ as xe,a0 as Oe,ac as Ee,s as fe,_ as Ne,V as Re,C as Fe}from"./tLDKk9pt.js";import{g as He}from"./DVVa1oVD.js";import{g as Se}from"./CsQrHEvO.js";import{g as Ge}from"./raCLa_PU.js";const Ie={class:"menu menu-common"},Je={for:"teamsmenu",id:"toggle-menu",class:"toggleMenu"},qe=["src"],We={class:"main-menu clearfix"},Ve=["for"],ze=["id"],Ke={class:"sub-menu"},Ye=["href"],Qe={class:"lang-select-menu"},Xe=ee({__name:"TeamsMenu",props:{frontPageText:{},subsiteGroups:{}},setup(b){const{t:j}=te(),w=se("siteData",()=>({})),_=k(()=>{const p=w.value?.staticUrl;return typeof p=="string"?p:""}),g=k(()=>{const p=w.value?.sections;return Array.isArray(p)&&p.length>0?p[0].sectionSportType??0:0}),x=k(()=>g.value===0?j("subsiteListing"):j("subsiteListingGroups"));return(p,c)=>{const d=le,N=we,A=De;return e(),l("nav",Ie,[s("label",Je,[t(_)?(e(),l("img",{key:0,src:`${t(_)}/logos/logo-300.png`,style:{height:"40px",width:"40px"},class:"me-2",alt:""},null,8,qe)):S("",!0),y(" "+r(t(j)("siteMenu"))+" ",1),c[1]||(c[1]=s("span",{class:"drop-icon"},"â¾",-1))]),c[3]||(c[3]=s("input",{id:"teamsmenu",type:"checkbox",class:"toggler"},null,-1)),s("ul",We,[s("li",null,[G(d,{prefetch:!1,to:"/"},{default:C(()=>[y(r(b.frontPageText),1)]),_:1})]),(e(!0),l($,null,O(b.subsiteGroups,(J,z)=>(e(),l("li",{key:J.title},[s("a",null,[y(r(b.subsiteGroups.length>1||b.subsiteGroups.length==1&&b.subsiteGroups[0].isDefault==!1?J.title:t(x))+" ",1),c[2]||(c[2]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`group_${z}`,onClick:c[0]||(c[0]=W(()=>{},["stop"]))},"â¾",8,Ve)]),s("input",{id:`group_${z}`,type:"checkbox"},null,8,ze),s("ul",Ke,[(e(!0),l($,null,O(J.subsites,F=>(e(),l("li",{key:F.id},[F.isLink?(e(),l("a",{key:1,href:F.url,target:"_blank"},r(F.name),9,Ye)):(e(),U(d,{key:0,prefetch:!1,to:`/joukkueet/${F.id}`},{default:C(()=>[y(r(F.name),1)]),_:2},1032,["to"]))]))),128))])]))),128)),s("li",Qe,[G(N)]),G(A)])])}}}),Ze=Object.assign(Xe,{__name:"TeamsMenu"}),et={class:"menu menu-common"},tt={for:"section-menu",class:"toggleMenu"},nt={class:"main-menu clearfix"},st={key:0,class:"section-menu-item"},lt={key:0,class:"drop-icon"},ot=["for"],it=["id"],at={key:2,class:"sub-menu"},rt=["for"],ut=["id"],ct={class:"sub-menu grouped-teams"},dt=["href"],mt=["href"],ft={class:"lang-select-menu"},pt=ee({__name:"SectionsMenu",props:{sections:{}},setup(b){const{t:j}=te();return be(()=>{Array.from(document.getElementsByClassName("section-menu-item")).forEach(w=>{const _=w.getBoundingClientRect();window.innerWidth-_.right<300&&w.querySelectorAll(".grouped-teams").forEach(x=>{x.classList.add("left-sub-menu")})})}),(w,_)=>{const g=le,x=De,p=we;return e(),l("nav",et,[s("label",tt,[y(r(t(j)("sectionMenu")),1),_[2]||(_[2]=s("span",{class:"drop-icon"},"â¾",-1))]),_[4]||(_[4]=s("input",{id:"section-menu",type:"checkbox",class:"toggler"},null,-1)),s("ul",nt,[s("li",null,[G(g,{prefetch:!1,to:"/"},{default:C(()=>[y(r(t(j)("clubfrontPage")),1)]),_:1})]),(e(!0),l($,null,O(b.sections,c=>(e(),l($,{key:c.id},[c.portalType!==0?(e(),l("li",st,[G(g,{prefetch:!1,to:`/${c.url}`},{default:C(()=>[y(r(c.name)+" ",1),c.subsiteGroups?.length?(e(),l("span",lt,"â¾")):S("",!0)]),_:2},1032,["to"]),c.subsiteGroups?.length?(e(),l("label",{key:0,title:"Toggle Drop-down",class:"drop-icon",for:`section-${c.id}`,onClick:_[0]||(_[0]=W(()=>{},["stop"]))},"â¾",8,ot)):S("",!0),c.subsiteGroups?.length?(e(),l("input",{key:1,id:`section-${c.id}`,type:"checkbox",class:"toggler"},null,8,it)):S("",!0),c.subsiteGroups?.length?(e(),l("ul",at,[c.subsiteGroups.length>1||c.subsiteGroups.length==1&&c.subsiteGroups[0].isDefault==!1?(e(!0),l($,{key:0},O(c.subsiteGroups,(d,N)=>(e(),l("li",{key:d.title},[s("a",null,[y(r(d.title)+" ",1),_[3]||(_[3]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`${c.id}_group_${N}`,onClick:_[1]||(_[1]=W(()=>{},["stop"]))},"â¾",8,rt)]),s("input",{id:`${c.id}_group_${N}`,type:"checkbox"},null,8,ut),s("ul",ct,[(e(!0),l($,null,O(d.subsites,A=>(e(),l("li",{key:A.id},[A.isLink?(e(),l("a",{key:1,href:A.url,target:"_blank"},r(A.name),9,dt)):(e(),U(g,{key:0,prefetch:!1,to:`/${c.url}/joukkueet/${A.id}`},{default:C(()=>
1[y(r(A.name),1)]),_:2},1032,["to"]))]))),128))])]))),128)):(e(!0),l($,{key:1},O(c.subsiteGroups[0].subsites,d=>(e(),l("li",{key:d.id},[d.isLink?(e(),l("a",{key:1,href:d.url,target:"_blank"},r(d.name),9,mt)):(e(),U(g,{key:0,prefetch:!1,to:`/${c.url}/joukkueet/${d.id}`},{default:C(()=>[y(r(d.name),1)]),_:2},1032,["to"]))]))),128))])):S("",!0)])):S("",!0)],64))),128)),G(x),s("li",ft,[G(p)])])])}}}),ht=Object.assign(pt,{__name:"SectionsMenu"}),pe={BasicJopox:1,Lite:2},kt=ee({__name:"SiteMenu",setup(b){const{t:j}=te(),w=se("siteData",()=>({})),_=k(()=>Number(w.value?.siteCmsType)),g=k(()=>_.value===pe.BasicJopox),x=k(()=>!!w.value?.isJopoxSite),p=k(()=>{const d=w.value?.sections;return Array.isArray(d)?d:[]}),c=k(()=>p.value.length?p.value[0].subsiteGroups||[]:[]);return(d,N)=>{const A=Ze,J=ht;return t(g)?(e(),l($,{key:0},[t(x)?(e(),U(A,{key:0,"front-page-text":t(j)("clubfrontPage"),"subsite-groups":t(c)},null,8,["front-page-text","subsite-groups"])):(e(),U(J,{key:1,sections:t(p)},null,8,["sections"]))],64)):S("",!0)}}}),gt=Object.assign(kt,{__name:"SiteMenu"}),_t=["for"],vt=["for"],yt=["href"],bt=["for"],$t={key:3},Mt=["for"],xt=["id"],Tt={class:"sub-menu"},wt=ee({__name:"DynamicMenuItem",props:{menuItem:{},dynamicBaseAs:{}},setup(b){const j=b,w=k(()=>!!(j.menuItem.children&&j.menuItem.children.length));function _(p){return p&&p.startsWith("/")?p:null}function g(p){return p.menuType===3?p.url||"#":p.menuType===1&&p.id&&p.slug?`${j.dynamicBaseAs}/${p.id}/${p.slug}`:""}const x=k(()=>w.value);return(p,c)=>{const d=le,N=Ae;return e(),l("li",null,[b.menuItem.menuType===1&&b.menuItem.id&&b.menuItem.slug?(e(),U(d,{key:0,prefetch:!1,to:g(b.menuItem)},{default:C(()=>[y(r(b.menuItem.title)+" ",1),t(x)?(e(),l($,{key:0},[c[4]||(c[4]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`menu-${b.menuItem.id}`,onClick:c[0]||(c[0]=W(()=>{},["stop"]))},"â¾",8,_t)],64)):S("",!0)]),_:1},8,["to"])):b.menuItem.menuType===3&&_(b.menuItem.url)?(e(),U(d,{key:1,prefetch:!1,to:_(b.menuItem.url)},{default:C(()=>[y(r(b.menuItem.title)+" ",1),t(x)?(e(),l($,{key:0},[c[5]||(c[5]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`menu-${b.menuItem.id}`,onClick:c[1]||(c[1]=W(()=>{},["stop"]))},"â¾",8,vt)],64)):S("",!0)]),_:1},8,["to"])):b.menuItem.menuType===3?(e(),l("a",{key:2,href:b.menuItem.url,target:"_blank"},[y(r(b.menuItem.title)+" ",1),t(x)?(e(),l($,{key:0},[c[6]||(c[6]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`menu-${b.menuItem.id}`,onClick:c[2]||(c[2]=W(()=>{},["stop"]))},"â¾",8,bt)],64)):S("",!0)],8,yt)):(e(),l("a",$t,[y(r(b.menuItem.title)+" ",1),t(x)?(e(),l($,{key:0},[c[7]||(c[7]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:`menu-${b.menuItem.id}`,onClick:c[3]||(c[3]=W(()=>{},["stop"]))},"â¾",8,Mt)],64)):S("",!0)])),t(w)?(e(),l($,{key:4},[s("input",{class:"toggler",type:"checkbox",id:`menu-${b.menuItem.id}`},null,8,xt),s("ul",Tt,[(e(!0),l($,null,O(b.menuItem.children,A=>(e(),U(N,{key:A.id,"menu-item":A,"dynamic-base-as":b.dynamicBaseAs},null,8,["menu-item","dynamic-base-as"]))),128))])],64)):S("",!0)])}}}),Ae=Object.assign(wt,{__name:"DynamicMenuItem"});function he(b){switch(b){case"facebook":return"fab fa-facebook-f";case"twitter":return"fab fa-x-twitter";case"youtube":return"fab fa-youtube";case"instagram":return"fab fa-instagram";case"tiktok":return"fab fa-tiktok";default:return""}}function ke(b){switch(b){case"facebook":return"Facebook";case"twitter":return"Twitter";case"youtube":return"Youtube";case"instagram":return"Instagram";case"tiktok":return"TikTok";default:return""}}const Ct={class:"menu menu-primary"},Lt={for:"dynamicmenu",class:"toggleMenu",id:"toggle-menu"},St={class:"main-menu clearfix"},At={key:0},Bt={class:"sub-menu"},Dt={key:0},Pt={key:1},jt={key:1},Ut={class:"sub-menu"},Nt={key:0},Gt={class:"menu-somelinks"},Ot={key:0,class:"menu-somelinks-container"},Et=["aria-label","href"],Rt=["href"],Ft={key:2},Ht={class:"menu menu-login"},It=["href"],Jt=ee({__name:"DynamicMenu",setup(b){const{t:j}=te(),w=Ce(),_=se("siteData",()=>({})),g=k(()=>w.params.section||""),x=k(()=>{const M=_.value?.sections;return Array.isArray(M)?M:[]}),p=k(()=>x.value.find(M=>M.url===g.value)),c=k(()=>He(g.value,x.value)),d=k(()=>Se(w.params)),N=k(()=>p.value?.menus||[]),A=k(()=>p.value?.siteMenus||[]),J=k(()=>p.value?.contactMenus||[]),z=k(()=>
1{if(g.value&&p.value?.id){const M=_.value?.sectionSomeLinks;return M&&M[p.value.id]||[]}return[]}),{get:F}=Le(),H=$e();ue([()=>p.value?.id,()=>_.value?.sectionSomeLinks],async([M])=>{if(!M)return;const v=_.value?.sectionSomeLinks;if(!(v&&M in v))try{const P=await F(`/api/website/some/section/${M}/`,H.value||"fi");_.value?.sectionSomeLinks&&(_.value.sectionSomeLinks[M]=P)}catch(P){console.error("Failed to load section someLinks:",P)}},{immediate:!0});const I=k(()=>g.value?{sectionHref:"/[section]",sectionBaseAs:`/${g.value}`,dynamicHref:"/[section]/jaosto/[navMenuId]/[slug]",dynamicBaseAs:`/${g.value}/jaosto`}:{sectionHref:"",sectionBaseAs:"",dynamicHref:"/seura/[navMenuId]/[slug]",dynamicBaseAs:"/seura"});function K(M){const P=M.target.closest?.(".menu li");if(!P)return;P.querySelectorAll(":scope > .sub-menu").forEach(E=>{E.classList.remove("left-sub-menu"),E.getBoundingClientRect().right>window.innerWidth&&E.classList.add("left-sub-menu")})}return be(()=>{document.addEventListener("mouseenter",K,!0)}),Pe(()=>{document.removeEventListener("mouseenter",K,!0)}),(M,v)=>{const P=le,V=Ae,E=we;return t(p)&&t(p).menus?(e(),l($,{key:0},[s("nav",Ct,[s("label",Lt,[y(r(t(_).name||""),1),v[2]||(v[2]=s("span",{class:"drop-icon"},"â¾",-1))]),v[9]||(v[9]=s("input",{id:"dynamicmenu",type:"checkbox",class:"toggler"},null,-1)),s("ul",St,[s("li",null,[G(P,{prefetch:!1,to:t(d).linkAs},{default:C(()=>[...v[3]||(v[3]=[s("i",{class:"fas fa-home"},null,-1)])]),_:1},8,["to"])]),t(p).showSiteMenu?(e(),l("li",At,[s("a",null,[y(r(t(g)?t(p).name:t(_).officialShortName)+" ",1),v[4]||(v[4]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:"menu-101",onClick:v[0]||(v[0]=W(()=>{},["stop"]))},"â¾")]),v[5]||(v[5]=s("input",{id:"menu-101",class:"toggler",type:"checkbox"},null,-1)),s("ul",Bt,[(e(!0),l($,null,O(t(A),R=>(e(),U(V,{key:R.id,"menu-item":R,"dynamic-base-as":t(I).dynamicBaseAs},null,8,["menu-item","dynamic-base-as"]))),128)),s("li",null,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/uutisarkisto`},{default:C(()=>[y(r(t(j)("newsListing")),1)]),_:1},8,["to"])]),t(_).siteCmsType===t(pe).BasicJopox?(e(),l("li",Dt,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/ottelut`},{default:C(()=>[y(r(t(j)(`sportTexts.${t(c)}.subsiteCompetitionlist`)),1)]),_:1},8,["to"])])):S("",!0),s("li",null,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/lomakkeet`},{default:C(()=>[y(r(t(j)("queriesListing")),1)]),_:1},8,["to"])]),s("li",null,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/materiaalipankki`},{default:C(()=>[y(r(t(j)("documents")),1)]),_:1},8,["to"])]),t(_).hasLpReservations?(e(),l("li",Pt,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/vuorovaraukset`},{default:C(()=>[y(r(t(j)("lpReservations")),1)]),_:1},8,["to"])])):S("",!0),s("li",null,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/tietosuojaseloste`},{default:C(()=>[y(r(t(j)("dataPrivacy")),1)]),_:1},8,["to"])])])])):S("",!0),(e(!0),l($,null,O(t(N),R=>(e(),U(V,{key:R.id,"menu-item":R,"dynamic-base-as":t(I).dynamicBaseAs},null,8,["menu-item","dynamic-base-as"]))),128)),t(p).showContactsMenu?(e(),l("li",jt,[s("a",null,[y(r(t(j)("contactInformationMenu"))+" ",1),v[6]||(v[6]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:"menu-102",onClick:v[1]||(v[1]=W(()=>{},["stop"]))},"â¾")]),v[7]||(v[7]=s("input",{id:"menu-102",class:"toggler",type:"checkbox"},null,-1)),s("ul",Ut,[(e(!0),l($,null,O(t(J),R=>(e(),U(V,{key:R.id,"menu-item":R,"dynamic-base-as":t(I).dynamicBaseAs},null,8,["menu-item","dynamic-base-as"]))),128)),t(_).siteCmsType===t(pe).BasicJopox?(e(),l("li",Nt,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/joukkueyhteydet`},{default:C(()=>[y(r(t(j)("theOfficialsList")),1)]),_:1},8,["to"])])):S("",!0),s("li",null,[G(P,{prefetch:!1,to:`${t(I).sectionBaseAs}/organisaatio`},{default:C(()=>[y(r(t(j)("organisationListing")),1)]),_:1},8,["to"])])])])):S("",!0),s("li",Gt,[t(z).length?(e(),l("div",Ot,[(e(!0),l($,null,O(t(z),R=>(e(),l("a",{key:R.someType,"aria-label":t(ke)(R.someType),target:"_blank",rel:"noopener noreferrer nofollow",href:R.url,class:"menu-somelink"},[s("i",{class:Y(t(he)(R.someType))},null,2)],8,Et))),128))])):S("",!0),t(_).lockerRoomUrl?(e(),l("a",{key:1,target:"_blank",rel:"noopener noreferrer nofollow",href:t(_).lockerRoomUrl,style:{display:"inline-block"}},[...v[8]||(v[8]=[s("i",{class:"fas fa-user-lock"},null,-1)])],8,Rt)):S("",!0)]),t(_).siteCmsType!==t(pe).BasicJopox?(e(),l("li",Ft,[G(E)])):S("",!0)])]),s("nav",Ht,[t(_).lockerRoomUrl?(e(),l("a",{key:0,target:"_blank",class:"main-menu clearfix toggleMenu",rel:"noopener noreferrer nofollow",id:"toggle-menu",href:t(_).lockerRoomUrl,style:{display:"block"}},[y(r(t(j)("login"))+" ",1),v[10]||(v[10]=s("i",{style:{float:"right"},class:"fas fa-user-lock"},null,-1))],8,It)):S("",!0)])],64)):S("",!0)}}}),qt=Object.assign(Jt,{__name:"DynamicMenu"}),Wt={class:"menu menu-primary"},Vt={for:"subsitemenu",id:"toggle-menu",class:"toggleMenu"},zt={class:"main-menu clearfix"},Kt={class:"sub-menu"},Yt={class:"menu-somelinks"},Qt={key:0,class:"menu-somelinks-container"},Xt=["href","aria-label"],Zt=["href"],en={key:0,class:"menu menu-login"},tn=["href"],nn=ee({__name:"SubsiteMenu",props:{isSubsiteFrontPage:{type:Boolean}},async setup(b){let j,w;const{t:_}=te(),g=Ce(),x=se("siteData",()=>({})),p=k(()=>{const M=g.params.subsiteId;return Array.isArray(M)?M[0]:M}),c=k(()=>Se(g.params)),d=k(()=>{const M=x.value?.sections;return Array.isArray(M)?M:[]}),N=k(()=>p.value?Ge(d.value,p.value):null),A=k(()=>p.value?Te(p.value,d.value):0),J=k(()=>!p.value||!x.value?.subsiteMenus?[]:x.value.subsiteMenus[p.value]||[]),z=k(()=>!p.value||!x.value?.subsiteSomeLinks?[]:x.value.subsiteSomeLinks[p.value]||[]),F=k(()=>x.value?.lockerRoomUrl||null),{get:H}=Le(),I=$e();[j,w]=je(async()=>Ue(`subsite-menus-classic-${p.value}`,async()=>{const M=p.value;if(!M)return null;const v=I.value||"fi",P=await H(`/api/v1/navmenu/subsite/${M}/`,v);return x.value?.subsiteMenus&&(x.value.subsiteMenus[M]=P),P},{watch:[p,()=>I.value]})),await j,w();function K(M){const v=document.getElementById(M);v&&v.scrollIntoView({behavior:"smooth"})}return(M,v)=>{const P=le,V=Ae;
1return e(),l($,null,[s("nav",Wt,[s("label",Vt,[y(r(t(N))+" ",1),v[3]||(v[3]=s("span",{class:"drop-icon"},"â¾",-1))]),v[8]||(v[8]=s("input",{type:"checkbox",id:"subsitemenu",class:"toggler"},null,-1)),s("ul",zt,[s("li",null,[G(P,{prefetch:!1,to:t(c).linkAs},{default:C(()=>[...v[4]||(v[4]=[s("i",{class:"fas fa-home"},null,-1)])]),_:1},8,["to"])]),s("li",null,[s("a",null,[y(r(t(N))+" ",1),v[5]||(v[5]=s("span",{class:"drop-icon"},"â¾",-1)),s("label",{title:"Toggle Drop-down",class:"drop-icon",for:"subsitemenu1",onClick:v[0]||(v[0]=W(()=>{},["stop"]))},"â¾")]),v[6]||(v[6]=s("input",{type:"checkbox",id:"subsitemenu1",class:"toggler"},null,-1)),s("ul",Kt,[(e(!0),l($,null,O(t(J),E=>(e(),U(V,{key:E.id,"menu-item":E,"dynamic-base-as":`${t(c).linkAs}sivut`},null,8,["menu-item","dynamic-base-as"]))),128)),s("li",null,[G(P,{prefetch:!1,to:`${t(c).linkAs}uutisarkisto`},{default:C(()=>[y(r(t(_)("subsiteNewsList")),1)]),_:1},8,["to"])]),s("li",null,[G(P,{prefetch:!1,to:`${t(c).linkAs}ottelut`},{default:C(()=>[y(r(t(_)(`sportTexts.${t(A)}.subsiteCompetitionlist`)),1)]),_:1},8,["to"])]),s("li",null,[G(P,{prefetch:!1,to:`${t(c).linkAs}lomakkeet`},{default:C(()=>[y(r(t(_)("queriesListing")),1)]),_:1},8,["to"])]),s("li",null,[G(P,{prefetch:!1,to:`${t(c).linkAs}materiaalipankki`},{default:C(()=>[y(r(t(_)("documents")),1)]),_:1},8,["to"])]),s("li",null,[G(P,{prefetch:!1,to:`${t(c).linkAs}tietosuojaseloste`},{default:C(()=>[y(r(t(_)("dataPrivacy")),1)]),_:1},8,["to"])])])]),s("li",null,[b.isSubsiteFrontPage?(e(),l("a",{key:0,href:"#",onClick:v[1]||(v[1]=W(E=>K("players"),["prevent"])),style:{cursor:"pointer"}},r(t(_)(`sportTexts.${t(A)}.subsiteTeamlist`)),1)):(e(),U(P,{key:1,prefetch:!1,to:`${t(c).linkAs}#players`},{default:C(()=>[y(r(t(_)(`sportTexts.${t(A)}.subsiteTeamlist`)),1)]),_:1},8,["to"]))]),s("li",null,[b.isSubsiteFrontPage?(e(),l("a",{key:0,href:"#",onClick:v[2]||(v[2]=W(E=>K("officials"),["prevent"])),style:{cursor:"pointer"}},r(t(_)("subsiteOfficialslist")),1)):(e(),U(P,{key:1,prefetch:!1,to:`${t(c).linkAs}#officials`},{default:C(()=>[y(r(t(_)("subsiteOfficialslist")),1)]),_:1},8,["to"]))]),s("li",Yt,[t(z)?.length?(e(),l("div",Qt,[(e(!0),l($,null,O(t(z),E=>(e(),l("a",{key:E.someType,href:E.url,"aria-label":t(ke)(E.someType),target:"_blank",rel:"noopener noreferrer nofollow",class:"menu-somelink"},[s("i",{class:Y(t(he)(E.someType))},null,2)],8,Xt))),128))])):S("",!0),t(F)?(e(),l("a",{key:1,href:t(F),target:"_blank",rel:"noopener noreferrer nofollow",style:{display:"inline-block"}},[...v[7]||(v[7]=[s("i",{class:"fas fa-user-lock"},null,-1)])],8,Zt)):S("",!0)])])]),t(F)?(e(),l("nav",en,[s("a",{href:t(F),target:"_blank",rel:"noopener noreferrer nofollow",class:"main-menu clearfix toggleMenu",id:"toggle-menu",style:{display:"block"}},[y(r(t(_)("login"))+" ",1),v[9]||(v[9]=s("i",{style:{float:"right"},class:"fas fa-user-lock"},null,-1))],8,tn)])):S("",!0)],64)}}}),sn=Object.assign(nn,{__name:"SubsiteMenu"}),ln=["title","onClick"],on=ee({__name:"ThemedLangSelect",props:{vertical:{type:Boolean}},setup(b){const j=se("siteData",()=>({})),{locale:w,setLocale:_}=te(),g=$e(),x=k(()=>{const c=j.value?.languages;return Array.isArray(c)?c.map(d=>typeof d=="string"?d:String(d)):[]});function p(c){g.value=xe(Number(c)),_(xe(Number(c))||Oe)}return(c,d)=>t(x).length>1?(e(),l("div",{key:0,class:Y(["language-selector",{vertical:b.vertical}])},[(e(!0),l($,null,O(t(x),(N,A)=>(e(),l("button",{key:A,class:Y(["lang-btn",{active:t(w)===t(xe)(Number(N)).toLocaleLowerCase()}]),title:t(Be)(Number(N)),onClick:J=>p(N)},r(t(Be)(Number(N))),11,ln))),128))],2)):S("",!0)}}),an=Object.assign(on,{__name:"ThemedLangSelect"}),rn={class:"drill"},un={class:"mobile-menu-link drill-row-title drill-level-title"},cn=["aria-expanded","aria-label"],dn={key:0,id:"drill-own-menu",class:"mobile-menu-list drill-list drill-own-menu"},mn=["href"],fn=["onClick"],pn=["aria-label","onClick"],hn=["href"],kn={class:"mobile-menu-list drill-list"},gn={key:0,class:"drill-heading"},_n={key:0,class:"mobile-menu-section-title"},vn={key:1},yn=["href"],bn=["onClick"],$n=["aria-label","onClick"],Mn={key:2},xn=["href"],Tn=ee({__name:"ThemedHeaderMobileDrill",props:{rootOwner:{},rootItems:{},currentPath:{},openAtUrl:{},open:{type:Boolean}},emits:["close","drill"],setup(b,{emit:j}){const w=b,_=j,{t:g}=te(),x=fe([]),p=fe(!1),c=fe({}),d=o=>o.replace(/\/$/,""),N=o=>!!o.url&&o.url!=="#";function A(o){return o.heading!==void 0?!1:!!(o.children?.length||o.sideMenu?.length)}function J(o){if(!o.children?.length)return[];const n=[];return o.childrenTitle&&n.push({heading:o.childrenTitle}),n.push(...o.children),n}function z(o){const n=o?.sideMenu||[];if(!o||!N(o))return n;const m=d(o.url);return n.filter(a=>a.children?.length||!N(a)||d(a.url)!==m)}function F(o,n){return{title:n,owner:o,ownMenu:z(o),places:J(o)}}const H=k(()=>({title:"",owner:w.rootOwner,ownMenu:z(w.rootOwner),places:[...w.rootItems]}));function I(o){const n=[H.value];for(const m of o){const a=n[n.length-1],h=m.kind==="places"?a.places[m.index]:a.ownMenu[m.index];if(!h||h.heading!==void 0||!A(h))break;n.push(F(h,h.title))}return n}const K=k(()=>I(x.value)),M=k(()=>K.value[K.value.length-1]),v=k(()=>K.value.length>1),P=k(()=>K.value.slice(1).map(o=>
1o.title).filter(Boolean).filter((o,n,m)=>o!==m[n-1]).join(" â ")),V=k(()=>P.value||M.value.owner?.title||""),E=k(()=>M.value.ownMenu.length>0&&M.value.places.length>0),R=k(()=>x.value.map(o=>`${o.kind}:${o.index}`).join("/")),oe=k(()=>!c.value[R.value]);function q(){c.value[R.value]=oe.value}const ce=k(()=>M.value.ownMenu.length>0&&(oe.value||!E.value));function de(o,n){const m=d(o);return m?m===n||n.startsWith(`${m}/`):!0}function ge(o,n){const m=a=>a.some(h=>N(h)&&d(h.url)===n?!0:A(h)&&ge(h,n));return m(o.children||[])||m(o.sideMenu||[])}function _e(o,n){if(o.heading!==void 0||o.external)return 0;const m=N(o);return m&&d(o.url)===n?3:A(o)&&ge(o,n)?2:m&&de(o.url,n)?1:0}const me=k(()=>{if(!w.currentPath)return null;const o=d(w.currentPath);let n=null,m=0,a=-1;const h=(i,B)=>{B.forEach((f,L)=>{const u=_e(f,o);if(!u)return;const T=f.heading===void 0&&N(f)?d(f.url).length:0;(u>m||u===m&&T>a)&&(n={list:i,index:L},m=u,a=T)})};return ce.value&&h("ownMenu",M.value.ownMenu),h("places",M.value.places),n});function ne(o,n){return me.value?.list===o&&me.value?.index===n}const ve=k(()=>
1{if(ce.value||!w.currentPath)return!1;const o=d(w.currentPath);return M.value.ownMenu.some(n=>_e(n,o)>=2)});function ie(o){return!w.currentPath||!N(o)||o.external?!1:d(o.url)===d(w.currentPath)}function ae(o,n){const a=(o==="ownMenu"?M.value.ownMenu:M.value.places)[n];p.value=!1,x.value=[...x.value.slice(0,K.value.length-1),{kind:o,index:n}],a&&a.heading===void 0&&_("drill",a)}function Me(){p.value=!0,x.value=x.value.slice(0,Math.max(0,K.value.length-2))}function X(){_("close")}function re(o,n){const m=d(n),a=(h,i)=>{for(let B=0;B<i.length;B++){const f=i[B];if(f.heading!==void 0||!A(f))continue;const L={kind:h,index:B};if(N(f)&&d(f.url)===m)return[L];const u=re(F(f,f.title),n);if(u)return[L,...u]}return null};return a("places",o.places)||a("ownMenu",o.ownMenu)}function ye(o,n){const m=(i,B)=>{for(let f=0;f<B.length;f++){const L=B[f];if(L.heading!==void 0||!A(L))continue;const u=ye(F(L,L.title),n);if(u)return[{kind:i,index:f},...u]}return null},a=m("places",o.places)||m("ownMenu",o.ownMenu);return a||([...o.ownMenu,...o.places].some(i=>i.heading===void 0&&N(i)&&d(i.url)===n)?[]:null)}function Z(){p.value=!1;const o=w.openAtUrl?re(H.value,w.openAtUrl)||[]:[],n=w.currentPath?d(w.currentPath):"",m=w.openAtUrl?d(w.openAtUrl):"";if(!n||n===m){x.value=o;return}const a=I(o),h=ye(a[a.length-1],n);x.value=h?[...o,...h]:o}return ue([()=>w.open,()=>w.openAtUrl],()=>{c.value={},Z()}),ue(H,()=>{w.open||Z()}),be(Z),(o,n)=>{const m=le;return e(),l("div",rn,[G(Ee,{name:t(p)?"drill-back":"drill-fwd"},{default:C(()=>[(e(),l("div",{key:t(K).length,class:"drill-panel"},[t(v)?(e(),l("button",{key:0,type:"button",class:"mobile-menu-link drill-back-btn",onClick:Me},[n[1]||(n[1]=s("i",{class:"fas fa-arrow-left"},null,-1)),s("span",null,r(t(g)("back")),1)])):S("",!0),t(V)?(e(),l($,{key:1},[s("div",{class:Y(["mobile-menu-parent drill-row drill-level-row",{"drill-in-path":t(ve)}])},[s("span",un,r(t(V)),1),t(E)?(e(),l("button",{key:0,type:"button",class:"mobile-menu-arrow drill-row-arrow","aria-expanded":t(oe),"aria-controls":"drill-own-menu","aria-label":`${t(V)} â ${t(g)("menu")}`,onClick:n[0]||(n[0]=a=>q())},[s("i",{class:Y(`fas fa-chevron-${t(oe)?"up":"down"}`)},null,2)],8,cn)):S("",!0)],2),t(ce)?(e(),l("ul",dn,[(e(!0),l($,null,O(t(M).ownMenu,(a,h)=>(e(),l("li",{key:`own-${h}`},[A(a)?(e(),l("div",{key:0,class:Y(["mobile-menu-parent drill-row",{"drill-in-path":ne("ownMenu",h)}])},[a.external&&N(a)?(e(),l("a",{key:0,href:a.url,target:"_blank",rel:"noopener noreferrer",class:"mobile-menu-link drill-row-title",onClick:X},r(a.title),9,mn)):N(a)?(e(),U(m,{key:1,prefetch:!1,to:a.url,class:"mobile-menu-link drill-row-title","aria-current":ie(a)?"page":void 0,onClick:X},{default:C(()=>[y(r(a.title),1)]),_:2},1032,["to","aria-current"])):(e(),l("button",{key:2,type:"button",class:"mobile-menu-link drill-row-title drill-row-title-btn",onClick:i=>ae("ownMenu",h)},r(a.title),9,fn)),s("button",{type:"button",class:"mobile-menu-arrow drill-row-arrow","aria-label":`${a.title} â ${t(g)("menu")}`,onClick:i=>ae("ownMenu",h)},[...n[2]||(n[2]=[s("i",{class:"fas fa-arrow-right"},null,-1)])],8,pn)],2)):(e(),l($,{key:1},[a.external?(e(),l("a",{key:0,href:a.url,target:"_blank",rel:"noopener noreferrer",class:"mobile-menu-link drill-link",onClick:X},r(a.title),9,hn)):(e(),U(m,{key:1,prefetch:!1,to:a.url,class:Y(["mobile-menu-link drill-link",{"drill-current":ne("ownMenu",h)}]),"aria-current":ie(a)?"page":void 0,onClick:X},{default:C(()=>[y(r(a.title),1)]),_:2},1032,["to","class","aria-current"]))],64))]))),128))])):S("",!0)],64)):S("",!0),s("ul",kn,[(e(!0),l($,null,O(t(M).places,(a,h)=>(e(),l($,{key:`place-${h}`},[a.heading!==void 0?(e(),l("li",gn,[a.heading?(e(),l("div",_n,r(a.heading),1)):S("",!0)])):A(a)?(e(),l("li",vn,[s("div",{class:Y(["mobile-menu-parent drill-row",{"drill-in-path":ne("places",h)}])},[a.external&&N(a)?(e(),l("a",{key:0,href:a.url,target:"_blank",rel:"noopener noreferrer",class:"mobile-menu-link drill-row-title",onClick:X},r(a.title),9,yn)):N(a)?(e(),U(m,{key:1,prefetch:!1,to:a.url,class:"mobile-menu-link drill-row-title","aria-current":ie(a)?"page":void 0,onClick:X},{default:C(()=>[y(r(a.title),1)]),_:2},1032,["to","aria-current"])):(e(),l("button",{key:2,type:"button",class:"mobile-menu-link drill-row-title drill-row-title-btn",onClick:i=>ae("places",h)},r(a.title),9,bn)),s("button",{type:"button",class:"mobile-menu-arrow drill-row-arrow","aria-label":`${a.title} â ${t(g)("menu")}`,onClick:i=>ae("places",h)},[...n[3]||(n[3]=[s("i",{class:"fas fa-arrow-right"},null,-1)])],8,$n)],2)])):(e(),l("li",Mn,[a.external?(e(),l("a",{key:0,href:a.url,target:"_blank",rel:"noopener noreferrer",class:"mobile-menu-link drill-link",onClick:X},r(a.title),9,xn)):(e(),U(m,{key:1,prefetch:!1,to:a.url,class:Y(["mobile-menu-link drill-link",{"drill-current":ne("places",h)}]),"aria-current":ie(a)?"page":void 0,onClick:X},{default:C(()=>[y(r(a.title),1)]),_:2},1032,["to","class","aria-current"]))]))],64))),128))])]))]),_:1},8,["name"])])}}}),wn=Object.assign(Ne(Tn,[["__scopeId","data-v-faf6f396"]]),{__name:"ThemedHeaderMobileDrill"}),Cn={class:"themed-header-wrapper"},Ln={class:"main-header"},Sn={class:"navbar navbar-expand-lg main-nav"},An={class:"container-fluid px-3"},Bn=["src"],Dn={class:"d-flex d-lg-none align-items-center gap-2 ms-auto"},Pn={class:"d-none d-lg-flex flex-column flex-grow-1 ms-4"},jn={key:0,class:"navbar-nav small-nav mb-1"},Un={key:0,class:"nav-item"},Nn=["href"],Gn={key:1,class:"nav-item mega-dropdown"},On={class:"mega-menu"},En={class:"mega-menu-container"},Rn={class:"mega-menu-header"},Fn={class:"mega-menu-content"}
1,Hn={key:0,class:"mega-menu-column mega-menu-links"},In=["href"],Jn={class:"mega-menu-category"},qn={key:1,class:"mega-menu-category-title"},Wn={class:"mega-menu-items"},Vn={key:0,class:"mega-menu-subcategory"},zn={class:"mega-menu-subcategory-title"},Kn={class:"mega-menu-subitems"},Yn=["href"],Qn=["href"],Xn={key:2},Zn={class:"navbar-nav"},es={key:0,class:"nav-item"},ts=["href"],ns={key:1,class:"nav-item mega-dropdown"},ss={class:"mega-menu"},ls={class:"mega-menu-container"},os={class:"mega-menu-header"},is={class:"mega-menu-content"},as={key:0,class:"mega-menu-column mega-menu-links"},rs=["href"],us={class:"mega-menu-category"},cs={key:1,class:"mega-menu-category-title"},ds={class:"mega-menu-items"},ms={key:0,class:"mega-menu-subcategory"},fs={class:"mega-menu-subcategory-title"},ps={class:"mega-menu-subitems"},hs=["href"],ks=["href"],gs={key:2},_s={class:"d-none d-lg-flex align-items-center gap-3 ms-3"},vs={key:0,class:"themed-some-links themed-some-expanded"},ys=["href","aria-label"],bs={key:1,class:"themed-some-collapsed"},$s=["aria-label"],Ms=["href","aria-label"],xs={class:"themed-lang-expanded"},Ts={class:"themed-lang-collapsed"},ws=["href"],Cs={class:"mobile-menu-panel-header"},Ls={class:"mobile-menu-content"},Ss={class:"mobile-menu-section"},As={class:"mobile-menu-footer"},Bs={key:0,class:"themed-some-links mobile"},Ds=["href","aria-label"],Ps=["href"],js=ee({__name:"ThemedHeader",props:{showSubsiteMenu:{type:Boolean}},async setup(b){let j,w;const _=b,{t:g}=te(),x=Ce(),{get:p}=Le(),c=$e(),d=se("siteData",()=>({})),N=Re(),A=se("mobileDrawer",()=>!1),J=fe(!1),z=fe(!1),F=k(()=>{const o=d.value?.staticUrl;return typeof o=="string"&&o.length>0?o:N.public.staticBase||""}),H=k(()=>{const o=d.value?.sections;return Array.isArray(o)?o:[]}),I=k(()=>!!d.value?.isJopoxSite),K=k(()=>Number(d.value?.siteCmsType)),M=k(()=>K.value===pe.BasicJopox),v=k(()=>{const o=d.value?.lockerRoomUrl;return typeof o=="string"&&o.length>0?o:"https://login.jopox.fi"}),P=k(()=>x.params.section||""),V=k(()=>H.value.find(o=>o.url===P.value)),E=k(()=>{const o=[{title:g("clubfrontPage"),url:"/"}];if(I.value&&H.value.length>0){const n=H.value[0]?.subsiteGroups||[];n.forEach(m=>{if(m.subsites?.length){const a=m.subsites.map(h=>({title:h.name||h.subsiteName,url:`/joukkueet/${h.id}`}));o.push({title:n.length>1?m.title:g("subsiteListing"),url:"#",children:a})}})}else H.value.forEach(n=>{if(n.portalType!==0)if(n.subsiteGroups?.length){const m=[];n.subsiteGroups.forEach(a=>{if(a.subsites?.length){const h=a.subsites.filter(i=>i.id&&i.name).map(i=>{const B=i.isLink?String(i.url||"#"):`/${n.url}/joukkueet/${i.id}`;return{title:i.name,url:B,external:i.isLink&&!!i.url&&i.url!=="#"&&!String(i.url).startsWith("/")}});n.subsiteGroups.length>1&&a.title?m.push({title:a.title,url:"#",children:h}):m.push(...h)}}),m.length?o.push({title:n.name,url:`/${n.url}`,children:m}):o.push({title:n.name,url:`/${n.url}`})}else o.push({title:n.name,url:`/${n.url}`})});return o});function R(o,n,m){const a=[];if(a.push({title:g("frontPage"),url:n?`/${n}`:"/"}),!o)return a;const h=n?`/${n}`:"",i=n?`/${n}/jaosto`:"/seura";function B(L){if(!L.title)return null;let u="#",T=!1;if(L.menuType===1&&L.id&&L.slug?u=`${i}/${L.id}/${L.slug}`:L.menuType===3&&(u=L.url||"#",T=!!u&&!u.startsWith("/")&&u!=="#"),L.children?.length){const D=L.children.map(Q=>B(Q)).filter(Q=>Q!==null);if(D.length)return{title:L.title,url:u,external:T,children:D}}return{title:L.title,url:u,external:T}}if(o.showSiteMenu){const L=o.siteMenus||[],u=[];if(L.forEach(T=>{const D=B(T);D&&u.push(D)}),u.push({title:g("newsListing"),url:`${h}/uutisarkisto`}),M.value){const T=o.sectionSportType??0;u.push({title:g(`sportTexts.${T}.subsiteCompetitionlist`),url:`${h}/ottelut`})}u.push({title:g("queriesListing"),url:`${h}/lomakkeet`}),u.push({title:g("documents"),url:`${h}/materiaalipankki`}),d.value?.hasLpReservations&&u.push({title:g("lpReservations"),url:`${h}/vuorovaraukset`}),u.push({title:g("dataPrivacy"),url:`${h}/tietosuojaseloste`}),u.length&&a.push({title:n?o.name:String(d.value?.officialShortName||d.value?.name||""),url:m||"#",children:u})}
1if((o.menus||[]).forEach(L=>{const u=B(L);u&&a.push(u)}),o.showContactsMenu){const L=o.contactMenus||[],u=[];L.forEach(T=>{const D=B(T);D&&u.push(D)}),M.value&&u.push({title:g("theOfficialsList"),url:`${h}/joukkueyhteydet`}),u.push({title:g("organisationListing"),url:`${h}/organisaatio`}),u.length&&a.push({title:g("contactInformationMenu"),url:"#",children:u})}return a}const oe=k(()=>{const o=V.value||(H.value.length>0?H.value[0]:null);return R(o,P.value)}),q=k(()=>{const o=x.params.subsiteId;return Array.isArray(o)?o[0]:o}),ce=k(()=>Se(x.params)),de=k(()=>q.value&&Ge(H.value,q.value)||""),ge=k(()=>q.value?Te(q.value,H.value):0),_e=k(()=>!q.value||!d.value?.subsiteMenus?[]:d.value.subsiteMenus[q.value]||[]);function me(o){const{base:n,name:m,sportType:a,dynamicMenus:h,bundleUrl:i}=o,B=[],f=T=>!!T&&T!=="#"&&!T.startsWith("/");function L(T){const D=T.menuType===3?T.url||"#":T.menuType===1&&T.id&&T.slug?`${n}sivut/${T.id}/${T.slug}`:"#";return{title:T.title,url:D,external:f(D)}}B.push({title:g("frontPage"),url:n});const u=[];for(const T of h)if(T.menuType===1&&T.id&&T.slug){const D={title:T.title,url:`${n}sivut/${T.id}/${T.slug}`};T.children?.length&&(D.children=T.children.filter(Q=>Q.title).map(L)),u.push(D)}else if(T.menuType===3){const D=T.url||"#";u.push({title:T.title,url:D,external:f(D)})}else if(T.title){const D={title:T.title,url:"#"};T.children?.length&&(D.children=T.children.filter(Q=>Q.title).map(L)),u.push(D)}return u.push({title:g("subsiteNewsList"),url:`${n}uutisarkisto`}),u.push({title:g(`sportTexts.${a}.subsiteCompetitionlist`),url:`${n}ottelut`}),u.push({title:g("queriesListing"),url:`${n}lomakkeet`}),u.push({title:g("documents"),url:`${n}materiaalipankki`}),u.push({title:g("dataPrivacy"),url:`${n}tietosuojaseloste`}),u.length&&B.push({title:m,url:i||"#",children:u}),B.push({title:g(`sportTexts.${a}.subsiteTeamlist`),url:`${n}#players`}),B.push({title:g("subsiteOfficialslist"),url:`${n}#officials`}),B}const ne=k(()=>!_.showSubsiteMenu||!q.value?[]:me({base:ce.value.linkAs,name:de.value,sportType:ge.value,dynamicMenus:_e.value})),ve=k(()=>_.showSubsiteMenu&&ne.value.length?ne.value:oe.value),ie=k(()=>q.value?P.value?`/${P.value}/joukkueet/${q.value}`:`/joukkueet/${q.value}`:P.value?`/${P.value}`:""),ae=k(()=>{const o=[];return x.params.section&&V.value?.name&&o.push(V.value.name),x.params.subsiteId&&de.value&&o.push(de.value),o.length||o.push(String(d.value?.officialShortName||d.value?.name||"")),o.filter(Boolean).join(" â ")}),Me=k(()=>M.value?{title:g("clubfrontPage"),url:"/",sideMenu:R(H.value[0],"","/")}:{title:ae.value,url:"",sideMenu:ve.value}),X=k(()=>{const o=new Map,n=new Map;H.value.forEach(h=>{h&&(h.url&&o.set(`/${h.url}`,h),(h.subsiteGroups||[]).forEach(i=>{(i.subsites||[]).forEach(B=>{B?.id&&(h.url&&!B.isLink&&n.set(`/${h.url}/joukkueet/${B.id}`,B),n.set(`/joukkueet/${B.id}`,B))})}))});const m=d.value?.subsiteMenus||{};function a(h){return h.map(i=>{const B=i.children?.length?{...i,children:a(i.children)}:{...i},f=o.get(i.url);if(f)return{...B,sideMenu:R(f,f.url,`/${f.url}`),childrenTitle:g("subsiteListingGroups")};const L=n.get(i.url);if(L){const u=String(L.id);return{...B,subsiteId:u,sideMenu:me({base:`${i.url}/`,name:i.title,sportType:Te(u,H.value),dynamicMenus:m[u]||[],bundleUrl:`${i.url}/`})}}return i.url==="#"&&B.children?.length?{...B,childrenTitle:g("subsiteListingGroups")}:B})}return a(E.value.filter(h=>h.url!=="/"))}),re=new Set;async function ye(o){const n=o?.subsiteId;if(!n||!d.value)return;d.value.subsiteMenus||(d.value.subsiteMenus={});const m=d.value.subsiteMenus;if(!(n in m))try{m[n]=await p(`/api/v1/navmenu/subsite/${n}/`,c.value||"fi"),re.add(n)}catch{}}ue(()=>c.value,()=>{const o=d.value?.subsiteMenus;o&&re.forEach(n=>{delete o[n]}),re.clear()});{const o=()=>{J.value=!1,z.value=!1};be(()=>document.addEventListener("click",o)),Pe(()=>document.removeEventListener("click",o))}const Z=k(()=>q.value?d.value?.subsiteSomeLinks?.[q.value]||[]:V.value?.id?d.value?.sectionSomeLinks?.[V.value.id]||[]:[]);return[j,w]=je(async()=>Ue(`subsite-menus-themed-${q.value}`,async()=>{const o=q.value;if(!o)return null;const n=c.value||"fi",m=await p(`/api/v1/navmenu/subsite/${o}/`,n);return d.value?.subsiteMenus&&(d.value.subsiteMenus[o]=m),m},{watch:[q,()=>c.value]})),await j,w(),ue([()=>
1V.value?.id,()=>d.value?.sectionSomeLinks],async([o])=>{if(!o)return;const n=d.value?.sectionSomeLinks;if(!(n&&o in n))try{const m=await p(`/api/website/some/section/${o}/`,c.value||"fi");d.value?.sectionSomeLinks&&(d.value.sectionSomeLinks[o]=m)}catch{}},{immediate:!0}),ue([()=>q.value,()=>d.value?.subsiteSomeLinks],async([o])=>{if(!o)return;const n=d.value?.subsiteSomeLinks;if(!(n&&o in n))try{const m=await p(`/api/website/some/subsite/${o}/`,c.value||"fi");d.value?.subsiteSomeLinks&&(d.value.subsiteSomeLinks[o]=m)}catch{}},{immediate:!0}),(o,n)=>{const m=le,a=an,h=wn;return e(),l("div",Cn,[s("header",Ln,[s("nav",Sn,[s("div",An,[G(m,{prefetch:!1,to:"/",class:"navbar-brand py-1"},{default:C(()=>[t(F)?(e(),l("img",{key:0,src:`${t(F)}/logos/logo-300.png`,alt:"Logo",height:"40"},null,8,Bn)):S("",!0)]),_:1}),s("div",Dn,[G(a),s("button",{class:"navbar-toggler border-0",onClick:n[0]||(n[0]=i=>A.value=!t(A))},[s("i",{class:Y(["fas",t(A)?"fa-times":"fa-bars"])},null,2)])]),s("div",Pn,[t(M)?(e(),l("ul",jn,[(e(!0),l($,null,O(t(E),(i,B)=>(e(),l($,{key:`team-${B}`},[i.children?(e(),l("li",Gn,[i.url&&i.url!=="#"?(e(),U(m,{key:0,prefetch:!1,to:i.url,class:"nav-link dropdown-toggle"},{default:C(()=>[y(r(i.title),1)]),_:2},1032,["to"])):(e(),l("a",{key:1,href:"#",class:"nav-link dropdown-toggle",onClick:n[1]||(n[1]=W(()=>{},["prevent"]))},r(i.title),1)),s("div",On,[s("div",En,[s("div",Rn,[s("h3",null,r(i.title),1)]),s("div",Fn,[i.children.filter(f=>!f.children&&f.url&&f.title).length?(e(),l("div",Hn,[(e(!0),l($,null,O(i.children.filter(f=>!f.children&&f.url&&f.title),(f,L)=>(e(),l($,{key:L},[f.external?(e(),l("a",{key:0,href:f.url,target:"_blank",rel:"noopener noreferrer",class:"mega-menu-link"},r(f.title),9,In)):(e(),U(m,{key:1,prefetch:!1,to:f.url,class:"mega-menu-link"},{default:C(()=>[y(r(f.title),1)]),_:2},1032,["to"]))],64))),128))])):S("",!0),(e(!0),l($,null,O(i.children.filter(f=>f.children&&f.children.length),(f,L)=>(e(),l("div",{key:L,class:"mega-menu-column"},[s("div",Jn,[f.url&&f.url!=="#"?(e(),U(m,{key:0,prefetch:!1,to:f.url,class:"mega-menu-category-title"},{default:C(()=>[y(r(f.title),1)]),_:2},1032,["to"])):(e(),l("span",qn,r(f.title),1)),s("ul",Wn,[(e(!0),l($,null,O(f.children.filter(u=>u.title),(u,T)=>(e(),l("li",{key:T},[u.children&&u.children.length?(e(),l("div",Vn,[s("span",zn,r(u.title),1),s("ul",Kn,[(e(!0),l($,null,O(u.children.filter(D=>D.url&&D.title),(D,Q)=>(e(),l("li",{key:Q},[D.external?(e(),l("a",{key:0,href:D.url,target:"_blank",rel:"noopener noreferrer"},r(D.title),9,Yn)):(e(),U(m,{key:1,prefetch:!1,to:D.url},{default:C(()=>[y(r(D.title),1)]),_:2},1032,["to"]))]))),128))])])):(e(),l($,{key:1},[u.external?(e(),l("a",{key:0,href:u.url,target:"_blank",rel:"noopener noreferrer"},r(u.title),9,Qn)):u.url&&u.url!=="#"?(e(),U(m,{key:1,prefetch:!1,to:u.url},{default:C(()=>[y(r(u.title),1)]),_:2},1032,["to"])):(e(),l("span",Xn,r(u.title),1))],64))]))),128))])])]))),128))])])])])):(e(),l("li",Un,[i.external?(e(),l("a",{key:0,href:i.url,target:"_blank",rel:"noopener noreferrer",class:"nav-link"},r(i.title),9,Nn)):(e(),U(m,{key:1,prefetch:!1,to:i.url,class:"nav-link"},{default:C(()=>[y(r(i.title),1)]),_:2},1032,["to"]))]))],64))),128))])):S("",!0),s("ul",Zn,[(e(!0),l($,null,O(t(ve),(i,B)=>(e(),l($,{key:`club-${B}`},[i.children?(e(),l("li",ns,[i.url&&i.url!=="#"?(e(),U(m,{key:0,prefetch:!1,to:i.url,class:"nav-link dropdown-toggle"},{default:C(()=>[y(r(i.title),1)]),_:2},1032,["to"])):(e(),l("a",{key:1,href:"#",class:"nav-link dropdown-toggle",onClick:n[2]||(n[2]=W(()=>{},["prevent"]))},r(i.title),1)),s("div",ss,[s("div",ls,[s("div",os,[s("h3",null,r(i.title),1)]),s("div",is,[i.children.filter(f=>!f.children&&f.url&&f.title).length?(e(),l("div",as,[(e(!0),l($,null,O(i.children.filter(f=>!f.children&&f.url&&f.title),(f,L)=>(e(),l($,{key:L},[f.external?(e(),l("a",{key:0,href:f.url,target:"_blank",rel:"noopener noreferrer",class:"mega-menu-link"},r(f.title),9,rs)):(e(),U(m,{key:1,prefetch:!1,to:f.url,class:"mega-menu-link"},{default:C(()=>[y(r(f.title),1)]),_:2},1032,["to"]))],64))),128))])):S("",!0),(e(!0),l($,null,O(i.children.filter(f=>f.children&&f.children.length),(f,L)=>(e(),l("div",{key:L,class:"mega-menu-column"},[s("div",us,[f.url&&f.url!=="#"?(e(),U(m,{key:0,prefetch:!1,to:f.url,class:"mega-menu-category-title"},{default:C(()=>
1[y(r(f.title),1)]),_:2},1032,["to"])):(e(),l("span",cs,r(f.title),1)),s("ul",ds,[(e(!0),l($,null,O(f.children.filter(u=>u.title),(u,T)=>(e(),l("li",{key:T},[u.children&&u.children.length?(e(),l("div",ms,[s("span",fs,r(u.title),1),s("ul",ps,[(e(!0),l($,null,O(u.children.filter(D=>D.url&&D.title),(D,Q)=>(e(),l("li",{key:Q},[D.external?(e(),l("a",{key:0,href:D.url,target:"_blank",rel:"noopener noreferrer"},r(D.title),9,hs)):(e(),U(m,{key:1,prefetch:!1,to:D.url},{default:C(()=>[y(r(D.title),1)]),_:2},1032,["to"]))]))),128))])])):(e(),l($,{key:1},[u.external?(e(),l("a",{key:0,href:u.url,target:"_blank",rel:"noopener noreferrer"},r(u.title),9,ks)):u.url?(e(),U(m,{key:1,prefetch:!1,to:u.url},{default:C(()=>[y(r(u.title),1)]),_:2},1032,["to"])):(e(),l("span",gs,r(u.title),1))],64))]))),128))])])]))),128))])])])])):(e(),l("li",es,[i.external?(e(),l("a",{key:0,href:i.url,target:"_blank",rel:"noopener noreferrer",class:"nav-link"},r(i.title),9,ts)):(e(),U(m,{key:1,prefetch:!1,to:i.url,class:"nav-link"},{default:C(()=>[y(r(i.title),1)]),_:2},1032,["to"]))]))],64))),128))])]),s("div",_s,[t(Z).length?(e(),l("div",vs,[(e(!0),l($,null,O(t(Z),i=>(e(),l("a",{key:i.someType,href:i.url,"aria-label":t(ke)(i.someType),target:"_blank",rel:"noopener noreferrer nofollow",class:"themed-some-link"},[s("i",{class:Y(t(he)(i.someType))},null,2)],8,ys))),128))])):S("",!0),t(Z).length?(e(),l("div",bs,[s("button",{class:"themed-some-toggle","aria-label":t(g)("socialMedia")||"Social media",onClick:n[3]||(n[3]=W(i=>J.value=!t(J),["stop"]))},[...n[12]||(n[12]=[s("i",{class:"fas fa-share-alt"},null,-1)])],8,$s),t(J)?(e(),l("div",{key:0,class:"themed-some-popup",onClick:n[5]||(n[5]=W(()=>{},["stop"]))},[(e(!0),l($,null,O(t(Z),i=>(e(),l("a",{key:i.someType,href:i.url,"aria-label":t(ke)(i.someType),target:"_blank",rel:"noopener noreferrer nofollow",class:"themed-some-link",onClick:n[4]||(n[4]=B=>J.value=!1)},[s("i",{class:Y(t(he)(i.someType))},null,2)],8,Ms))),128))])):S("",!0)])):S("",!0),s("div",xs,[G(a)]),s("div",Ts,[s("button",{class:"themed-lang-toggle","aria-label":"Language",onClick:n[6]||(n[6]=W(i=>z.value=!t(z),["stop"]))},[...n[13]||(n[13]=[s("i",{class:"fas fa-globe"},null,-1)])]),t(z)?(e(),l("div",{key:0,class:"themed-lang-popup",onClick:n[7]||(n[7]=W(()=>{},["stop"]))},[G(a,{vertical:""})])):S("",!0)]),s("a",{href:t(v),target:"_blank",rel:"noopener noreferrer",class:"btn btn-theme-primary",style:{"font-size":"0.8rem",padding:"6px 16px"}},r(t(g)("login")),9,ws)])])])]),t(A)?(e(),l("div",{key:0,class:"mobile-menu-backdrop",onClick:n[8]||(n[8]=i=>A.value=!1)})):S("",!0),s("aside",{class:Y(["mobile-menu-panel",{open:t(A)}])},[s("div",Cs,[G(m,{prefetch:!1,to:"/",class:"mobile-menu-home","aria-label":t(g)("clubfrontPage"),onClick:n[9]||(n[9]=i=>A.value=!1)},{default:C(()=>[...n[14]||(n[14]=[s("i",{class:"fas fa-home"},null,-1)])]),_:1},8,["aria-label"]),s("span",null,r(t(g)("menu")),1),s("button",{class:"mobile-menu-close",onClick:n[10]||(n[10]=i=>A.value=!1)},[...n[15]||(n[15]=[s("i",{class:"fas fa-times"},null,-1)])])]),s("div",Ls,[s("div",Ss,[G(h,{"root-owner":t(Me),"root-items":t(M)?t(X):[],"current-path":t(x).path,"open-at-url":t(ie),open:t(A),onClose:n[11]||(n[11]=i=>A.value=!1),onDrill:ye},null,8,["root-owner","root-items","current-path","open-at-url","open"])])]),s("div",As,[t(Z).length?(e(),l("div",Bs,[(e(!0),l($,null,O(t(Z),i=>(e(),l("a",{key:i.someType,href:i.url,"aria-label":t(ke)(i.someType),target:"_blank",rel:"noopener noreferrer nofollow",class:"themed-some-link"},[s("i",{class:Y(t(he)(i.someType))},null,2)],8,Ds))),128))])):S("",!0),s("a",{href:t(v),target:"_blank",class:"btn btn-theme-primary",style:{width:"100%",display:"block","text-align":"center"}},[n[16]||(n[16]=s("i",{class:"fas fa-user-lock me-2"},null,-1)),y(" "+r(t(g)("login")),1)],8,Ps)])],2)])}}}),Us=Object.assign(Ne(js,[["__scopeId","data-v-d0b92fcc"]]),{__name:"ThemedHeader"}),Ns=ee({__name:"ThemeAwareHeader",props:{showSubsiteMenu:{type:Boolean},isSubsiteFrontPage:{type:Boolean}},setup(b){const{isClassicTheme:j}=Fe();return(w,_)=>{const g=gt,x=qt,p=sn,c=Us;return t(j)?(e(),l($,{key:0},[G(g),b.showSubsiteMenu?(e(),U(p,{key:1,"is-subsite-front-page":b.isSubsiteFrontPage},null,8,["is-subsite-front-page"])):(e(),U(x,{key:0}))],64)):(e(),U(c,{key:1,"show-subsite-menu":b.showSubsiteMenu},null,8,["show-subsite-menu"]))}}}),Is=Object.assign(Ns,{__name:"ThemeAwareHeader"});export{pe as S,Is as _};
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.