{"version":3,"file":"getImage-mw0c6dJs.js","sources":["../../src/utils/getImage.ts"],"sourcesContent":["import { fileUrl } from '@/utils/fileUrl';\r\n\r\nexport const getImage = async (idPhoto: string): Promise => {\r\n return new Promise((resolve) => {\r\n const fileURL = fileUrl(idPhoto, 100, 100, 0);\r\n\r\n const img = new Image();\r\n img.src = fileURL;\r\n\r\n img.onload = () => {\r\n resolve(fileURL);\r\n };\r\n\r\n img.onerror = () => {\r\n resolve(null);\r\n };\r\n });\r\n};\r\n"],"names":["getImage","idPhoto","resolve","fileURL","fileUrl","img"],"mappings":"wCAEa,MAAAA,EAAW,MAAOC,GACpB,IAAI,QAASC,GAAY,CAC5B,MAAMC,EAAUC,EAAQH,EAAS,IAAK,IAAK,CAAC,EAEtCI,EAAM,IAAI,MAChBA,EAAI,IAAMF,EAEVE,EAAI,OAAS,IAAM,CACfH,EAAQC,CAAO,CAAA,EAGnBE,EAAI,QAAU,IAAM,CAChBH,EAAQ,IAAI,CAAA,CAChB,CACH"}