PageSourceSearch

https://triathlon.org/_nuxt/BASZiOQ2.js

js triathlon.org collected 2026-09-24 09:01:41 UTC 15,482 bytes, 1 lines download raw bytes

1import{bd as X,bz as ve,bA as M,b6 as n,b7 as l,b8 as r,br as j,by as ee,bb as te,bg as e,bh as I,bc as A,b9 as b,be as $,bf as D,bw as G,bk as R,bj as k,bm as me,bD as ge,bP as ye,bt as le,b_ as xe,ba as L,bQ as _e,bR as ke,bi as we,bU as Se,bl as Ee,b5 as $e}from"./fkuu-W5h.js";import{u as re,d as oe,e as Ce,f as qe,S as ie,b as Te,_ as se}from"./DygWFFl6.js";import{c as He}from"./DhWLh6xd.js";import{a as ce,u as ue}from"./CTQHR4Z4.js";import{E as Ie}from"./CuU4Bu7R.js";import{_ as je}from"./DXAWd_ef.js";import{c as De,d as Re,a as de,i as Be,r as Pe,S as Le}from"./v56rSt0t.js";import{S as Ae}from"./BRjGnFHo.js";import{c as Ge,X as Ue}from"./DQDhvwn8.js";import{_ as Ne}from"./C8tdCacw.js";import"./N1g3rqSA.js";import"./3h4KjhmU.js";import"./BetwsVoi.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new o.Error().stack;s&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[s]="7bb91310-1428-45ee-a1a4-aba1c3cdb374",o._sentryDebugIdIdentifier="sentry-dbid-7bb91310-1428-45ee-a1a4-aba1c3cdb374")}catch{}})();const K=Ge("search-x",[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]),Fe={class:"group rounded-panel border border-line/40 bg-white p-4 transition-colors hover:border-primary-transitionBlue/50 sm:p-5"},ze={class:"min-w-0"},Me=["innerHTML"],Qe={class:"mt-1 text-sm text-ink-secondary"},Ve=["src"],Ke={key:0,class:"mt-0.5 text-xs text-ink-muted"},Oe={key:0,class:"ml-1 mt-4 border-l-2 border-primary-transitionBlue/20 pl-4 sm:pl-5"},Xe={key:0,class:"space-y-2.5 py-1","aria-hidden":"true"},Ye={key:1,class:"space-y-0.5"},Je={class:"min-w-0 font-medium sm:truncate"},We={class:"flex-none text-xs text-ink-muted"},Ze={key:2,class:"text-xs text-ink-muted"},ae=X({__name:"GlobalSearchEventGroup",props:{event:{},childEvents:{}},setup(o){const s=o,g=ce(),f=ue(),y=re(),i=R(()=>oe("events",s.event,y,f())),d=R(()=>(s.event.children_event_ids?.length??0)>0),c=R(()=>d.value?s.childEvents.getChildren(s.event.id):[]),w=R(()=>d.value&&s.childEvents.isLoading(s.event.id));ve(()=>{d.value&&s.childEvents.ensureChildren(s.event.id)});const S=k(!1);M(()=>i.value.image,()=>{S.value=!1});const u=R(()=>!!i.value.image&&!S.value);function h(v){return Ce(v,y)}function C(v){return qe(v.start_date,v.finish_date,f())}const q=R(()=>[...s.event.sport_categories??[]].slice(0,3).join(" · "));return(v,_)=>(n(),l("article",Fe,[r("div",ze,[(n(),j(ee(i.value.url?"a":"div"),{href:i.value.url??void 0,class:"inline-flex items-start gap-1.5"},{default:te(()=>[r("h3",{class:"text-base font-semibold leading-snug text-ink transition-colors group-hover:text-primary-transitionBlue [&_mark]:rounded-[3px] [&_mark]:bg-surface-tint [&_mark]:px-0.5 [&_mark]:font-bold [&_mark]:text-inherit",innerHTML:i.value.titleHtml},null,8,Me),i.value.url&&e(He)(i.value.url)?(n(),j(e(Ie),{key:0,class:"mt-1 h-3.5 w-3.5 flex-none text-ink-faint","aria-hidden":"true"})):I("",!0)]),_:1},8,["href"])),r("p",Qe,[A(b(i.value.meta.join(" · "))+" ",1),u.value?(n(),l("img",{key:0,src:i.value.image,alt:"",loading:"lazy",class:"ml-0.5 inline-block h-4 w-4 rounded-full object-cover align-text-bottom",onError:_[0]||(_[0]=m=>S.value=!0)},null,40,Ve)):I("",!0)]),q.value?(n(),l("p",Ke,b(q.value),1)):I("",!0)]),d.value?(n(),l("div",Oe,[w.value&&!c.value.length?(n(),l("div",Xe,[..._[1]||(_[1]=[r("div",{class:"h-3.5 w-2/3 animate-pulse rounded bg-surface-page"},null,-1),r("div",{class:"h-3.5 w-1/2 animate-pulse rounded bg-surface-page"},null,-1)])])):(n(),l("ul",Ye,[(n(!0),l($,null,D(c.value,m=>(n(),l("li",{key:m.objectID},[(n(),j(ee(h(m)?"a":"div"),{href:h(m)??void 0,class:G(["-mx-2 flex flex-col rounded-lg px-2 py-1.5 text-sm text-ink-secondary transition-colors sm:flex-row sm:items-baseline sm:justify-between sm:gap-3",h(m)?"hover:bg-surface-hover hover:text-primary-transitionBlue":""])},{default:te(()=>[r("span",Je,b(m.name),1),r("span",We,b(C(m)),1)]),_:2},1032,["href","class"]))]))),128))])),!w.value&&!c.value.length?(n(),l("p",Ze,b(o.event.children_event_ids?.length)+" "+b(e(g)("search.races")),1)):I("",!0)])):I("",!0)]))}}),et=["q","type","page"];function O(o,s){const g=o[s];return typeof g=="string"?g:""}
1function ne(o){const s=O(o,"type"),g=De(s)?s:"all",f=Number(O(o,"page")),y=g!=="all"&&Number.isInteger(f)&&f>1?f:1;return{q:O(o,"q").trim(),tab:g,page:y}}function tt(o){const s={};return o.q&&(s.q=o.q),o.tab!=="all"&&(s.type=o.tab),o.tab!=="all"&&o.page>1&&(s.page=String(o.page)),s}function st(){const o=me(),s=ge(),f=le().public.appEnv,y=k(""),i=k(""),d=k("all"),c=k(1),w=k({}),S=k([]),u=k([]),h=k(0),C=k(!1),q=k(null),v=k(!1),_=k([]),m=R(()=>Object.values(w.value).reduce((a,t)=>a+(t??0),0));let T=null,H=0;function Q(){const a=ne(o.query);y.value=a.q,i.value=a.q,d.value=a.tab,c.value=a.page}function U(){const a=et,t={};for(const[p,x]of Object.entries(o.query))!a.includes(p)&&typeof x=="string"&&(t[p]=x);Object.assign(t,tt({q:i.value,tab:d.value,page:c.value})),s.replace({query:t})}function N(a,t,p){return a==="videos"?t.filter(x=>Be(x.published_at,p)):a==="events"?t.filter(x=>!x.parent_event_id):t}async function P(){const a=i.value;if(a.length<ie){H++,w.value={},S.value=[],u.value=[],h.value=0,C.value=!1,v.value=!1;return}const t=++H;C.value=!0,q.value=null;try{const p=await Re(f);t===H&&(_.value=p);const x=Te({q:a,tab:d.value,page:c.value},{appEnv:f,now:new Date,types:p}),pe=de(),{results:be}=await pe.search({requests:x.requests});if(t!==H)return;const he=new Date,Y={},J=[];let W=[],Z=0;for(const[fe,F]of x.types.entries()){const B=be[fe];if(!B||!("hits"in B))continue;Y[F]=B.nbHits??0;const z=N(F,B.hits,he);d.value==="all"?z.length&&J.push({type:F,hits:z,nbHits:B.nbHits??z.length}):F===d.value&&(W=z,Z=B.nbPages??0)}w.value=Y,S.value=J,u.value=W,h.value=Z,v.value=!0}catch(p){if(t!==H)return;console.error("[useGlobalSearchResults] Search failed:",p),q.value=p,w.value={},S.value=[],u.value=[],h.value=0,v.value=!0}finally{t===H&&(C.value=!1)}}function V(a){a!==d.value&&(d.value=a,c.value=1)}function E(a){a===c.value||a<1||(c.value=a)}return Q(),M(y,a=>{T&&clearTimeout(T),T=setTimeout(()=>{const t=a.trim();t!==i.value&&(i.value=t,c.value=1)},300)}),M([i,d,c],()=>{U(),P()}),M(()=>o.query,()=>{const a=ne(o.query);a.q===i.value&&a.tab===d.value&&a.page===c.value||(y.value=a.q,i.value=a.q,d.value=a.tab,c.value=a.page)}),ye(()=>{T&&clearTimeout(T)}),P(),{searchInput:y,debouncedQuery:i,tab:d,page:c,counts:w,groups:S,tabHits:u,totalPages:h,totalHits:m,pending:C,error:q,hasSearched:v,availableTypes:_,setTab:V,setPage:E,refresh:P}}const at=50;function nt(){const s=le().public.appEnv,g=xe(new Map);function f(u){return g.has(u)||g.set(u,{events:[],loading:!1,loaded:!1}),g.get(u)}let y=[],i=null;function d(u){const h=f(u);h.loaded||h.loading||(h.loading=!0,y.push(u),i||(i=setTimeout(c,0)))}async function c(){i=null;const u=y;if(y=[],u.length!==0)try{const h=Pe(s),C=Le.events.filters,q=de(),{results:v}=await q.searchForHits({requests:u.map(_=>({indexName:h,query:"",hitsPerPage:at,filters:`${C} AND parent_event_id = ${_}`,analytics:!1}))});u.forEach((_,m)=>{const T=f(_);T.events=v[m]?.hits??[],T.loaded=!0})}catch(h){console.error(`[useSearchChildEvents] Failed to fetch children for parents ${u.join(", ")}:`,h)}finally{u.forEach(h=>{f(h).loading=!1})}}function w(u){return f(u).events}function S(u){return f(u).loading}return{ensureChildren:d,getChildren:w,isLoading:S}}const lt={class:"bg-white"},rt={class:"search-hero relative overflow-hidden"},ot={class:"relative z-10 mx-auto w-full max-w-5xl px-4 pb-20 pt-28 sm:px-6 md:pb-28 lg:pt-48"},it={class:"mb-3 text-xs font-bold uppercase tracking-[0.2em] text-secondary-dewGreen"},ct={class:"text-3xl font-bold text-white sm:text-4xl lg:text-5xl"},ut={class:"mt-3 min-h-5 text-sm font-medium text-white/70",role:"status","aria-live":"polite"},dt={class:"relative z-10 -mt-10 px-4 pb-16 sm:px-6 md:-mt-16 lg:px-10"},pt={class:"mx-auto max-w-5xl rounded-[24px] bg-white p-4 shadow-[0_-10px_30px_-14px_rgba(0,0,0,0.2)] sm:p-6 md:rounded-[40px] md:p-10"},bt={class:"relative mx-auto max-w-3xl"},ht=["placeholder","aria-label"],ft=["aria-label"],vt=["aria-label"],mt=["id","aria-selected","aria-controls","tabindex","disabled","onClick","onKeydown"],gt=["id","aria-labelledby"],yt={key:0,class:"flex flex-col items-center gap-3 py-20 text-center"},xt={class:"flex h-12 w-12 items-center justify-center rounded-full bg-surface-page text-ink-muted"},_t={class:"text-sm text-ink-secondary"},kt={key:1,"aria-hidden":"true"},wt={class:"flex-1 space-y-2"},St={key:2,class:"py-20 text-center text-sm text-ink-muted"},Et={key:3,class:"flex flex-col items-center gap-3 py-20 text-center"},$t={class:"flex h-12 w-12 items-center justify-center rounded-full bg-surface-page text-ink-muted"},Ct={class:"text-sm text-ink-secondary"},qt=["aria-label"],Tt={class:"mb-3 flex items-baseline justify-between gap-4 border-b border-surface-page pb-2"},Ht={class:"text-xs font-bold uppercase tracking-[0.14em] text-ink-muted"},It=["onClick"],jt={key:0,class:"space-y-3"},Dt={key:0,class:"flex flex-col items-center gap-3 py-20 text-center"},Rt={class:"flex h-12 w-12 items-center justify-center rounded-full bg-surface-page text-ink-muted"},Bt={class:"text-sm text-ink-secondary"},Pt=X({__name:"GlobalSearchResults",setup(o){const s=ce(),g=ue(),f=re(),y=nt(
1),{searchInput:i,debouncedQuery:d,tab:c,page:w,counts:S,groups:u,tabHits:h,totalPages:C,totalHits:q,pending:v,error:_,hasSearched:m,availableTypes:T,setTab:H,setPage:Q}=st(),U=R(()=>[{id:"all",label:s("search.tabs.all"),count:null},...T.value.map(E=>({id:E,label:s(`search.tabs.${E}`),count:S.value[E]??0}))]);function N(E,a){return oe(E,a,f,g())}function P(E,a){const t=E.key==="ArrowRight"?1:E.key==="ArrowLeft"?-1:0;if(!t)return;E.preventDefault();const p=U.value,x=p[(a+t+p.length)%p.length];x&&(H(x.id),document.getElementById(`global-search-tab-${x.id}`)?.focus())}function V(){i.value=""}return(E,a)=>(n(),l("div",lt,[r("section",rt,[a[1]||(a[1]=r("div",{class:"search-hero-grad","aria-hidden":"true"},null,-1)),r("div",ot,[r("p",it,b(e(s)("search.title")),1),r("h1",ct,[e(d)?(n(),l($,{key:0},[A(b(e(s)("search.resultsFor"))+" “"+b(e(d))+"” ",1)],64)):(n(),l($,{key:1},[A(b(e(s)("search.placeholder")),1)],64))]),r("p",ut,[e(m)&&!e(v)?(n(),l($,{key:0},[A(b(e(q).toLocaleString())+" "+b(e(s)("search.results")),1)],64)):I("",!0)])])]),r("div",dt,[r("div",pt,[r("div",bt,[L(e(Ae),{class:"pointer-events-none absolute left-5 top-1/2 h-5 w-5 -translate-y-1/2 text-ink-muted","aria-hidden":"true"}),_e(r("input",{"onUpdate:modelValue":a[0]||(a[0]=t=>we(i)?i.value=t:null),type:"text",placeholder:e(s)("search.placeholder"),"aria-label":e(s)("search.title"),class:"w-full rounded-chip border border-transparent bg-surface-page py-3.5 pl-12 pr-12 text-base text-ink transition-colors placeholder:text-ink-faint focus:border-primary-transitionBlue focus:bg-white focus:outline-none focus:ring-2 focus:ring-primary-transitionBlue/20",enterkeyhint:"search",autocomplete:"off"},null,8,ht),[[ke,e(i)]]),e(i)?(n(),l("button",{key:0,type:"button",class:"absolute right-4 top-1/2 flex h-7 w-7 -translate-y-1/2 items-center justify-center rounded-full text-ink-muted transition-colors hover:bg-surface-hover hover:text-ink focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-transitionBlue","aria-label":e(s)("search.clear"),onClick:V},[L(e(Ue),{class:"h-4 w-4","aria-hidden":"true"})],8,ft)):I("",!0)]),r("div",{role:"tablist","aria-label":e(s)("search.title"),class:"no-scrollbar -mx-1 mt-6 flex gap-1 overflow-x-auto border-b border-surface-page px-1 sm:mt-8"},[(n(!0),l($,null,D(U.value,(t,p)=>(n(),l("button",{id:`global-search-tab-${t.id}`,key:t.id,type:"button",role:"tab","aria-selected":e(c)===t.id,"aria-controls":`global-search-panel-${t.id}`,tabindex:e(c)===t.id?0:-1,disabled:t.count===0&&e(m),class:G(["-mb-px flex flex-none items-center gap-1.5 whitespace-nowrap border-b-2 px-3 pb-3 pt-1 text-sm font-semibold transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-primary-transitionBlue disabled:cursor-not-allowed disabled:opacity-35",e(c)===t.id?"border-primary-transitionBlue text-primary-transitionBlue":"border-transparent text-ink-muted hover:text-ink"]),onClick:x=>e(H)(t.id),onKeydown:x=>P(x,p)},[A(b(t.label)+" ",1),t.count!==null&&e(m)?(n(),l("span",{key:0,class:G(["rounded-full px-1.5 py-0.5 text-[11px] font-bold leading-none transition-colors",e(c)===t.id?"bg-surface-tint text-primary-transitionBlue":"bg-surface-page text-ink-muted"])},b(t.count.toLocaleString()),3)):I("",!0)],42,mt))),128))],8,vt),r("div",{id:`global-search-panel-${e(c)}`,role:"tabpanel","aria-labelledby":`global-search-tab-${e(c)}`,class:"mt-6 sm:mt-8"},[e(_)?(n(),l("div",yt,[r("span",xt,[L(e(K),{class:"h-5 w-5","aria-hidden":"true"})]),r("p",_t,b(e(s)("search.error")),1)])):e(v)&&!e(m)?(n(),l("div",kt,[(n(),l($,null,D(6,t=>r("div",{key:t,class:"flex animate-pulse items-center gap-4 py-3"},[a[3]||(a[3]=r("div",{class:"h-11 w-11 flex-none rounded-panel bg-surface-page"},null,-1)),r("div",wt,[r("div",{class:"h-3.5 rounded bg-surface-page",style:Se({width:`${72-t*6}%`})},null,4),a[2]||(a[2]=r("div",{class:"h-3 w-1/3 rounded bg-surface-page"},null,-1))])])),64))])):e(m)?e(c)==="all"&&!e(u).length?(n(),l("div",Et,[r("span",$t,[L(e(K),{class:"h-5 w-5","aria-hidden":"true"})]),r("p",Ct,b(e(s)("search.noResults"))+" “"+b(e(d))+"” ",1)])):e(c)==="all"?(n(!0),l($,{key:4},D(e(u),t=>(n(),l("section",{key:t.type,class:"mb-10 last:mb-0","aria-label":e(s)(`search.tabs.${t.type}`)}
1,[r("div",Tt,[r("h2",Ht,b(e(s)(`search.tabs.${t.type}`)),1),t.nbHits>t.hits.length?(n(),l("button",{key:0,type:"button",class:"text-xs font-bold text-primary-transitionBlue transition-colors hover:text-secondary-oceanBlue",onClick:p=>e(H)(t.type)},b(e(s)("search.viewAll"))+" "+b(t.nbHits.toLocaleString())+" → ",9,It)):I("",!0)]),t.type==="events"?(n(),l("div",jt,[(n(!0),l($,null,D(t.hits,p=>(n(),j(ae,{key:p.objectID,event:p,"child-events":e(y)},null,8,["event","child-events"]))),128))])):(n(!0),l($,{key:1},D(t.hits,p=>(n(),j(se,{key:p.objectID,type:t.type,display:N(t.type,p)},null,8,["type","display"]))),128))],8,qt))),128)):(n(),l($,{key:5},[!e(h).length&&!e(v)?(n(),l("div",Dt,[r("span",Rt,[L(e(K),{class:"h-5 w-5","aria-hidden":"true"})]),r("p",Bt,b(e(s)("search.noResults"))+" “"+b(e(d))+"” ",1)])):e(c)==="events"?(n(),l("div",{key:1,class:G(["space-y-3 transition-opacity",{"opacity-60":e(v)}])},[(n(!0),l($,null,D(e(h),t=>(n(),j(ae,{key:t.objectID,event:t,"child-events":e(y)},null,8,["event","child-events"]))),128))],2)):(n(),l("div",{key:2,class:G(["transition-opacity",{"opacity-60":e(v)}])},[(n(!0),l($,null,D(e(h),t=>(n(),j(se,{key:t.objectID,type:e(c),display:N(e(c),t)},null,8,["type","display"]))),128))],2)),e(C)>1?(n(),j(e(je),{key:3,class:"mt-10","current-page":e(w),"total-pages":e(C),"back-label":e(s)("search.previousPage"),"next-label":e(s)("search.nextPage"),onPageChanged:e(Q)},null,8,["current-page","total-pages","back-label","next-label","onPageChanged"])):I("",!0)],64)):(n(),l("div",St,b(e(d).length<e(ie)?e(s)("search.minChars"):""),1))],8,gt)])])]))}}),Lt=Ne(Pt,[["__scopeId","data-v-a1ffcb5b"]]),Jt=X({__name:"search",setup(o){const{t:s}=Ee();return $e({title:()=>s("search.title"),meta:[{name:"robots",content:"noindex, nofollow"}]}),(g,f)=>(n(),j(Lt))}});export{Jt 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.