"use strict";(self.webpackChunk_jbrowse_web=self.webpackChunk_jbrowse_web||[]).push([[5997],{45997:function(e,r,t){t.r(r),t.d(r,{bufferToString:function(){return i},parseCsvBuffer:function(){return m},parseTsvBuffer:function(){return h}});var n=t(32723),u=t(33028),a=t(41361),o=t(96234),s=t(34795),c=t(81073);function i(e){return new TextDecoder("utf8",{fatal:!0}).decode(e)}function f(e){return l.apply(this,arguments)}function l(){return l=(0,s.Z)((0,n.Z)().mark((function e(r){var a,o,s=arguments;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=s.length>1&&void 0!==s[1]?s[1]:{},e.next=3,t.e(2745).then(t.t.bind(t,12745,23)).then((function(e){return e.default}));case 3:return o=e.sent,e.abrupt("return",o((0,u.Z)({noheader:!0,output:"csv"},a)).fromString(i(r)));case 5:case"end":return e.stop()}}),e)}))),l.apply(this,arguments)}function p(e,r,t){var n,u,a=e.rows[0].cells[r].text||"",o="Text";try{u=(0,c.parseLocString)(a,t)}catch(s){}return null!==(n=u)&&void 0!==n&&n.refName&&"number"===typeof u.start?o="LocString":/^\d+(\.\d+)?$/.test(a)&&(o="Number"),o}function d(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},t=r.hasColumnNameLine,n=void 0!==t&&t,u=r.columnNameLineNumber,s=void 0===u?1:u,i=r.isValidRefName,f=void 0===i?function(){return!1}:i,l=r.selectedAssemblyName,d=0,m={isLoaded:!0,rows:e.map((function(e,r){var t=r+(n?0:1);return e.length>d&&(d=e.length),{id:String(t),cells:e.map((function(e,r){return{columnNumber:r,text:e}}))}}))},v={};if(n&&void 0!==s){var h=m.rows.splice(s-1,1),w=(0,o.Z)(h,1)[0];w&&w.cells.forEach((function(e,r){v[r]=e.text||""}))}for(var b=[],y=[],x=0;x<d;x+=1){y.push(x);var Z=p(m,x,f);if("LocString"===Z){var g,N=(0,a.Z)(m.rows);try{for(N.s();!(g=N.n()).done;){var S=g.value.cells[x];S.extendedData=(0,c.parseLocString)(S.text,f)}}catch(k){N.e(k)}finally{N.f()}}b[x]={name:v[x],dataType:{type:Z}}}return{rowSet:m,columnDisplayOrder:y,hasColumnNames:!!n,columns:b,assemblyName:l}}function m(e,r){return v.apply(this,arguments)}function v(){return(v=(0,s.Z)((0,n.Z)().mark((function e(r,t){var u;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(r);case 2:return u=e.sent,e.abrupt("return",d(u,t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function h(e,r){return w.apply(this,arguments)}function w(){return(w=(0,s.Z)((0,n.Z)().mark((function e(r,t){var u;return(0,n.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f(r,{delimiter:"\t"});case 2:return u=e.sent,e.abrupt("return",d(u,t));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}}}]);
//# sourceMappingURL=5997.c0a23a67.chunk.js.map