var y=async(e=[{}])=>(Array.isArray(e)||(e=[e]),e[0].recursive=e[0].recursive||!1,new Promise((s,l)=>{const r=document.createElement("input");r.type="file",r.webkitdirectory=!0;const c=t=>{typeof i=="function"&&i(),s(t)},i=e[0].legacySetup&&e[0].legacySetup(c,()=>i(l),r);r.addEventListener("change",()=>{let t=Array.from(r.files);e[0].recursive?e[0].recursive&&e[0].skipDirectory&&(t=t.filter(a=>a.webkitRelativePath.split("/").every(n=>!e[0].skipDirectory({name:n,kind:"directory"})))):t=t.filter(a=>a.webkitRelativePath.split("/").length===2),c(t)}),r.click()}));export{y as default};
