PageSourceSearch

https://vc.ru/assets/HeaderCollectionNavigation.vue_vue_type_style_index_0_lang-CGAqLWXg.js

js vc.ru collected 2026-09-24 07:40:32 UTC 4,023 bytes, 1 lines download raw bytes

1import{v as h,e4 as p,d as $,a as c,b as v,L as k,c as y,f as d,d_ as B,w as L,p as g,F as N,e as V,m as U,t as j,ab as q,j as z,u as A,df as M,at as P,s as W,E as G,N as C,P as f,r as E,be as J,z as w}from"./index-DcSVvNrM.js";import{a as O}from"./CourseItem.vue_vue_type_style_index_0_lang-Cuth7S2B.js";import{u as X}from"./useLocale-BECgx5XS.js";function ne(n,u,a){return{collectionNavigationItems:h(()=>n.value.length===0?[]:u.value.reduce((r,b)=>{const l=n.value.find(t=>t.code===b);if(l===void 0)return r;const m=n.value.filter(t=>t.parentCode===l.code&&t.code!==(a==null?void 0:a.value)).map(t=>({title:t.seoTitleForH1,code:t.code,to:p({parentCollectionCode:l.code,childCollectionCode:t.code})}));return l.code!==(a==null?void 0:a.value)&&m.unshift({title:l.seoTitleForLists,code:l.code,to:p({parentCollectionCode:l.code})}),r.push({title:l.seoTitleForH1,code:l.code,to:p({parentCollectionCode:l.code}),children:m}),r},[]))}}const Y={class:"collection-navigation"},ae=$({__name:"CollectionNavigation",props:{items:{}},setup(n){return(u,a)=>(c(!0),v(N,null,k(n.items,s=>(c(),y(d(B),{key:s.code,title:s.title},{default:L(()=>[g("div",Y,[(c(!0),v(N,null,k(s.children,r=>(c(),v("div",{key:r.code,class:"collection-navigation__item"},[V(d(q),{to:r.to},{default:L(()=>[U(j(r.title),1)]),_:2},1032,["to"])]))),128))])]),_:2},1032,["title"]))),128))}}),Z={class:"island-top-schools"},le=$({__name:"IslandTopSchools",props:{title:{},schools:{}},setup(n){return(u,a)=>(c(),y(d(B),{title:n.title},{default:L(()=>[g("table",Z,[g("tbody",null,[(c(!0),v(N,null,k(n.schools,s=>(c(),v("tr",{key:s.id},[g("td",null,[V(O,{class:"island-top-schools__item",school:s},null,8,["school"])])]))),128))])])]),_:1},8,["title"]))}}),x={key:0,class:"header-collection-navigation__inputs"},se=$({__name:"HeaderCollectionNavigation",props:{collections:{},parentCollectionCode:{},childCollectionCode:{}},setup(n){const u=n,{t:a,p:s}=X(),r=z(),{open:b}=A(),l=h(()=>w(u.parentCollectionCode)||w(u.childCollectionCode)),m=E(""),t=M("rootElement"),_=E(null),S=h(()=>{const o=m.value.trim().toLowerCase(),e=u.collections.filter(i=>i.title.toLowerCase().includes(o)).map(i=>{const Q=w(i.parentCode)?p({parentCollectionCode:i.parentCode,childCollectionCode:i.code}):p({parentCollectionCode:i.code}),R=r.resolve(Q).href;return{value:i.code,label:i.title,details:s("courses.courseCounter",i.courseCounter),url:R}});return e.length===0&&e.push({label:a("common.nothingFound"),selectable:!1}),e}),D=h(()=>u.collections.filter(e=>e.parentCode===null).map(e=>({value:e.code,label:e.title,details:s("courses.courseCounter",e.courseCounter),url:r.resolve(p({parentCollectionCode:e.code,includeQuery:!0})).href}))),I=h(()=>u.collections.filter(e=>e.parentCode===u.parentCollectionCode).map(e=>({value:e.code,label:e.title,details:s("courses.courseCounter",e.courseCounter),url:r.resolve(p({parentCollectionCode:e.parentCode,childCollectionCode:e.code,includeQuery:!0})).href})));async function T(o){t.value!==null&&(_.value=await b(J,{data:S},{target:t.value,width:t.value.offsetWidth}))}function F(){var o;(o=_.value)==null||o.navigateDown()}function H(){var o;(o=_.value)==null||o.navigateUp()}function K(o){var e;(e=_.value)==null||e.navigateSubmit(o)}return(o,e)=>(c(),v("div",{ref_key:"rootElement",ref:t,class:"header-collection-navigation"},[l.value?(c(),v("div",x,[V(d(P),{"model-value":n.parentCollectionCode,options:D.value},null,8,["model-value","options"]),I.value.length>0?(c(),y(d(P),{key:0,"model-value":n.childCollectionCode,options:I.value,placeholder:d(a)("courses.searchPlaceholder")},null,8,["model-value","options","placeholder"])):W("",!0)])):(c(),y(d(G),{key:1,modelValue:m.value,"onUpdate:modelValue":e[0]||(e[0]=i=>m.value=i),placeholder:d(a)("courses.searchPlaceholder"),onClick:T,onKeydown:[C(f(F,["prevent"]),["down"]),C(f(H,["prevent"]),["up"]),C(f(K,["prevent"]),["enter"]),C(f(T,["prevent"]),["esc"]),C(f(F,["prevent"]),["tab"])]},null,8,["modelValue","placeholder","onKeydown"]))],512))}});export{se as _,le as a,ae as b,ne as u};

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.