import{u as V}from"../chunks/useGlobalStorage.B7aqgx7w.js";import{s as D,e as C,a as v,b as $,t as E}from"../chunks/legacy.BFrtrUTY.js";import{az as ne,aA as se,aB as re,h as oe,j as K,k as ie,l as le,i as ce,m as ge,Z as de,aC as ue,p as T,aD as f,aE as Z,f as k,a as N,t as J,g as t,aF as A,b as P,y as b,ay as fe,s as B,c as S,r as U}from"../chunks/index.Chpxrmiw.js";import{e as me,i as he,s as M,L as ve,h as pe,j as _e,k as q,d as Le}from"../chunks/index.svelte_svelte_type_style_lang.oHDPoyLK.js";import{n as W,p as j,s as O,i as be}from"../chunks/i18n.0wDcOIDs.js";import"../chunks/dataset.DUSx8dem.js";import{a as ye,s as F}from"../chunks/render.Ar8LJN-r.js";import{i as G}from"../chunks/lifecycle.D2RV742y.js";import{p as R,i as Y}from"../chunks/index-client.D0CpKjVb.js";import{p as z}from"../chunks/stores.BFKSzYcT.js";import{b as Q,i as xe}from"../chunks/entry.RF0qnniz.js";function ke(s,e,c){K&&ie();var r=s,a=de,o,i=ne()?se:re;oe(()=>{i(a,a=e())&&(o&&le(o),o=ce(()=>c(r)))}),K&&(r=ge)}const Ae=ue;function Pe(s,e){return s.protocol!==e.protocol?e.href:e.password||e.username?"//"+[e.username,e.password].filter(Boolean).join(":")+"@"+e.host+e.pathname+e.search+e.hash:s.host!==e.host?"//"+e.host+e.pathname+e.search+e.hash:e.pathname+e.search+e.hash}function we(s,e,c){const r=new URL(c??"/",e).pathname;return s.origin!==e.origin||!s.pathname.startsWith(r)}var Ie=E('<link rel="alternate">');function Se(s,e){T(e,!1);const c=D(),r=()=>$(z,"$page",c),a=A(),o=A(),i=A(),h=W(Q,new URL(r().url))||"/";let n=R(e,"availableLanguageTags",8),g=R(e,"strategy",8),L=R(e,"currentLang",8);const p=(d,l)=>{const _=[];for(const w of n()){const I=l.getLocalisedPath(d,w),x=O(I,h,void 0),m=new URL(x,new URL(r().url)).href;_.push(m)}return _};f(()=>r(),()=>{P(a,j(r().url.pathname,h)[0])}),f(()=>(b(g()),t(a),b(L())),()=>{P(o,g().getCanonicalPath(t(a),L()))}),f(()=>(t(o),b(g())),()=>{P(i,p(t(o),g()))}),Z(),G();var y=C(),u=k(y);Y(u,()=>n().length>=1,d=>{var l=C(),_=k(l);me(_,1,()=>t(i),he,(w,I,x)=>{var m=Ie();J(()=>{M(m,"hreflang",n()[x]),M(m,"href",t(I))}),v(w,m)}),v(d,l)}),v(s,y),N()}const Ue=(s,e)=>`${ve}=${s};Path=${e};SameSite=lax;Max-Age=31557600`;function Ce(s,e){T(e,!1);const c=D(),r=()=>$(z,"$page",c),a=A(),o=A(),i=W(Q,new URL(r().url))||"/";let h=R(e,"languageTag",24,()=>{}),n=R(e,"i18n",8),g=A(0);function L(u,d){try{const l=new URL(fe(z).url),[_,w]=j(l.pathname,i),I=n().strategy.getCanonicalPath(_,t(a)),x=new URL(l);x.pathname=O(I,i,w);const m=new URL(u,new URL(x));if(we(m,l,i)||n().config.exclude(m.pathname))return u;const X=d??t(a),[ee,ae]=j(m.pathname,i),te=n().strategy.getLocalisedPath(ee,X),H=new URL(m);return H.pathname=O(te,i,ae),Pe(l,H)}catch{return u}}pe({translateHref:L}),f(()=>(b(h()),b(n()),r()),()=>{P(a,h()??n().getLanguageFromUrl(r().url))}),f(()=>(b(n()),t(a)),()=>{n().config.runtime.setLanguageTag(t(a))}),f(()=>t(a),()=>{document.documentElement.lang=t(a)}),f(()=>(b(n()),t(a)),()=>{document.documentElement.dir=n().config.textDirection[t(a)]??"ltr"}),f(()=>(t(a),t(g)),()=>{t(a)&&P(g,t(g)+1)}),f(()=>(t(a),t(g),q),()=>{t(a)&&(t(g)>1||Ae)&&xe(q)}),f(()=>t(a),()=>{P(o,t(a))}),f(()=>t(a),()=>{document.cookie=Ue(t(a),i)}),Z(),G();var p=C();ye(u=>{var d=C(),l=k(d);Y(l,()=>n().config.seo.noAlternateLinks!==!0&&!n().config.exclude(r().url.pathname),_=>{Se(_,{get availableLanguageTags(){return n().config.runtime.availableLanguageTags},get strategy(){return n().strategy},get currentLang(){return t(a)}})}),v(u,d)});var y=k(p);ke(y,()=>t(o),u=>{var d=C(),l=k(d);_e(l,e,"default",{},null),v(u,d)}),v(s,p),N()}const Re=V(),$e=async()=>({globalStorage:Re}),Je=Object.freeze(Object.defineProperty({__proto__:null,load:$e},Symbol.toStringTag,{value:"Module"}));var Ee=E('<div class="flex-shrink-0"><img src="https://cdn.prod.website-files.com/62cd5ce03261cba217188442/66dac501fd78a930ac173a39_Logo%20light-short.png" alt="Logo" class="h-8"></div>');function Te(s){var e=Ee();v(s,e)}var Ne=E('<header><div class="border-grey-200 flex items-center justify-between border-b bg-gradient-to-r from-blue-500 p-4 text-white"><!> <div class="flex flex-col items-end p-4 text-black"><div> </div> <div> </div></div></div></header>');function Be(s,e){T(e,!1);const c=D(),r=()=>$(o,"$selectedSampleIds",c),a=()=>$(i,"$selectedAnnotationIds",c),{selectedSampleIds:o,selectedAnnotationIds:i}=V();G();var h=Ne(),n=S(h),g=S(n);Te(g);var L=B(g,2),p=S(L),y=S(p);U(p);var u=B(p,2),d=S(u);U(u),U(L),U(n),U(h),J(()=>{F(y,`Selected Samples: ${r().size??""}`),F(d,`Selected Annotations: ${a().size??""}`)}),v(s,h),N()}var je=E("<!> <!>",1);function We(s,e){T(e,!0),Ce(s,{i18n:be,children:(c,r)=>{var a=je(),o=k(a);Be(o,{});var i=B(o,2);Le(i,()=>e.children),v(c,a)},$$slots:{default:!0}}),N()}export{We as component,Je as universal};
