1import{_ as q,c as h,r as d,aa as I,N as H,o as l,h as a,i as o,k,t as i,F as y,j,z as L,l as p,A as Q,H as U}from"./DgkDjtrN.js";const G={class:"prof"},J={key:0,class:"prof__state"},K={key:1,class:"prof__state prof__state--big"},R={class:"prof__fields"},W=["onClick"],X={key:0,class:"prof__chip-code"},Y={class:"prof__chip-name"},Z={class:"prof__chip-num"},ss={id:"prof-list",class:"prof__board"},es={key:0,class:"prof__mobile-select"},ts={class:"prof__mobile-list"},os=["onClick"],ls={class:"prof__num-pill"},as={class:"prof__directions"},is={class:"prof__directions-head"},ns={class:"prof__num-pill prof__num-pill--ghost"},rs={key:0,class:"prof__state"},cs={key:1,class:"prof__state prof__state--muted"},us={key:2,class:"prof__directions-list"},_s=["onClick"],ds={class:"prof__dir-name"},ps={class:"prof__num-pill"},fs={class:"prof__programs"},vs={class:"prof__programs-head"},ms={class:"prof__programs-title"},hs={key:0,class:"prof__num-pill prof__num-pill--accent"},ys={key:0,class:"prof__search"},gs=["placeholder"],bs=["aria-label"],ks={key:1,class:"prof__state"},js={key:2,class:"prof__state prof__state--big"},ws={key:3,class:"prof__state prof__state--big"},Cs={key:4,class:"prof__programs-grid"},Ps={class:"prof__card-head"},Ds={key:0,class:"prof__card-code"},As={class:"prof__card-name"},Ns={key:0,class:"prof__card-subjects"},Ls={key:0,class:"prof__subject"},Ms={class:"prof__subject-label"},$s={class:"prof__subject-value"},Bs={key:1,class:"prof__subject"},Fs={class:"prof__subject-label"},Vs={class:"prof__subject-value"},xs={__name:"ProfListBlockV2",props:{data:{type:Object,default:()=>({})},lang:{type:String,default:"kz"}},setup(T){const g=T,M={kz:{loading:"ÐүкÑелÑдеâ¦",empty:"ÐаÒÑÑÑÐ°Ñ ÑабÑлмадÑ",directions:"ÐайÑÐ½Ð´Ð°Ñ Ð±Ð°ÒÑÑÑаÑÑ",subject1:"1-ÑÑ Ð±ÐµÐ¹ÑндÑк пÓн",subject2:"2-ÑÑ Ð±ÐµÐ¹ÑндÑк пÓн",noPrograms:"ÐаÒдаÑÐ»Ð°Ð¼Ð°Ð»Ð°Ñ ÑабÑлмадÑ",noDirections:"ÐаÒÑÑÑÐ°Ñ Ð¶Ð¾Ò",searchPlaceholder:"ÐаÒдаÑÐ»Ð°Ð¼Ð°Ð½Ñ Ð°ÑÐ°Ñ Ð½ÐµÐ¼ÐµÑе кодпен ÑздеÑâ¦",clear:"ТазалаÑ",noMatch:"ÐÑÑеңе ÑабÑлмадÑ"},ru:{loading:"ÐагÑÑзкаâ¦",empty:"ÐапÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½Ðµ найденÑ",directions:"ÐапÑÐ°Ð²Ð»ÐµÐ½Ð¸Ñ Ð¿Ð¾Ð´Ð³Ð¾Ñовки",subject1:"1-й пÑоÑилÑнÑй пÑедмеÑ",subject2:"2-й пÑоÑилÑнÑй пÑедмеÑ",noPrograms:"ÐÑогÑÐ°Ð¼Ð¼Ñ Ð½Ðµ найденÑ",noDirections:"ÐапÑавлений неÑ",searchPlaceholder:"ÐоиÑк пÑогÑÐ°Ð¼Ð¼Ñ Ð¿Ð¾ Ð½Ð°Ð·Ð²Ð°Ð½Ð¸Ñ Ð¸Ð»Ð¸ кодÑâ¦",clear:"ÐÑиÑÑиÑÑ",noMatch:"ÐиÑего не найдено"},en:{loading:"Loadingâ¦",empty:"No fields found",directions:"Training directions",subject1:"1st profile subject",subject2:"2nd profile subject",noPrograms:"No programs found",noDirections:"No directions",searchPlaceholder:"Search programs by name or codeâ¦",clear:"Clear",noMatch:"Nothing found"}},r=t=>(M[g.lang]||M.kz)[t]||t,$=h(()=>{var e,s,n;const t=((s=(e=g.data)==null?void 0:e.params)==null?void 0:s.degree)??((n=g.data)==null?void 0:n.degree);return typeof t=="string"&&t?t:"6B"}),w=d(!1),C=d(!1),P=d(!1),f=d([]),c=d([]),u=d([]),b=d(0),m=d(0),v=d(""),S=h(()=>f.value[b.value]||null),D=h(()=>c.value[m.value]||null),B=h(()=>D.value?_(D.value):""),A=h(()=>{const t=v.value.trim().toLowerCase();return t?u.value.filter(e=>{const s=String(e.code||"").toLowerCase(),n=_(e).toLowerCase();return s.includes(t)||n.includes(t)}):u.value});I(()=>{var t;return(t=D.value)==null?void 0:t.id},()=>{v.value=""});function _(t){return(t==null?void 0:t[`name_${g.lang}`])||(t==null?void 0:t.name_kz)||(t==null?void 0:t.name_ru)||(t==null?void 0:t.name_en)||""}async function F(){w.value=!0;try{const t=await $fetch("/api/v2/professions/fields",{params:{degree:$.value},responseType:"json"});f.value=t&&Array.isArray(t.items)?t.items:[],b.value=0,f.value.length?await V(f.value[0].id):(c.value=[],u.value=[])}catch{f.value=[]}finally{w.value=!1}}async function V(t){var e;C.value=!0;try{const s=await $fetch("/api/v2/professions/directions",{params:{field_id:t},responseType:"json"}),n=s&&Array.isArray(s.items)?s.items:((e=s==null?void 0:s.items)==null?void 0:e.items)||[];c.value=Array.isArray(n)?n:[],m.value=0,c.value.length?await x(c.value[0].id):u.value=[]}catch{c.value=[]}finally{C.value=!1}}async function x(t){var e;P.value=!0;try{const s=await $fetch("/api/v2/professions/programs",{params:{direction_id:t},responseType:"json"}),n=s&&Array.isArray(s.items)?s.items:((e=s==null?void 0:s.items)==null?void 0:e.items)||[];u.value=Array.isArray(n)?n:[]}catch{u.value=[]}finally{P.value=!1}}function E(t){var s;b.value=t;const e=f.value[t];e&&V(e.id),window.matchMedia("(max-width: 900px)").matches&&((s=document.getElementById("prof-list"))==null||s.scrollIntoView({behavior:"smooth",block:"start"}))}function z(t){m.value=t;const e=c.value[t];e&&x(e.id)}function O(t){var s;const e=(s=t==null?void 0:t.target)==null?void 0:s.closest("details");e&&(e.open=!1)}return H(F),I($,F),(t,e)=>(l(),a("div",G,[w.value?(l(),a("div",J,[e[3]||(e[3]=o("i",{class:"pi pi-spin pi-spinner"},null,-1)),k(" "+i(r("loading")),1)])):f.value.length?(l(),a(y,{key:2},[o("div",R,[(l(!0),a(y,null,j(f.value,(s,n)=>(l(),a("button",{key:s.id,type:"button",class:L(["prof__chip",{"prof__chip--active":b.value===n}]),onClick:N=>E(n)}
1,[s.code?(l(),a("span",X,i(s.code),1)):p("",!0),o("span",Y,i(_(s)),1),o("span",Z,i(s.total||0),1)],10,W))),128))]),o("div",ss,[c.value.length?(l(),a("details",es,[o("summary",null,[o("span",null,[e[5]||(e[5]=o("i",{class:"pi pi-list"},null,-1)),k(" "+i(r("directions"))+": ",1),o("strong",null,i(B.value||"â"),1)]),e[6]||(e[6]=o("i",{class:"pi pi-chevron-down prof__mobile-chev"},null,-1))]),o("ul",ts,[(l(!0),a(y,null,j(c.value,(s,n)=>(l(),a("li",{key:s.id},[o("button",{type:"button",class:L({active:m.value===n}),onClick:N=>{z(n),O(N)}},[o("span",null,i(_(s)),1),o("span",ls,i(s.total||0),1)],10,os)]))),128))])])):p("",!0),o("aside",as,[o("div",is,[e[7]||(e[7]=o("i",{class:"pi pi-sitemap"},null,-1)),o("span",null,i(r("directions")),1),o("span",ns,i(c.value.length),1)]),C.value?(l(),a("div",rs,[e[8]||(e[8]=o("i",{class:"pi pi-spin pi-spinner"},null,-1)),k("Â "+i(r("loading")),1)])):c.value.length?(l(),a("ul",us,[(l(!0),a(y,null,j(c.value,(s,n)=>(l(),a("li",{key:s.id},[o("button",{type:"button",class:L({active:m.value===n}),onClick:N=>z(n)},[o("span",ds,i(_(s)),1),o("span",ps,i(s.total||0),1)],10,_s)]))),128))])):(l(),a("div",cs,i(r("noDirections")),1))]),o("section",fs,[o("header",vs,[o("h3",ms,[e[9]||(e[9]=o("i",{class:"pi pi-graduation-cap"},null,-1)),o("span",null,i(B.value||_(S.value)),1)]),u.value.length?(l(),a("span",hs,i(A.value.length)+"/"+i(u.value.length),1)):p("",!0)]),u.value.length>3?(l(),a("div",ys,[e[11]||(e[11]=o("i",{class:"pi pi-search prof__search-icon"},null,-1)),Q(o("input",{"onUpdate:modelValue":e[0]||(e[0]=s=>v.value=s),type:"text",placeholder:r("searchPlaceholder"),class:"prof__search-input"},null,8,gs),[[U,v.value]]),v.value?(l(),a("button",{key:0,type:"button",class:"prof__search-clear","aria-label":r("clear"),onClick:e[1]||(e[1]=s=>v.value="")},e[10]||(e[10]=[o("i",{class:"pi pi-times"},null,-1)]),8,bs)):p("",!0)])):p("",!0),P.value?(l(),a("div",ks,[e[12]||(e[12]=o("i",{class:"pi pi-spin pi-spinner"},null,-1)),k("Â "+i(r("loading")),1)])):u.value.length?A.value.length?(l(),a("div",Cs,[(l(!0),a(y,null,j(A.value,s=>(l(),a("article",{key:s.id,class:"prof__card"},[o("header",Ps,[s.code?(l(),a("span",Ds,i(s.code),1)):p("",!0),o("h4",As,i(_(s)),1)]),s.profile_subject||s.second_profile_subject?(l(),a("div",Ns,[s.profile_subject?(l(),a("div",Ls,[o("span",Ms,i(r("subject1")),1),o("span",$s,i(_(s.profile_subject)),1)])):p("",!0),s.second_profile_subject?(l(),a("div",Bs,[o("span",Fs,i(r("subject2")),1),o("span",Vs,i(_(s.second_profile_subject)),1)])):p("",!0)])):p("",!0)]))),128))])):(l(),a("div",ws,[e[14]||(e[14]=o("i",{class:"pi pi-search-minus"},null,-1)),o("div",null,i(r("noMatch")),1),o("button",{type:"button",class:"prof__search-reset",onClick:e[2]||(e[2]=s=>v.value="")},i(r("clear")),1)])):(l(),a("div",js,[e[13]||(e[13]=o("i",{class:"pi pi-folder-open"},null,-1)),o("div",null,i(r("noPrograms")),1)]))])])],64)):(l(),a("div",K,[e[4]||(e[4]=o("i",{class:"pi pi-inbox"},null,-1)),o("div",null,i(r("empty")),1)]))]))}},Is=q(xs,[["__scopeId","data-v-a284b407"]]);export{Is 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.