var e=async(e=[{}])=>(Array.isArray(e)||(e=[e]),new Promise((t,n)=>{let r=document.createElement(`input`);r.type=`file`;let i=[...e.map(e=>e.mimeTypes||[]),...e.map(e=>e.extensions||[])].join();r.multiple=e[0].multiple||!1,r.accept=i||``;let a=e=>{typeof o==`function`&&o(),t(e)},o=e[0].legacySetup&&e[0].legacySetup(a,()=>o(n),r);r.addEventListener(`change`,()=>{a(r.multiple?Array.from(r.files):r.files[0])}),r.click()}));export{e as default};