(this["webpackJsonp@jbrowse/web"]=this["webpackJsonp@jbrowse/web"]||[]).push([[10],{381:function(e,n,t){"use strict";t.r(n),t.d(n,"bufferToString",(function(){return f})),t.d(n,"parseCsvBuffer",(function(){return h})),t.d(n,"parseTsvBuffer",(function(){return b}));var r=t(89),a=t.n(r),u=t(91),i=t(83),o=t(92),c=t(613),s=t.n(c),m=t(84);function f(e){return new TextDecoder("utf-8",{fatal:!0}).decode(e)}function l(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()(Object(o.a)({noheader:!0,output:"csv"},n)).fromString(f(e))}function p(e,n,t){var r,a=e.rows[0].cells[n].text||"",u="Text";try{r=Object(m.parseLocString)(a,t)}catch(i){}return r&&r.refName&&"number"===typeof r.start?u="LocString":/^\d+(\.\d+)?$/.test(a)&&(u="Number"),u}function d(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},t=0,r={isLoaded:!0,rows:e.map((function(e,r){var a=r+(n.hasColumnNameLine?0:1);return e.length>t&&(t=e.length),{id:String(a),cells:e.map((function(e,n){return{columnNumber:n,text:e}}))}}))},a={};if(n.hasColumnNameLine&&void 0!==n.columnNameLineNumber){var u=r.rows.splice(n.columnNameLineNumber-1,1),o=Object(i.a)(u,1),c=o[0];c&&c.cells.forEach((function(e,n){a[n]=e.text||""}))}for(var s=[],f=[],l=function(e){f.push(e);var t=p(r,e,n.isValidRefName);"LocString"===t&&r.rows.forEach((function(t){var r=t.cells[e];r.extendedData=Object(m.parseLocString)(r.text,n.isValidRefName)})),s[e]={name:a[e],dataType:{type:t}}},d=0;d<t;d+=1)l(d);return{rowSet:r,columnDisplayOrder:f,hasColumnNames:!!n.hasColumnNameLine,columns:s,assemblyName:n.selectedAssemblyName}}function h(e){return N.apply(this,arguments)}function N(){return(N=Object(u.a)(a.a.mark((function e(n){var t,r,u=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>1&&void 0!==u[1]?u[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,l(n);case 3:return r=e.sent,e.abrupt("return",d(r,t));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){return v.apply(this,arguments)}function v(){return(v=Object(u.a)(a.a.mark((function e(n){var t,r,u=arguments;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=u.length>1&&void 0!==u[1]?u[1]:{hasColumnNameLine:!1,columnNameLineNumber:1,isValidRefName:function(){return!1}},e.next=3,l(n,{delimiter:"\t"});case 3:return r=e.sent,e.abrupt("return",d(r,t));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}}]);
//# sourceMappingURL=10.fb4c126a.chunk.js.map