{"version":3,"file":"csv-X___nH5w.js","sources":["../../../app/frontend/entrypoints/admin/lib/csv.js"],"sourcesContent":["export function countCSVRows(file) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n\n reader.onload = (event) => {\n const csvContent = event.target.result;\n const rows = csvContent.split(\"\\n\").filter((row) => row.trim() !== \"\"); // Ignore empty lines\n resolve(rows.length); // Resolve the promise with the number of rows\n };\n\n reader.onerror = (error) => {\n reject(error); // Reject the promise if there's an error\n };\n\n reader.readAsText(file); // Read the file as text\n });\n}\n"],"names":["countCSVRows","file","resolve","reject","reader","event","rows","row","error"],"mappings":"AAAO,SAASA,EAAaC,EAAM,CACjC,OAAO,IAAI,QAAQ,CAACC,EAASC,IAAW,CACtC,MAAMC,EAAS,IAAI,WAEnBA,EAAO,OAAUC,GAAU,CAEzB,MAAMC,EADaD,EAAM,OAAO,OACR,MAAM;AAAA,CAAI,EAAE,OAAQE,GAAQA,EAAI,KAAM,IAAK,EAAE,EACrEL,EAAQI,EAAK,MAAM,CACzB,EAEIF,EAAO,QAAWI,GAAU,CAC1BL,EAAOK,CAAK,CAClB,EAEIJ,EAAO,WAAWH,CAAI,CAC1B,CAAG,CACH"}