1import{y as v,cz as M,q as O,a$ as R,d as n,c as V,w as s,e as r,j as p,f as h,E as _,m as u,F as g,C,k as d,p as $,s as q,a as F,u as H,r as x,o as W,b as L,x as I,g as P,V as k,h as U}from"./DHGTtAq-.js";import{T as z}from"./BfwYQQl3.js";import{V as G}from"./DN0MYjD1.js";import{V as J}from"./CKyHcaV6.js";import{s as K}from"./Dm3hKkcr.js";import{_ as Q}from"./Cwqjo5jo.js";import{u as j}from"./CsLWVD8V.js";import{V as X}from"./gpOH439E.js";import{V as Z}from"./DOEOSaDp.js";import"./BosuxZz1.js";import"./DGSkRdLu.js";import"./m2BY_hTd.js";const ee={class:"mb-0 text-h6"},te={class:"px-2 pb-2"},ae=["src"],se={key:1},re={class:"text-grey text-body-2"},ne={class:"text-grey text-body-2"},le={__name:"archiveCard",props:{survey:{type:Object,required:!0}},setup(o){const a=o,m=v(()=>a.survey.link?a.survey.year:new z(a.survey.created_at).format("MM d Y")),w=v(()=>{switch(a.survey.state){case"closed":return"Closed";case"active":return"Active";case"results":return"Results"}}),y=v(()=>{switch(a.survey.state){case"closed":return{color:"error",icon:R};case"active":return{color:"success",icon:O};case"results":return{color:"warning",icon:M}}});return(f,A)=>(n(),V(J,{rounded:"lg",class:"fill-height flexcard",to:o.survey.id==="1gxnklOvzw74Ymz5"?{name:"survey-salary-survey-2023"}:{name:"survey-id",params:{id:o.survey.id}}},{default:s(()=>[r(p,{class:"pa-2 bg-slight","no-gutters":"",justify:"space-between"},{default:s(()=>[h("p",ee,_(o.survey.name),1)]),_:1}),r(G),h("div",te,[r(p,{align:"center",justify:"center","no-gutters":"",class:"my-8"},{default:s(()=>[(n(!0),u(g,null,C(o.survey.client_logo||[],b=>(n(),u(g,null,[o.survey.link?(n(),u("span",se,_(o.survey.client_name),1)):(n(),u("img",{key:0,style:{"max-width":"100%","max-height":"35px"},src:b},null,8,ae))],64))),256))]),_:1}),r(p,{justify:"space-between",align:"center","no-gutters":""},{default:s(()=>[h("span",re,_(d(m)),1),h("div",null,[r(p,{"no-gutters":"",align:"center"},{default:s(()=>[r($,{size:"18px",class:"mr-1",color:d(y).color,icon:d(y).icon},null,8,["color","icon"]),h("span",ne,_(d(w)),1)]),_:1})])]),_:1})])]),_:1},8,["to"]))}},ve={__name:"index",async setup(o){let a,m;const w=q(),y=F(),f=H(),{fetchSurveyArchive:A,fetchSurveyArchiveNew:b}=K(),S=x(P("surveys"));W(()=>{f.setAdUnit(S.value.desktop.leaderboard),f.addPageDesktopAds([S.value.desktop.leaderboard])}),L({title:"Survey Archive | ITWeb",link:[{rel:"canonical",href:y.domain+w.path}],meta:[{hid:"description",name:"description",content:"Browse the ITWeb survey archive for past and current industry surveys, results, and insights from leading South African ICT research and analysis."}]}),[a,m]=I(()=>j("surveys",()=>A(),{transform:l=>l.reduce((e,t)=>{if(t.name.length>3&&t.params.mailer.client_name.length>3){let c=t.params.mailer?t.params.mailer.client_logo.split(","):"",i={id:t.id,state:t.state,name:t.name,created_at:t.created_at,client_name:t.params.mailer.client_name,client_logo:c||"",header:"https://www.itweb.co.za/static"+t.params.header,year:Number(t.year),link:t.link||null};e.push(i)}return e},[])})),a=await a,m();const{data:D}=([a,m]=I(()=>j("surveys2",()=>b(),{transform:l=>l.filter(e=>e.state!==3&&e.show_archive).map(e=>{var c,i,N,B;let t="results";switch(e.state){case 1:t="active";break;case 2:t="results";break;case 0:t="closed";break}return{id:e.id,state:t,name:e.name,created_at:e.created_at,client_name:e.agreement.owner.name,client_logo:[(B=(N=(i=(c=e==null?void 0:e.agreement)==null?void 0:c.params)==null?void 0:i.path)==null?void 0:N.logo)==null?void 0:B.serving_url],header:e.params.header,year:Number(new z(e.agreement.start_at).format("Y")),link:null,new:!0}})})),a=await a,m(),a),T=x([...D.value]);x([{title:"Surveys",url:"",disabled:!0}]);const Y=l=>T.value.filter(e=>e.year===l),E=v(()=>{let l=[];return T.value.forEach(e=>{let t=Number(e.year);l.push(t)}),l.filter((e,t,c)=>c.indexOf(e)===t).sort((e,t)=>e>t?-1:1)});return(l,e)=>(n(),V(d(Q),{"full-width":"",class:"mt-6"},{default:s(()=>[r(p,{class:"fill-height pb-4"},{default:s(()=>[r(k,{cols:"12"},{default:s(()=>e[0]||(e[0]=[h("h1",{class:"text-center mb-0"},"Survey archive",-1)])),_:1}),(n(!0),u(g,null,C(d(E),(t,c)=>(n(),u(g,null,[r(k,{cols:"12"},{default:s(()=>[r(X,{rounded:"lg",color:"accent"},{default:s(()=>[r(Z,{class:"headline font-weight-medium"},{default:s(()=>[U(_(t),1)]),_:2},1024)]),_:2},1024)]),_:2},1024),(n(!0),u(g,null,C(Y(t),i=>(n(),V(k,{cols:"12",sm:"6",lg:"4",xl:"3",key:i.id},{default:s(()=>[r(d(le),{survey:i,class:"fill-height"},null,8,["survey"])]),_:2},1024))),128))],64))),256))]),_:1})]),_:1}))}};export{ve 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.