this.webpackChunk([37],{1292:function(e,t,a){"use strict";a.r(t);var n=a(6),r=a(0),c=a.n(r),i=a(146),l=a(857),o=a(847),u=a(658),s=a(80),m=a(902),p=a(121),d=a(16),f=a(7),g=a(169),v=a.n(g),E=a(433),S=a(76),b=Object(i.a)((function(){return{compact:{paddingRight:0,paddingTop:0,paddingBottom:0}}})),h=["clipPos","flags"];function y(e){var t=b(),a=e.feature.flags;return c.a.createElement(E.BaseCard,Object.assign({},e,{title:"Flags"}),c.a.createElement(E.SimpleValue,{name:"Flag",value:a}),c.a.createElement(l.a,null,["read paired","read mapped in proper pair","read unmapped","mate unmapped","read reverse strand","mate reverse strand","first in pair","second in pair","not primary alignment","read fails platform/vendor quality checks","read is PCR or optical duplicate","supplementary alignment"].map((function(e,n){var r=a&1<<n,i="".concat(e,"_").concat(r);return c.a.createElement(o.a,{key:i,control:c.a.createElement(u.a,{className:t.compact,checked:Boolean(r),name:e,readOnly:!0}),label:e})}))))}function O(e){var t=e.value,a=Object(r.useState)(!1),i=Object(n.a)(a,2),l=i[0],o=i[1],u=String(t);return u.length>100?c.a.createElement(c.a.Fragment,null,c.a.createElement("button",{type:"button",onClick:function(){return v()(u)}},"Copy"),c.a.createElement("button",{type:"button",onClick:function(){return o((function(e){return!e}))}},l?"Show less":"Show more"),c.a.createElement("div",null,l?u:"".concat(u.slice(0,100),"..."))):c.a.createElement("div",null,u)}function j(e){var t=e.tag,a=e.model,r=Object(f.getSession)(a);return c.a.createElement(E.BaseCard,Object.assign({},e,{title:"Supplementary alignments"}),c.a.createElement(s.a,null,"List of supplementary alignment locations"),c.a.createElement("ul",null,t.split(";").filter((function(e){return!!e})).map((function(e,t){var i=e.split(","),l=Object(n.a)(i,4),o=l[0],u=l[1],s=l[2],p=function(e){for(var t=Object(S.parseCigar)(e),a=0,n=0;n<t.length;n+=2){var r=+t[n],c=t[n+1];"H"!==c&&"S"!==c&&"I"!==c&&(a+=r)}return a}(l[3]),d=Math.floor(p/5),f=+u,g=+u+p,v="".concat(o,":").concat(Math.max(1,f-d),"-").concat(g+d),E=f.toLocaleString("en-US"),b=g.toLocaleString("en-US"),h="".concat(o,":").concat(E,"-").concat(b," (").concat(s,")");return c.a.createElement("li",{key:"".concat(v,"-").concat(t)},c.a.createElement(m.a,{onClick:function(){var e=a.view;e?e.navToLocString(v):r.notify("No view associated with this feature detail panel anymore","warning")},href:"#"},h))}))))}function w(e){var t=e.locString,a=e.model,n=Object(f.getSession)(a);return c.a.createElement(m.a,{onClick:function(){var e=a.view;e?e.navToLocString(t):n.notify("No view associated with this feature detail panel anymore","warning")},href:"#"},t)}t.default=Object(d.observer)((function(e){var t=e.model,a=JSON.parse(JSON.stringify(t.featureData)),n=a.tags&&a.tags.SA||a.SA;return c.a.createElement(p.a,{"data-testid":"alignment-side-drawer"},c.a.createElement(E.FeatureDetails,Object.assign({},e,{omit:h,feature:a,formatter:function(e,a){return"next_segment_position"===a?c.a.createElement(w,{model:t,locString:e}):c.a.createElement(O,{value:e})}})),n?c.a.createElement(j,{model:t,tag:n}):null,c.a.createElement(y,Object.assign({feature:a},e)))}))}});
//# sourceMappingURL=37.036851d5f5ae716110a5.worker.js.map