1import{k as i,D as w,d as c,i as m,g as p,w as h,f as t,z as y,B as k,m as _,t as u,l as f,F as D,n as V,p as A,C as B}from"./index--eHl4n7C.js";import{_ as F}from"./SmallButton-DBNcUL9e.js";import{_ as L}from"./Spinner-DinxvipL.js";import{_ as O}from"./Download-ZBZcs1Ow.js";import{_ as $}from"./Dropdown-0lWQYOD1.js";const H={class:"inline-block relative"},T={class:"p-2"},M={class:"mb-1"},j={class:"font-medium text-sm text-gray-700 cursor-pointer"},P={class:"mb-2"},U={class:"font-medium text-sm text-gray-700 cursor-pointer"},z={key:0,class:"mb-2 border-t pt-2"},G={class:"font-semibold text-xs text-gray-600 mb-1"},J={class:"max-h-40 overflow-auto"},X={class:"font-medium text-sm text-gray-700 cursor-pointer"},q=["value","checked","onChange"],K=["disabled"],oe={__name:"DownloadResultsData",props:{audition:Object,round:Object,categories:{type:Array,default:()=>[]},preselectId:{type:Number,default:null}},setup(C){const o=C,d=JSON.parse(window.document.getElementById("frontEndLang").value);i(!1);const l=i(!1),g=i(!1),v=i(!1),r=i(o.preselectId!=null?[o.preselectId]:o.categories.map(e=>e.id)),I=e=>{const n=r.value.indexOf(e);n===-1?r.value.push(e):r.value.splice(n,1)};let b=null,x=0;const E=100,a=w({audition_id:null,round_number:null,includeForm:null,includeRubric:null,categoryIds:null}),N=w({}),R=()=>{l.value||r.value.length===0||(l.value=!0,x=0,a.audition_id=o.audition.id,a.round_number=o.round.round_number,a.includeForm=g.value,a.includeRubric=v.value,a.categoryIds=r.value,a.post(route("audres.export"),{onSuccess:function(e){S(e.token)},onError:function(e){console.log(e),l.value=!1}}).catch(function(e){console.log(e),l.value=!1}))},S=e=>{b=setInterval(function(){if(x++,x>E){clearInterval(b),l.value=!1,alert("Export timed out, please try again.");return}N.get(route("audres.export-status",{token:e,audition_id:o.audition.id,round_number:o.round.round_number})).then(function(n){n.ready&&(clearInterval(b),window.location.href=route("audres.export-download",{token:e,audition_id:o.audition.id,round_number:o.round.round_number,categoryIds:r.value}),l.value=!1)}).catch(function(n){console.log(n)})},3e3)};return(e,n)=>(c(),m("div",H,[p($,{align:"right",width:"w-72",onContentClick:!0},{trigger:h(()=>[p(O,{classes:"inline-block w-5 md:w-6 cursor-pointer",fill:"fill-green-600"})]),content:h(()=>[t("div",T,[t("div",M,[t("label",j,[y(t("input",{class:"cursor-pointer rounded-sm border-gray-300 text-green-600 shadow-xs focus:ring-green-600 mr-1","onUpdate:modelValue":n[0]||(n[0]=s=>g.value=s),type:"checkbox"},null,512),[[k,g.value]]),_(" "+u(f(d).IncRegEx),1)])]),t("div",P,[t("label",U,[y(t("input",{class:"cursor-pointer rounded-sm border-gray-300 text-green-600 shadow-xs focus:ring-green-600 mr-1","onUpdate:modelValue":n[1]||(n[1]=s=>v.value=s),type:"checkbox"},null,512),[[k,v.value]]),_(" "+u(f(d).IncRubEx),1)])]),o.categories.length>1?(c(),m("div",z,[t("div",G,u(f(d).Cats),1),t("div",J,[(c(!0),m(D,null,V(o.categories,s=>(c(),m("div",{key:s.id,class:"mb-1"},[t("label",X,[t("input",{class:"cursor-pointer rounded-sm border-gray-300 text-green-600 shadow-xs focus:ring-green-600 mr-1",type:"checkbox",value:s.id,checked:r.value.includes(s.id),onChange:Q=>I(s.id)},null,40,q),_(" "+u(s.title),1)])]))),128))])])):A("",!0),t("a",{onClick:R,disabled:l.value,class:"cursor-pointer ml-6"},[p(F,null,{default:h(()=>[y(p(L,{classes:"inline-block w-6 h-8 mx-auto mr-1",fill:"fill-black"},null,512),[[B,l.value]]),_(" "+u(f(d).DnlRes),1)]),_:1})],8,K)])]),_:1})]))}};export{oe 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.