exports.default=function(e){void 0===e&&(e=[{}]);try{return Array.isArray(e)||(e=[e]),Promise.resolve(new Promise(function(t,n){var r=document.createElement("input");r.type="file";var i=[].concat(e.map(function(e){return e.mimeTypes||[]}),e.map(function(e){return e.extensions||[]})).join();r.multiple=e[0].multiple||!1,r.accept=i||"";var c=function(e){"function"==typeof u&&u(),t(e)},u=e[0].legacySetup&&e[0].legacySetup(c,function(){return u(n)},r);r.addEventListener("change",function(){c(r.multiple?Array.from(r.files):r.files[0])}),r.click()}))}catch(e){return Promise.reject(e)}};
