async function asyncFileRead(file) {
  return new Promise((resolve, reject) => {
    const reader = new FileReader();
    reader.addEventListener('load', () => {
      resolve(reader.result);
    });
    reader.addEventListener('error', () => {
      reject(reader.error ?? new Error('Cannot read file'));
    });
    reader.readAsDataURL(file);
  });
}

export { asyncFileRead };
//# sourceMappingURL=asyncFileRead.mjs.map
