const i=async t=>{const a=await t.getFile();return a.handle=t,a};var p=async(t=[{}])=>{Array.isArray(t)||(t=[t]);const a=[];t.forEach((e,s)=>{a[s]={description:e.description||"",accept:{}},e.mimeTypes?e.mimeTypes.map(c=>{a[s].accept[c]=e.extensions||[]}):a[s].accept["*/*"]=e.extensions||[]});const n=await window.showOpenFilePicker({id:t[0].id,startIn:t[0].startIn,types:a,multiple:t[0].multiple||!1,excludeAcceptAllOption:t[0].excludeAcceptAllOption||!1}),l=await Promise.all(n.map(i));return t[0].multiple?l:l[0]};export{p as default};
