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