import{__awaiter as t,__generator as e}from'./../../ext-esm/tslib/tslib.es6.js';import{parse as r}from"papaparse";import*as n from"xlsx";var s=function(n){return t(void 0,void 0,void 0,(function(){var t;return e(this,(function(e){switch(e.label){case 0:return[4,fetch(n)];case 1:return[4,e.sent().text()];case 2:return t=e.sent(),[2,(s=t,r(s,{header:!0,dynamicTyping:!0,skipEmptyLines:!0}).data)]}var s}))}))},i=function(r){return t(void 0,void 0,void 0,(function(){return e(this,(function(t){switch(t.label){case 0:return[4,fetch(r)];case 1:return[4,t.sent().text()];case 2:return[2,t.sent()]}}))}))},a=function(s){return t(void 0,void 0,void 0,(function(){var t,i,a,o,u;return e(this,(function(e){switch(e.label){case 0:return[4,fetch(s)];case 1:return[4,e.sent().arrayBuffer()];case 2:return t=e.sent(),i=n.read(new Uint8Array(t),{type:"array"}),a=i.SheetNames[0],o=i.Sheets[a],u=n.utils.sheet_to_csv(o),[2,r(u).data]}}))}))};export{s as getCsvData,i as getTextData,a as getXlsxData};
