diff --git a/inst/htmlwidgets/JBrowseR.js b/inst/htmlwidgets/JBrowseR.js index 868e1e4..8001cb5 100644 --- a/inst/htmlwidgets/JBrowseR.js +++ b/inst/htmlwidgets/JBrowseR.js @@ -1,2 +1,218 @@ /*! For license information please see JBrowseR.js.LICENSE.txt */ -(()=>{var e,t,r={7550:(e,t,r)=>{"use strict";r.d(t,{A:()=>ne});var n=function(){function e(e){var t=this;this._insertTag=function(e){var r;r=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,r),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var r=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?s(w,--b):0,v--,10===g&&(v=1,y--),g}function O(){return g=b2||k(g)>3?"":" "}function I(e,t){for(;--t&&O()&&!(g<48||g>102||g>57&&g<65||g>70&&g<97););return P(e,j()+(t<6&&32==E()&&32==O()))}function M(e){for(;O();)switch(g){case e:return b;case 34:case 39:34!==e&&39!==e&&M(g);break;case 40:41===e&&M(e);break;case 92:O()}return b}function R(e,t){for(;O()&&e+g!==57&&(e+g!==84||47!==E()););return"/*"+P(t,b-1)+"*"+i(47===e?e:O())}function N(e){for(;!k(E());)O();return P(e,b)}var F="-ms-",D="-moz-",B="-webkit-",z="comm",G="rule",U="decl",H="@keyframes";function V(e,t){for(var r="",n=d(e),o=0;o0&&p(D)-m&&h(g>32?K(D+";",n,r,m-1):K(c(D," ","")+";",n,r,m-2),d);break;case 59:D+=";";default:if(h(F=$(D,t,r,y,v,o,f,C,_=[],M=[],m),a),123===k)if(0===v)Q(D,t,F,F,_,a,m,f,M);else switch(99===b&&110===s(D,3)?100:b){case 100:case 108:case 109:case 115:Q(e,F,F,n&&h($(e,F,F,0,0,o,f,C,o,_=[],m),M),o,M,m,f,n?_:M);break;default:Q(D,F,F,F,[""],M,0,f,M)}}y=v=g=0,S=P=1,C=D="",m=u;break;case 58:m=1+p(D),g=w;default:if(S<1)if(123==k)--S;else if(125==k&&0==S++&&125==x())continue;switch(D+=i(k),k*S){case 38:P=v>0?1:(D+="\f",-1);break;case 44:f[y++]=(p(D)-1)*P,P=1;break;case 64:45===E()&&(D+=L(O())),b=E(),v=m=p(C=D+=N(j())),k++;break;case 45:45===w&&2==p(D)&&(S=0)}}return a}function $(e,t,r,n,i,a,l,s,p,h,y){for(var v=i-1,m=0===i?a:[""],b=d(m),g=0,w=0,A=0;g0?m[x]+" "+O:c(O,/&\f/g,m[x])))&&(p[A++]=E);return S(e,t,r,0===i?G:s,p,h,y)}function Y(e,t,r){return S(e,t,r,z,i(g),f(e,2,-2),0)}function K(e,t,r,n){return S(e,t,r,U,f(e,0,n),f(e,n+1,-1),n)}var J=function(e,t,r){for(var n=0,o=0;n=o,o=E(),38===n&&12===o&&(t[r]=1),!k(o);)O();return P(e,b)},X=new WeakMap,Z=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,r=e.parent,n=e.column===r.column&&e.line===r.line;"rule"!==r.type;)if(!(r=r.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||X.get(r))&&!n){X.set(e,!0);for(var o=[],a=function(e,t){return _(function(e,t){var r=-1,n=44;do{switch(k(n)){case 0:38===n&&12===E()&&(t[r]=1),e[r]+=J(b-1,t,r);break;case 2:e[r]+=L(n);break;case 4:if(44===n){e[++r]=58===E()?"&\f":"",t[r]=e[r].length;break}default:e[r]+=i(n)}}while(n=O());return e}(C(e),t))}(t,o),u=r.props,c=0,l=0;c6)switch(s(e,t+1)){case 109:if(45!==s(e,t+4))break;case 102:return c(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+D+(108==s(e,t+3)?"$3":"$2-$3"))+e;case 115:return~l(e,"stretch")?te(c(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==s(e,t+1))break;case 6444:switch(s(e,p(e)-3-(~l(e,"!important")&&10))){case 107:return c(e,":",":"+B)+e;case 101:return c(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===s(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+F+"$2box$3")+e}break;case 5936:switch(s(e,t+11)){case 114:return B+e+F+c(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+F+c(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+F+c(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+F+e+e}return e}var re=[function(e,t,r,n){if(e.length>-1&&!e.return)switch(e.type){case U:e.return=te(e.value,e.length);break;case H:return V([A(e,{value:c(e.value,"@","@"+B)})],n);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=/(::plac\w+|:read-\w+)/.exec(e))?e[0]:e}(t)){case":read-only":case":read-write":return V([A(e,{props:[c(t,/:(read-\w+)/,":-moz-$1")]})],n);case"::placeholder":return V([A(e,{props:[c(t,/:(plac\w+)/,":"+B+"input-$1")]}),A(e,{props:[c(t,/:(plac\w+)/,":-moz-$1")]}),A(e,{props:[c(t,/:(plac\w+)/,F+"input-$1")]})],n)}return""}))}}],ne=function(e){var t=e.key;if("css"===t){var r=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(r,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o,i,a=e.stylisPlugins||re,u={},c=[];o=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),r=1;r{"use strict";function n(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}r.d(t,{A:()=>n})},61334:(e,t,r)=>{"use strict";r.d(t,{C:()=>u,T:()=>s,_:()=>c,i:()=>i,w:()=>l});var n=r(41486),o=r(7550);r(19819),r(16286);var i=!0,a=n.createContext("undefined"!=typeof HTMLElement?(0,o.A)({key:"css"}):null),u=a.Provider,c=function(){return(0,n.useContext)(a)},l=function(e){return(0,n.forwardRef)((function(t,r){var o=(0,n.useContext)(a);return e(t,o,r)}))};i||(l=function(e){return function(t){var r=(0,n.useContext)(a);return null===r?(r=(0,o.A)({key:"css"}),n.createElement(a.Provider,{value:r},e(t,r))):e(t,r)}});var s=n.createContext({})},45748:(e,t,r)=>{"use strict";r.d(t,{AH:()=>l,i7:()=>s,mL:()=>c});var n=r(61334),o=r(41486),i=r(77604),a=r(16286),u=r(19819);r(7550),r(24129);var c=(0,n.w)((function(e,t){var r=e.styles,c=(0,u.J)([r],void 0,o.useContext(n.T));if(!n.i){for(var l,s=c.name,f=c.styles,p=c.next;void 0!==p;)s+=" "+p.name,f+=p.styles,p=p.next;var d=!0===t.compat,h=t.insert("",{name:s,styles:f},t.sheet,d);return d?null:o.createElement("style",((l={})["data-emotion"]=t.key+"-global "+s,l.dangerouslySetInnerHTML={__html:h},l.nonce=t.sheet.nonce,l))}var y=o.useRef();return(0,a.i)((function(){var e=t.key+"-global",r=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),n=!1,o=document.querySelector('style[data-emotion="'+e+" "+c.name+'"]');return t.sheet.tags.length&&(r.before=t.sheet.tags[0]),null!==o&&(n=!0,o.setAttribute("data-emotion",e),r.hydrate([o])),y.current=[r,n],function(){r.flush()}}),[t]),(0,a.i)((function(){var e=y.current,r=e[0];if(e[1])e[1]=!1;else{if(void 0!==c.next&&(0,i.sk)(t,c.next,!0),r.tags.length){var n=r.tags[r.tags.length-1].nextElementSibling;r.before=n,r.flush()}t.insert("",c,r,!1)}}),[t,c.name]),null}));function l(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{J:()=>y});var n={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=r(14796);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}var a=/[A-Z]|^ms/g,u=/_EMO_([^_]+?)_([^]*?)_EMO_/g,c=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!=typeof e},s=(0,o.A)((function(e){return c(e)?e:e.replace(a,"-$&").toLowerCase()})),f=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(u,(function(e,t,r){return d={name:t,styles:r,next:d},t}))}return 1===n[e]||c(e)||"number"!=typeof t||0===t?t:t+"px"};function p(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(i(r)){case"boolean":return"";case"object":if(1===r.anim)return d={name:r.name,styles:r.styles,next:d},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)d={name:n.name,styles:n.styles,next:d},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var o=0;o=4;++n,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(o){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(o)+l;return{name:s,styles:o,next:d}}},16286:(e,t,r)=>{"use strict";r.d(t,{i:()=>a,s:()=>i});var n=r(41486),o=!!n.useInsertionEffect&&n.useInsertionEffect,i=o||function(e){return e()},a=o||n.useLayoutEffect},77604:(e,t,r)=>{"use strict";function n(e,t,r){var n="";return r.split(" ").forEach((function(r){void 0!==e[r]?t.push(e[r]+";"):n+=r+" "})),n}r.d(t,{Rk:()=>n,SF:()=>o,sk:()=>i});var o=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},i=function(e,t,r){o(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},62777:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;rYe,Wg:()=>St});var a=function(){function e(t,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.blockPosition=t,this.dataPosition=r}var t,r,n;return t=e,n=[{key:"min",value:function(){for(var e,t=0,r=arguments.length,n=new Array(r),o=0;o0&&(e=n[t]);return e}}],(r=[{key:"toString",value:function(){return"".concat(this.blockPosition,":").concat(this.dataPosition)}},{key:"compareTo",value:function(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}])&&o(t.prototype,r),n&&o(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])throw new Error("big-endian virtual file offsets not implemented");return new a(1099511627776*e[t+7]+4294967296*e[t+6]+16777216*e[t+5]+65536*e[t+4]+256*e[t+3]+e[t+2],e[t+1]<<8|e[t])}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};return"aborted"in e?{signal:e}:e}function b(e,t){var r,n=[];if(0===e.length)return e;e.sort((function(e,t){var r=e.minv.blockPosition-t.minv.blockPosition;return 0===r?e.minv.dataPosition-t.minv.dataPosition:r}));var o,i,a,u=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(u.s();!(o=u.n()).done;){var c=o.value;(!t||c.maxv.compareTo(t)>0)&&(void 0===r?(n.push(c),r=c):(i=r,(a=c).minv.blockPosition-i.maxv.blockPosition<65e3&&a.maxv.blockPosition-i.minv.blockPosition<5e6?c.maxv.compareTo(r.maxv)>0&&(r.maxv=c.maxv):(n.push(c),r=c)))}}catch(e){u.e(e)}finally{u.f()}return n}function g(e,t){return{lineCount:function(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}(d().fromBytesLE(Array.prototype.slice.call(e,t,t+8),!0))}}function w(e,t){return e?e.compareTo(t)>0?t:e:t}function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function A(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function C(e,t){if(e){if("string"==typeof e)return _(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:T(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function M(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){M(i,n,o,a,u,"next",e)}function u(e){M(i,n,o,a,u,"throw",e)}a(void 0)}))}}function N(e,t){for(var r=0;r>26),1+((t-=1)>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}var V=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),D(this,t,arguments)}var r,n,o,i,a,c,l,s;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&G(e,t)}(t,e),r=t,n=[{key:"lineCount",value:(s=R(I().mark((function e(t,r){var n,o,i;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.parse(r);case 2:return i=e.sent,e.abrupt("return",(null===(o=null===(n=i.indices[t])||void 0===n?void 0:n.stats)||void 0===o?void 0:o.lineCount)||0);case 4:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"_parse",value:(l=R(I().mark((function e(t){var r,n,o,i,a,c,l,s,p,d,h,y,v,m,b,S,A,x,O,E,j;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.filehandle.readFile(t);case 2:if(21578050===(r=e.sent).readUInt32LE(0)){e.next=5;break}throw new Error("Not a BAI file");case 5:n=r.readInt32LE(4),o=37449,i=8,c=new Array(n),l=0;case 11:if(!(lo+1)){e.next=30;break}throw new Error("bai index contains too many bins, please use CSI");case 30:for(v=r.readInt32LE(i),i+=4,m=new Array(v),b=0;b3&&void 0!==g[3]?g[3]:{},i=16384,a=void 0!==r,e.next=5,this.parse(o);case 5:if(u=e.sent,c=u.indices[t]){e.next=9;break}return e.abrupt("return",[]);case 9:if(l=c.linearIndex,s=void 0===l?[]:l,f=c.stats,0!==s.length){e.next=12;break}return e.abrupt("return",[]);case 12:if(p=void 0===n?(s.length-1)*i:(w=n)-w%(S=i)+S,d=void 0===r?0:U(r,i),h=new Array(a?(p-d)/i:s.length-1),y=s[s.length-1].blockPosition,!(p>(s.length-1)*i)){e.next=18;break}throw new Error("query outside of range of linear index");case 18:for(v=s[d/i].blockPosition,m=d/i,b=0;m

3&&void 0!==j[3]?j[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.indices[t]){e.next=10;break}return e.abrupt("return",[]);case 10:u=H(r,n),c=[],l=k(u);try{for(l.s();!(s=l.n()).done;)for(f=P(s.value,2),p=f[0],d=f[1],h=p;h<=d;h++)if(a.binIndex[h]){y=a.binIndex[h],v=k(y);try{for(v.s();!(m=v.n()).done;)g=m.value,c.push(g)}catch(e){v.e(e)}finally{v.f()}}}catch(e){l.e(e)}finally{l.f()}for(w=a.linearIndex.length,A=Math.min(r>>14,w-1),x=Math.min(n>>14,w-1),O=A;O<=x;++O)(E=a.linearIndex[O])&&(!S||E.compareTo(S)<0)&&(S=E);return e.abrupt("return",b(c,S));case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return a.apply(this,arguments)})},{key:"parse",value:(i=R(I().mark((function e(){var t,r=this,n=arguments;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"hasRefSeq",value:(o=R(I().mark((function e(t){var r,n,o,i=arguments;return I().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}],n&&N(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(E),W=r(85832),q=r(76548),Q=r(12388),$=r(39962),Y=r(87791),K=r.n(Y),J=r(84137),X=r.n(J);function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=te(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function te(e,t){if(e){if("string"==typeof e)return re(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?re(e,t):void 0}}function re(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ae(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function ue(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ae(i,n,o,a,u,"next",e)}function u(e){ae(i,n,o,a,u,"throw",e)}a(void 0)}))}}function ce(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},r=0,n=0,o=[],i={},a=0;a=30?this.parseAuxData(n,16):void 0,c=n.readInt32LE(16+i),l=16+i+4,p=new Array(c),d=0;dthis.maxBinNumber)v=g(n,l+28),l+=44;else{for(s=w(s,u(n,l)),l+=8,S=n.readInt32LE(l),l+=4,A=new Array(S),x=0;x3&&void 0!==S[3]?S[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent,u=null==i?void 0:i.indices[t]){e.next=8;break}return e.abrupt("return",[]);case 8:if(0!==(c=this.reg2bins(r,n)).length){e.next=11;break}return e.abrupt("return",[]);case 11:l=[],s=ee(c);try{for(s.s();!(f=s.n()).done;)for(A=f.value,x=2,p=function(e){if(Array.isArray(e))return e}(A)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(A,x)||te(A,x)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y]){v=u.binIndex[y],m=ee(v);try{for(m.s();!(g=m.n()).done;)w=g.value,l.push(w)}catch(e){m.e(e)}finally{m.f()}}}catch(e){s.e(e)}finally{s.f()}return e.abrupt("return",b(l,new a(0,0)));case 15:case"end":return e.stop()}var A,x}),e,this)}))),function(e,t,r){return c.apply(this,arguments)})},{key:"reg2bins",value:function(e,t){(e-=1)<1&&(e=1),t>Math.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+he(e,i),c=o+he(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}},{key:"parse",value:(i=ue(ie().mark((function e(){var t,r=this,n=arguments;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.setupP||(this.setupP=this._parse(t).catch((function(e){throw r.setupP=void 0,e}))),e.abrupt("return",this.setupP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"hasRefSeq",value:(o=ue(ie().mark((function e(t){var r,n,o,i=arguments;return ie().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}],n&&ce(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(E);function ve(e){return ve="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ve(e)}function me(e,t){for(var r=0;r>16}var t,r;return t=e,(r=[{key:"get",value:function(e){return this[e]?(this.data[e]||(this.data[e]=this[e]()),this.data[e]):this._get(e.toLowerCase())}},{key:"end",value:function(){return this.get("start")+this.get("length_on_ref")}},{key:"seq_id",value:function(){return this._refID}},{key:"_get",value:function(e){return e in this.data||(this.data[e]=this._parseTag(e)),this.data[e]}},{key:"_tags",value:function(){var e=this;this._parseAllTags();var t=["seq"];this.isSegmentUnmapped()||t.push("start","end","strand","score","qual","MQ","CIGAR","length_on_ref","template_length"),this.isPaired()&&t.push("next_segment_position","pair_orientation"),t=t.concat(this._tagList||[]);for(var r=0,n=Object.keys(this.data);r>8;return 255===e?void 0:e}},{key:"score",value:function(){return this.get("mq")}},{key:"qual",value:function(){var e;return null===(e=this.qualRaw())||void 0===e?void 0:e.join(" ")}},{key:"qualRaw",value:function(){if(!this.isSegmentUnmapped()){var e=this.bytes,t=e.start,r=e.byteArray,n=t+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes"),o=this.get("seq_length");return r.subarray(n,n+o)}}},{key:"strand",value:function(){return this.isReverseComplemented()?-1:1}},{key:"multi_segment_next_segment_strand",value:function(){if(!this.isMateUnmapped())return this.isMateReverseComplemented()?-1:1}},{key:"name",value:function(){return this.get("_read_name")}},{key:"_read_name",value:function(){var e=this.get("_l_read_name"),t=this.bytes,r=t.byteArray,n=t.start;return r.toString("ascii",n+36,n+36+e-1)}},{key:"_parseTag",value:function(e){if(!this._allTagsParsed){for(var t,r=this.bytes,n=r.byteArray,o=r.start,i=this._tagOffset||o+36+this.get("_l_read_name")+4*this.get("_n_cigar_op")+this.get("_seq_bytes")+this.get("seq_length"),a=this.bytes.end;i>4)+we[15&y],i+=4}else for(var v=0;v>4)+we[15&b],i+=4}else for(var g=0;g>4,s=we[15&c];if("S"===s&&l===i)return o+=4,l=(c=t.readInt32LE(o))>>4,"N"!==(s=we[15&c])&&console.warn("CG tag with no N tag"),this.data.length_on_ref=l,this.get("CG");for(var f=0;f>4)+(s=we[15&c]),"H"!==s&&"S"!==s&&"I"!==s&&(u+=l),o+=4;return this.data.length_on_ref=u,a}}},{key:"length_on_ref",value:function(){return this.data.length_on_ref||this.get("cigar"),this.data.length_on_ref}},{key:"_n_cigar_op",value:function(){return 65535&this.get("_flag_nc")}},{key:"_l_read_name",value:function(){return 255&this.get("_bin_mq_nl")}},{key:"_seq_bytes",value:function(){return this.get("seq_length")+1>>1}},{key:"getReadBases",value:function(){return this.seq()}},{key:"seq",value:function(){for(var e=this.bytes,t=e.byteArray,r=e.start+36+this.get("_l_read_name")+4*this.get("_n_cigar_op"),n=this.get("_seq_bytes"),o=this.get("seq_length"),i="",a=0,u=0;u>4],++a0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return""}},{key:"_bin_mq_nl",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+12)}},{key:"_flag_nc",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+16)}},{key:"seq_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+20)}},{key:"_next_refid",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+24)}},{key:"_next_pos",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+28)}},{key:"template_length",value:function(){return this.bytes.byteArray.readInt32LE(this.bytes.start+32)}},{key:"toJSON",value:function(){for(var e={},t=0,r=Object.keys(this);te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split(/\r?\n/));try{for(o.s();!(t=o.n()).done;){var i=function(e){if(Array.isArray(e))return e}(r=t.value.split(/\t/))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||Ae(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i.slice(1);a&&n.push({tag:a.slice(1),data:u.map((function(e){var t=e.indexOf(":");return{tag:e.slice(0,t),value:e.slice(t+1)}}))})}}catch(e){o.e(e)}finally{o.f()}return n}function Ee(e){return Ee="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ee(e)}function je(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Pe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Pe(e,t){if(e){if("string"==typeof e)return ke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ke(e,t):void 0}}function ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Le(e){for(var t=1;t0&&void 0!==r[0]?r[0]:{},e.next=3,this.getHeader(t);case 3:return e.abrupt("return",this.header);case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"_readRefSeqs",value:(s=Fe(Ce().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t>r)){e.next=2;break}return e.abrupt("return",this._readRefSeqs(t,2*r,n));case 2:return o=r+65536,e.next=5,this.bam.read(W.Buffer.alloc(o),0,r,0,n);case 5:if(i=e.sent,a=i.bytesRead,u=i.buffer,a){e.next=10;break}throw new Error("Error reading refseqs from header");case 10:return e.next=12,(0,Q.unzip)(u.subarray(0,Math.min(a,r)));case 12:c=e.sent,l=c.readInt32LE(t),s=t+4,f={},p=[],d=0;case 18:if(!(dc.length)){e.next=28;break}return console.warn("BAM header is very big. Re-fetching ".concat(r," bytes.")),e.abrupt("return",this._readRefSeqs(t,2*r,n));case 28:d+=1,e.next=18;break;case 31:return e.abrupt("return",{chrToIndex:f,indexToChr:p});case 32:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return s.apply(this,arguments)})},{key:"getRecordsForRange",value:(l=Fe(Ce().mark((function e(t,r,n,o){return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",qe(this.streamRecordsForRange(t,r,n,o)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return l.apply(this,arguments)})},{key:"streamRecordsForRange",value:function(e,t,r,n){var o=this;return De(Ce().mark((function i(){var a,u,c;return Ce().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,ze(o.getHeader(n));case 2:if(void 0!==(u=null===(a=o.chrToIndex)||void 0===a?void 0:a[e])&&o.index){i.next=8;break}return i.next=6,[];case 6:i.next=12;break;case 8:return i.next=10,ze(o.index.blocksForRange(u,t-1,r,n));case 10:return c=i.sent,i.delegateYield(Ge(He(o._fetchChunkFeatures(c,u,t,r,n))),"t0",12);case 12:case"end":return i.stop()}}),i)})))()}},{key:"_fetchChunkFeatures",value:function(e,t,r,n){var o=this,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};return De(Ce().mark((function a(){var u,c,l,s,f,p,d,h,y,m,b;return Ce().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:u=i.viewAsPairs,c=[],l=!1,s=je(e),a.prev=4,s.s();case 6:if((f=s.n()).done){a.next=41;break}return p=f.value,a.next=10,ze(o.featureCache.get(p.toString(),{chunk:p,opts:i},i.signal));case 10:d=a.sent,h=[],y=je(d),a.prev=13,y.s();case 15:if((m=y.n()).done){a.next=26;break}if((b=m.value).seq_id()!==t){a.next=24;break}if(!(b.get("start")>=n)){a.next=23;break}return l=!0,a.abrupt("break",26);case 23:b.get("end")>=r&&h.push(b);case 24:a.next=15;break;case 26:a.next=31;break;case 28:a.prev=28,a.t0=a.catch(13),y.e(a.t0);case 31:return a.prev=31,y.f(),a.finish(31);case 34:return c.push(h),a.next=37,h;case 37:if(!l){a.next=39;break}return a.abrupt("break",41);case 39:a.next=6;break;case 41:a.next=46;break;case 43:a.prev=43,a.t1=a.catch(4),s.e(a.t1);case 46:return a.prev=46,s.f(),a.finish(46);case 49:if(v(i.signal),!u){a.next=53;break}return a.next=53,o.fetchPairs(t,c,i);case 53:case"end":return a.stop()}}),a,null,[[4,43,46,49],[13,28,31,34]])})))()}},{key:"fetchPairs",value:(c=Fe(Ce().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h,y,v=this;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=n.pairAcrossChr,i=n.maxInsertSize,a=void 0===i?2e5:i,u={},c={},r.map((function(e){var t,r,n,o={},i=je(e);try{for(i.s();!(t=i.n()).done;){var a=t.value,l=a.name(),s=a.id();o[l]||(o[l]=0),o[l]++,c[s]=1}}catch(e){i.e(e)}finally{i.f()}for(var f=0,p=Object.entries(o);f2&&void 0!==u[2]?u[2]:{},e.next=3,this.bam.read(W.Buffer.alloc(r),0,r,t,n);case 3:return o=e.sent,i=o.bytesRead,a=o.buffer,e.abrupt("return",a.subarray(0,Math.min(i,r)));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"_readChunk",value:(a=Fe(Ce().mark((function e(t){var r,n,o,i,a,u,c;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.chunk,n=t.opts,e.next=3,this._readRegion(r.minv.blockPosition,r.fetchedSize(),n);case 3:return o=e.sent,e.next=6,(0,Q.unzipChunkSlice)(o,r);case 6:return i=e.sent,a=i.buffer,u=i.cpositions,c=i.dpositions,e.abrupt("return",{data:a,cpositions:u,dpositions:c,chunk:r});case 11:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"readBamFeatures",value:(i=Fe(Ce().mark((function e(t,r,n,o){var i,a,u,c,l,s,f;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:i=0,a=[],u=0,c=+Date.now();case 4:if(!(i+4=n[u++];);u--}if(!(s0?256*r[u]+(i-n[u])+o.minv.dataPosition+1:q.A.signed(t.slice(i,s))}),a.push(f),!(this.yieldThreadTime&&+Date.now()-c>this.yieldThreadTime)){e.next=15;break}return e.next=14,y(1);case 14:c=+Date.now();case 15:i=s+1,e.next=4;break;case 18:return e.abrupt("return",a);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"hasRefSeq",value:(o=Fe(Ce().mark((function e(t){var r,n,o;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==o&&(null===(n=this.index)||void 0===n?void 0:n.hasRefSeq(o)));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"lineCount",value:(n=Fe(Ce().mark((function e(t){var r,n;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=null===(r=this.chrToIndex)||void 0===r?void 0:r[t],e.abrupt("return",void 0!==n&&this.index?this.index.lineCount(n):0);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"indexCov",value:(r=Fe(Ce().mark((function e(t,r,n){var o,i;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return i=null===(o=this.chrToIndex)||void 0===o?void 0:o[t],e.abrupt("return",void 0===i?[]:this.index.indexCov(i,r,n));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t,n){return r.apply(this,arguments)})},{key:"blocksForRange",value:(t=Fe(Ce().mark((function e(t,r,n,o){var i,a;return Ce().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.index){e.next=2;break}return e.abrupt("return",[]);case 2:return e.next=4,this.index.parse();case 4:return a=null===(i=this.chrToIndex)||void 0===i?void 0:i[t],e.abrupt("return",void 0===a?[]:this.index.blocksForRange(a,r,n,o));case 6:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();function Ke(e){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ke(e)}var Je=["referer"];function Xe(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function Ze(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=et(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function et(e,t){if(e){if("string"==typeof e)return tt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?tt(e,t):void 0}}function tt(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function nt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ot(e){for(var t=1;t0&&void 0!==A[0]?A[0]:{},r="".concat(this.baseUrl,"/").concat(this.trackId,"?referenceName=na&class=header"),e.next=4,fetch(r,t);case 4:if((n=e.sent).ok){e.next=13;break}return e.t0=Error,e.t1="HTTP ".concat(n.status," fetching ").concat(r,": "),e.next=10,n.text();case 10:throw e.t2=e.sent,e.t3=e.t1.concat.call(e.t1,e.t2),new e.t0(e.t3);case 13:return e.next=15,n.json();case 15:return o=e.sent,e.next=18,gt(o.htsget.urls,t);case 18:if((i=e.sent).readInt32LE(0)===We){e.next=21;break}throw new Error("Not a BAM file");case 21:a=i.readInt32LE(4),u=i.toString("utf8",8,8+a),c=Oe(u),l=[],s={},f=c.filter((function(e){return"SQ"===e.tag})),p=Ze(f.entries());try{for(p.s();!(d=p.n()).done;){x=d.value,O=2,h=function(e){if(Array.isArray(e))return e}(x)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(x,O)||et(x,O)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),y=h[0],v=h[1],m="",b=0,g=Ze(v.data);try{for(g.s();!(w=g.n()).done;)"SN"===(S=w.value).tag?m=S.value:"LN"===S.tag&&(b=+S.value)}catch(e){g.e(e)}finally{g.f()}s[m]=y,l[y]={refName:m,length:b}}}catch(e){p.e(e)}finally{p.f()}return this.chrToIndex=s,this.indexToChr=l,e.abrupt("return",c);case 32:case"end":return e.stop()}var x,O}),e,this)}))),function(){return o.apply(this,arguments)})}],n&&it(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(Ye)},23438:(e,t,r)=>{"use strict";r.d(t,{C:()=>Vn,j:()=>xn});var n=BigInt(32);"getBigInt64"in DataView||(DataView.prototype.getBigInt64=function(e,t){return function(e,t,r){var o=Number(!!r),i=Number(!r);return BigInt(e.getInt32(t,r)*i+e.getInt32(t+4,r)*o)<>n),a=Number(r&BigInt(4294967295));o?(e.setInt32(t+4,i,o),e.setUint32(t,a,o)):(e.setInt32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)}),"setBigUint64"in DataView||(DataView.prototype.setBigUint64=function(e,t,r){!function(e,t,r,o){var i=Number(r>>n),a=Number(r&BigInt(4294967295));o?(e.setUint32(t+4,i,o),e.setUint32(t,a,o)):(e.setUint32(t,i,o),e.setUint32(t+4,a,o))}(this,e,t,r)});var o=r(85832);class i{constructor(e,t){this.code="",this.scopes=[["vars"]],this.bitFields=[],this.tmpVariableCount=0,this.references=new Map,this.imports=[],this.reverseImports=new Map,this.useContextVariables=!1,this.importPath=e,this.useContextVariables=t}generateVariable(e){const t=[...this.scopes[this.scopes.length-1]];return e&&t.push(e),t.join(".")}generateOption(e){switch(typeof e){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return`${this.addImport(e)}.call(${this.generateVariable()}, vars)`}}generateError(e){this.pushCode(`throw new Error(${e});`)}generateTmpVariable(){return"$tmp"+this.tmpVariableCount++}pushCode(e){this.code+=e+"\n"}pushPath(e){e&&this.scopes[this.scopes.length-1].push(e)}popPath(e){e&&this.scopes[this.scopes.length-1].pop()}pushScope(e){this.scopes.push([e])}popScope(){this.scopes.pop()}addImport(e){if(!this.importPath)return`(${e})`;let t=this.reverseImports.get(e);return t||(t=this.imports.push(e)-1,this.reverseImports.set(e,t)),`${this.importPath}[${t}]`}addReference(e){this.references.has(e)||this.references.set(e,{resolved:!1,requested:!1})}markResolved(e){const t=this.references.get(e);t&&(t.resolved=!0)}markRequested(e){e.forEach((e=>{const t=this.references.get(e);t&&(t.requested=!0)}))}getUnresolvedReferences(){return Array.from(this.references).filter((([e,t])=>!t.resolved&&!t.requested)).map((([e,t])=>e))}}const a=new Map,u="___parser_",c={uint8:1,uint16le:2,uint16be:2,uint32le:4,uint32be:4,int8:1,int16le:2,int16be:2,int32le:4,int32be:4,int64be:8,int64le:8,uint64be:8,uint64le:8,floatle:4,floatbe:4,doublele:8,doublebe:8},l={uint8:"Uint8",uint16le:"Uint16",uint16be:"Uint16",uint32le:"Uint32",uint32be:"Uint32",int8:"Int8",int16le:"Int16",int16be:"Int16",int32le:"Int32",int32be:"Int32",int64be:"BigInt64",int64le:"BigInt64",uint64be:"BigUint64",uint64le:"BigUint64",floatle:"Float32",floatbe:"Float32",doublele:"Float64",doublebe:"Float64"},s={uint8:!1,uint16le:!0,uint16be:!1,uint32le:!0,uint32be:!1,int8:!1,int16le:!0,int16be:!1,int32le:!0,int32be:!1,int64be:!1,int64le:!0,uint64be:!1,uint64le:!0,floatle:!0,floatbe:!1,doublele:!0,doublebe:!1};class f{constructor(){this.varName="",this.type="",this.options={},this.endian="be",this.useContextVariables=!1}static start(){return new f}primitiveGenerateN(e,t){const r=l[e],n=s[e];t.pushCode(`${t.generateVariable(this.varName)} = dataView.get${r}(offset, ${n});`),t.pushCode(`offset += ${c[e]};`)}primitiveN(e,t,r){return this.setNextParser(e,t,r)}useThisEndian(e){return e+this.endian.toLowerCase()}uint8(e,t={}){return this.primitiveN("uint8",e,t)}uint16(e,t={}){return this.primitiveN(this.useThisEndian("uint16"),e,t)}uint16le(e,t={}){return this.primitiveN("uint16le",e,t)}uint16be(e,t={}){return this.primitiveN("uint16be",e,t)}uint32(e,t={}){return this.primitiveN(this.useThisEndian("uint32"),e,t)}uint32le(e,t={}){return this.primitiveN("uint32le",e,t)}uint32be(e,t={}){return this.primitiveN("uint32be",e,t)}int8(e,t={}){return this.primitiveN("int8",e,t)}int16(e,t={}){return this.primitiveN(this.useThisEndian("int16"),e,t)}int16le(e,t={}){return this.primitiveN("int16le",e,t)}int16be(e,t={}){return this.primitiveN("int16be",e,t)}int32(e,t={}){return this.primitiveN(this.useThisEndian("int32"),e,t)}int32le(e,t={}){return this.primitiveN("int32le",e,t)}int32be(e,t={}){return this.primitiveN("int32be",e,t)}bigIntVersionCheck(){if(!DataView.prototype.getBigInt64)throw new Error("BigInt64 is unsupported on this runtime")}int64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("int64"),e,t)}int64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64be",e,t)}int64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("int64le",e,t)}uint64(e,t={}){return this.bigIntVersionCheck(),this.primitiveN(this.useThisEndian("uint64"),e,t)}uint64be(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64be",e,t)}uint64le(e,t={}){return this.bigIntVersionCheck(),this.primitiveN("uint64le",e,t)}floatle(e,t={}){return this.primitiveN("floatle",e,t)}floatbe(e,t={}){return this.primitiveN("floatbe",e,t)}doublele(e,t={}){return this.primitiveN("doublele",e,t)}doublebe(e,t={}){return this.primitiveN("doublebe",e,t)}bitN(e,t,r){return r.length=e,this.setNextParser("bit",t,r)}bit1(e,t={}){return this.bitN(1,e,t)}bit2(e,t={}){return this.bitN(2,e,t)}bit3(e,t={}){return this.bitN(3,e,t)}bit4(e,t={}){return this.bitN(4,e,t)}bit5(e,t={}){return this.bitN(5,e,t)}bit6(e,t={}){return this.bitN(6,e,t)}bit7(e,t={}){return this.bitN(7,e,t)}bit8(e,t={}){return this.bitN(8,e,t)}bit9(e,t={}){return this.bitN(9,e,t)}bit10(e,t={}){return this.bitN(10,e,t)}bit11(e,t={}){return this.bitN(11,e,t)}bit12(e,t={}){return this.bitN(12,e,t)}bit13(e,t={}){return this.bitN(13,e,t)}bit14(e,t={}){return this.bitN(14,e,t)}bit15(e,t={}){return this.bitN(15,e,t)}bit16(e,t={}){return this.bitN(16,e,t)}bit17(e,t={}){return this.bitN(17,e,t)}bit18(e,t={}){return this.bitN(18,e,t)}bit19(e,t={}){return this.bitN(19,e,t)}bit20(e,t={}){return this.bitN(20,e,t)}bit21(e,t={}){return this.bitN(21,e,t)}bit22(e,t={}){return this.bitN(22,e,t)}bit23(e,t={}){return this.bitN(23,e,t)}bit24(e,t={}){return this.bitN(24,e,t)}bit25(e,t={}){return this.bitN(25,e,t)}bit26(e,t={}){return this.bitN(26,e,t)}bit27(e,t={}){return this.bitN(27,e,t)}bit28(e,t={}){return this.bitN(28,e,t)}bit29(e,t={}){return this.bitN(29,e,t)}bit30(e,t={}){return this.bitN(30,e,t)}bit31(e,t={}){return this.bitN(31,e,t)}bit32(e,t={}){return this.bitN(32,e,t)}namely(e){return a.set(e,this),this.alias=e,this}skip(e,t={}){return this.seek(e,t)}seek(e,t={}){if(t.assert)throw new Error("assert option on seek is not allowed.");return this.setNextParser("seek","",{length:e})}string(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("One of length, zeroTerminated, or greedy must be defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("length or greedy must be defined if stripNull is enabled.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)}buffer(e,t){if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for buffer.");return this.setNextParser("buffer",e,t)}wrapped(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.wrapper||!t.type)throw new Error("Both wrapper and type must be defined for wrapped.");if(!t.length&&!t.readUntil)throw new Error("length or readUntil must be defined for wrapped.");return this.setNextParser("wrapper",e,t)}array(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("One of readUntil, length and lengthInBytes must be defined for array.");if(!t.type)throw new Error("type is required for array.");if("string"==typeof t.type&&!a.has(t.type)&&!(t.type in c))throw new Error(`Array element type "${t.type}" is unkown.`);return this.setNextParser("array",e,t)}choice(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t)throw new Error("tag and choices are are required for choice.");if(!t.tag)throw new Error("tag is requird for choice.");if(!t.choices)throw new Error("choices is required for choice.");for(const e in t.choices){const r=parseInt(e,10),n=t.choices[r];if(isNaN(r))throw new Error(`Choice key "${e}" is not a number.`);if("string"==typeof n&&!a.has(n)&&!(n in c))throw new Error(`Choice type "${n}" is unkown.`)}return this.setNextParser("choice",e,t)}nest(e,t){if("object"!=typeof t&&"object"==typeof e&&(t=e,e=""),!t||!t.type)throw new Error("type is required for nest.");if(!(t.type instanceof f||a.has(t.type)))throw new Error("type must be a known parser name or a Parser object.");if(!(t.type instanceof f||e))throw new Error("type must be a Parser object if the variable name is omitted.");return this.setNextParser("nest",e,t)}pointer(e,t){if(!t.offset)throw new Error("offset is required for pointer.");if(!t.type)throw new Error("type is required for pointer.");if("string"==typeof t.type&&!(t.type in c)&&!a.has(t.type))throw new Error(`Pointer type "${t.type}" is unkown.`);return this.setNextParser("pointer",e,t)}saveOffset(e,t={}){return this.setNextParser("saveOffset",e,t)}endianness(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error('endianness must be one of "little" or "big"')}return this}endianess(e){return this.endianness(e)}useContextVars(e=!0){return this.useContextVariables=e,this}create(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this}getContext(e){const t=new i(e,this.useContextVariables);return t.pushCode("var dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.alias?(this.addAliasedCode(t),t.pushCode(`return ${u+this.alias}(0).result;`)):this.addRawCode(t),t}getCode(){return this.getContext("imports").code}addRawCode(e){e.pushCode("var offset = 0;"),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("vars.$parent = null;"),e.pushCode("vars.$root = vars;"),this.generate(e),this.resolveReferences(e),e.pushCode("delete vars.$parent;"),e.pushCode("delete vars.$root;"),e.pushCode("return vars;")}addAliasedCode(e){return e.pushCode(`function ${u+this.alias}(offset, context) {`),e.pushCode(`var vars = ${this.constructorFn?"new constructorFn()":"{}"};`),e.pushCode("var ctx = Object.assign({$parent: null, $root: vars}, context || {});"),e.pushCode("vars = Object.assign(vars, ctx);"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("Object.keys(ctx).forEach(function (item) { delete vars[item]; });"),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e}resolveReferences(e){const t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((t=>{var r;null===(r=a.get(t))||void 0===r||r.addAliasedCode(e)}))}compile(){const e="imports",t=this.getContext(e);this.compiled=new Function(e,"TextDecoder",`return function (buffer, constructorFn) { ${t.code} };`)(t.imports,TextDecoder)}sizeOf(){let e=NaN;if(Object.keys(c).indexOf(this.type)>=0)e=c[this.type];else if("string"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("array"===this.type&&"number"==typeof this.options.length){let t=NaN;"string"==typeof this.options.type?t=c[this.options.type]:this.options.type instanceof f&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"seek"===this.type?e=this.options.length:"nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e}parse(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn)}setNextParser(e,t,r){const n=new f;return n.type=e,n.varName=t,n.options=r,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this}generate(e){if(this.type){switch(this.type){case"uint8":case"uint16le":case"uint16be":case"uint32le":case"uint32be":case"int8":case"int16le":case"int16be":case"int32le":case"int32be":case"int64be":case"int64le":case"uint64be":case"uint64le":case"floatle":case"floatbe":case"doublele":case"doublebe":this.primitiveGenerateN(this.type,e);break;case"bit":this.generateBit(e);break;case"string":this.generateString(e);break;case"buffer":this.generateBuffer(e);break;case"seek":this.generateSeek(e);break;case"nest":this.generateNest(e);break;case"array":this.generateArray(e);break;case"choice":this.generateChoice(e);break;case"pointer":this.generatePointer(e);break;case"saveOffset":this.generateSaveOffset(e);break;case"wrapper":this.generateWrapper(e)}"bit"!==this.type&&this.generateAssert(e)}const t=e.generateVariable(this.varName);return this.options.formatter&&"bit"!==this.type&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)}generateAssert(e){if(!this.options.assert)return;const t=e.generateVariable(this.varName);switch(typeof this.options.assert){case"function":{const r=e.addImport(this.options.assert);e.pushCode(`if (!${r}.call(vars, ${t})) {`)}break;case"number":e.pushCode(`if (${this.options.assert} !== ${t}) {`);break;case"string":e.pushCode(`if (${JSON.stringify(this.options.assert)} !== ${t}) {`);break;default:throw new Error("assert option must be a string, number or a function.")}e.generateError(`"Assertion error: ${t} is " + ${JSON.stringify(this.options.assert.toString())}`),e.pushCode("}")}generateNext(e){return this.next&&(e=this.next.generate(e)),e}generateBit(e){const t=JSON.parse(JSON.stringify(this));if(t.options=this.options,t.generateAssert=this.generateAssert.bind(this),t.generateFormatter=this.generateFormatter.bind(this),t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["bit","nest"].indexOf(this.next.type)<0){const t=e.generateTmpVariable();e.pushCode(`var ${t} = 0;`);const r=(t=0)=>{let r=0;for(let n=t;n32)break;r+=t}return r},n=r=>(r<=8?(e.pushCode(`${t} = dataView.getUint8(offset);`),r=8):r<=16?(e.pushCode(`${t} = dataView.getUint16(offset);`),r=16):r<=24?(e.pushCode(`${t} = (dataView.getUint16(offset) << 8) | dataView.getUint8(offset + 2);`),r=24):(e.pushCode(`${t} = dataView.getUint32(offset);`),r=32),e.pushCode(`offset += ${r/8};`),r);let o=0;const i="be"===this.endian;let a=0,u=0;e.bitFields.forEach(((c,l)=>{let s=c.options.length;if(s>u){if(u){const r=-1>>>32-u;e.pushCode(`${c.varName} = (${t} & 0x${r.toString(16)}) << ${s-u};`),s-=u}o=0,u=a=n(r(l)-u)}const f=i?a-o-s:o,p=-1>>>32-s;e.pushCode(`${c.varName} ${s> ${f} & 0x${p.toString(16)};`),32===c.options.length&&e.pushCode(`${c.varName} >>>= 0`),c.options.assert&&c.generateAssert(e),c.options.formatter&&c.generateFormatter(e,c.varName,c.options.formatter),o+=s,u-=s})),e.bitFields=[]}}generateSeek(e){const t=e.generateOption(this.options.length);e.pushCode(`offset += ${t};`)}generateString(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable(),n=this.options.encoding,o="hex"===n.toLowerCase(),i='b => b.toString(16).padStart(2, "0")';if(this.options.length&&this.options.zeroTerminated){const a=this.options.length;e.pushCode(`var ${r} = offset;`),e.pushCode(`while(dataView.getUint8(offset++) !== 0 && offset - ${r} < ${a});`);const u=`offset - ${r} < ${a} ? offset - 1 : offset`;e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, ${u}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, ${u}));`)}else if(this.options.length){const r=e.generateOption(this.options.length);e.pushCode(o?`${t} = Array.from(buffer.subarray(offset, offset + ${r}), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(offset, offset + ${r}));`),e.pushCode(`offset += ${r};`)}else this.options.zeroTerminated?(e.pushCode(`var ${r} = offset;`),e.pushCode("while(dataView.getUint8(offset++) !== 0);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset - 1), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset - 1));`)):this.options.greedy&&(e.pushCode(`var ${r} = offset;`),e.pushCode("while(buffer.length > offset++);"),e.pushCode(o?`${t} = Array.from(buffer.subarray(${r}, offset), ${i}).join('');`:`${t} = new TextDecoder('${n}').decode(buffer.subarray(${r}, offset));`));this.options.stripNull&&e.pushCode(`${t} = ${t}.replace(/\\x00+$/g, '')`)}generateBuffer(e){const t=e.generateVariable(this.varName);if("function"==typeof this.options.readUntil){const r=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(r);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${t} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${t} = buffer.subarray(offset);`);else{const r=e.generateOption(this.options.length);e.pushCode(`${t} = buffer.subarray(offset, offset + ${r});`),e.pushCode(`offset += ${r};`)}this.options.clone&&e.pushCode(`${t} = buffer.constructor.from(${t});`)}generateArray(e){const t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),p=e.generateTmpVariable(),d=this.options.key,h="string"==typeof d;if(h?e.pushCode(`${i} = {};`):e.pushCode(`${i} = [];`),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode(`for (var ${o} = 0; offset < buffer.length; ${o}++) {`):void 0!==r?e.pushCode(`for (var ${o} = offset + ${r}; offset < ${o}; ) {`):e.pushCode(`for (var ${o} = ${t}; ${o} > 0; ${o}--) {`),"string"==typeof n)if(a.get(n)){const i=e.generateTmpVariable();if(e.pushCode(`var ${i} = ${u+n}(offset, {`),e.useContextVariables){const n=e.generateVariable();e.pushCode(`$parent: ${n},`),e.pushCode(`$root: ${n}.$root,`),this.options.readUntil||void 0!==r||e.pushCode(`$index: ${t} - ${o},`)}e.pushCode("});"),e.pushCode(`var ${p} = ${i}.result; offset = ${i}.offset;`),n!==this.alias&&e.addReference(n)}else{const t=l[n],r=s[n];e.pushCode(`var ${p} = dataView.get${t}(offset, ${r});`),e.pushCode(`offset += ${c[n]};`)}else if(n instanceof f){e.pushCode(`var ${p} = {};`);const i=e.generateVariable();e.pushScope(p),e.useContextVariables&&(e.pushCode(`${p}.$parent = ${i};`),e.pushCode(`${p}.$root = ${i}.$root;`),this.options.readUntil||void 0!==r||e.pushCode(`${p}.$index = ${t} - ${o};`)),n.generate(e),e.useContextVariables&&(e.pushCode(`delete ${p}.$parent;`),e.pushCode(`delete ${p}.$root;`),e.pushCode(`delete ${p}.$index;`)),e.popScope()}if(h?e.pushCode(`${i}[${p}.${d}] = ${p};`):e.pushCode(`${i}.push(${p});`),e.pushCode("}"),"function"==typeof this.options.readUntil){const t=this.options.readUntil,r=e.addImport(t);e.pushCode(`while (!${r}.call(${e.generateVariable()}, ${p}, buffer.subarray(offset)));`)}}generateChoiceCase(e,t,r){if("string"==typeof r){const t=e.generateVariable(this.varName);if(a.has(r)){const n=e.generateTmpVariable();e.pushCode(`var ${n} = ${u+r}(offset, {`),e.useContextVariables&&(e.pushCode(`$parent: ${t}.$parent,`),e.pushCode(`$root: ${t}.$root,`)),e.pushCode("});"),e.pushCode(`${t} = ${n}.result; offset = ${n}.offset;`),r!==this.alias&&e.addReference(r)}else{const n=l[r],o=s[r];e.pushCode(`${t} = dataView.get${n}(offset, ${o});`),e.pushCode(`offset += ${c[r]}`)}}else r instanceof f&&(e.pushPath(t),r.generate(e),e.popPath(t))}generateChoice(e){const t=e.generateOption(this.options.tag),r=e.generateVariable(this.varName);if(this.varName&&(e.pushCode(`${r} = {};`),e.useContextVariables)){const t=e.generateVariable();e.pushCode(`${r}.$parent = ${t};`),e.pushCode(`${r}.$root = ${t}.$root;`)}e.pushCode(`switch(${t}) {`);for(const t in this.options.choices){const r=parseInt(t,10),n=this.options.choices[r];e.pushCode(`case ${r}:`),this.generateChoiceCase(e,this.varName,n),e.pushCode("break;")}e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError(`"Met undefined tag value " + ${t} + " at choice"`),e.pushCode("}"),this.varName&&e.useContextVariables&&(e.pushCode(`delete ${r}.$parent;`),e.pushCode(`delete ${r}.$root;`))}generateNest(e){const t=e.generateVariable(this.varName);if(this.options.type instanceof f){if(this.varName&&(e.pushCode(`${t} = {};`),e.useContextVariables)){const r=e.generateVariable();e.pushCode(`${t}.$parent = ${r};`),e.pushCode(`${t}.$root = ${r}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),this.varName&&e.useContextVariables&&e.useContextVariables&&(e.pushCode(`delete ${t}.$parent;`),e.pushCode(`delete ${t}.$root;`))}else if(a.has(this.options.type)){const r=e.generateTmpVariable();if(e.pushCode(`var ${r} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${t} = ${r}.result; offset = ${r}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}}generateWrapper(e){const t=e.generateVariable(this.varName),r=e.generateTmpVariable();if("function"==typeof this.options.readUntil){const t=this.options.readUntil,n=e.generateTmpVariable(),o=e.generateTmpVariable();e.pushCode(`var ${n} = offset;`),e.pushCode(`var ${o} = 0;`),e.pushCode("while (offset < buffer.length) {"),e.pushCode(`${o} = dataView.getUint8(offset);`);const i=e.addImport(t);e.pushCode(`if (${i}.call(${e.generateVariable()}, ${o}, buffer.subarray(offset))) break;`),e.pushCode("offset += 1;"),e.pushCode("}"),e.pushCode(`${r} = buffer.subarray(${n}, offset);`)}else if("eof"===this.options.readUntil)e.pushCode(`${r} = buffer.subarray(offset);`);else{const t=e.generateOption(this.options.length);e.pushCode(`${r} = buffer.subarray(offset, offset + ${t});`),e.pushCode(`offset += ${t};`)}this.options.clone&&e.pushCode(`${r} = buffer.constructor.from(${r});`);const n=e.generateTmpVariable(),o=e.generateTmpVariable(),i=e.generateTmpVariable(),c=e.addImport(this.options.wrapper);if(e.pushCode(`${r} = ${c}.call(this, ${r}).subarray(0);`),e.pushCode(`var ${n} = buffer;`),e.pushCode(`var ${o} = offset;`),e.pushCode(`var ${i} = dataView;`),e.pushCode(`buffer = ${r};`),e.pushCode("offset = 0;"),e.pushCode("dataView = new DataView(buffer.buffer, buffer.byteOffset, buffer.length);"),this.options.type instanceof f)this.varName&&e.pushCode(`${t} = {};`),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(a.has(this.options.type)){const r=e.generateTmpVariable();e.pushCode(`var ${r} = ${u+this.options.type}(0);`),e.pushCode(`${t} = ${r}.result;`),this.options.type!==this.alias&&e.addReference(this.options.type)}e.pushCode(`buffer = ${n};`),e.pushCode(`dataView = ${i};`),e.pushCode(`offset = ${o};`)}generateFormatter(e,t,r){if("function"==typeof r){const n=e.addImport(r);e.pushCode(`${t} = ${n}.call(${e.generateVariable()}, ${t});`)}}generatePointer(e){const t=this.options.type,r=e.generateOption(this.options.offset),n=e.generateTmpVariable(),o=e.generateVariable(this.varName);if(e.pushCode(`var ${n} = offset;`),e.pushCode(`offset = ${r};`),this.options.type instanceof f){if(e.pushCode(`${o} = {};`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`${o}.$parent = ${t};`),e.pushCode(`${o}.$root = ${t}.$root;`)}e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName),e.useContextVariables&&(e.pushCode(`delete ${o}.$parent;`),e.pushCode(`delete ${o}.$root;`))}else if(a.has(this.options.type)){const t=e.generateTmpVariable();if(e.pushCode(`var ${t} = ${u+this.options.type}(offset, {`),e.useContextVariables){const t=e.generateVariable();e.pushCode(`$parent: ${t},`),e.pushCode(`$root: ${t}.$root,`)}e.pushCode("});"),e.pushCode(`${o} = ${t}.result; offset = ${t}.offset;`),this.options.type!==this.alias&&e.addReference(this.options.type)}else if(Object.keys(c).indexOf(this.options.type)>=0){const r=l[t],n=s[t];e.pushCode(`${o} = dataView.get${r}(offset, ${n});`),e.pushCode(`offset += ${c[t]};`)}e.pushCode(`offset = ${n};`)}generateSaveOffset(e){const t=e.generateVariable(this.varName);e.pushCode(`${t} = offset`)}}var p=r(87791),d=r.n(p),h=r(84137),y=r.n(h);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e)return!0}return!1}},{key:"isContiguous",value:function(){return this.ranges.length>1}},{key:"getRanges",value:function(){return this.ranges.map((function(t){return new e(t.min,t.max)}))}},{key:"toString",value:function(){return this.ranges.map((function(e){return"[".concat(e.min,"-").concat(e.max,"]")})).join(",")}},{key:"union",value:function(t){for(var r=this.getRanges().concat(t.getRanges()).sort(this.rangeOrder),n=[],o=r[0],i=1;io.max()+1?(n.push(o),o=a):a.max()>o.max()&&(o=new e(o.min(),a.max()))}return n.push(o),1===n.length?n[0]:new e(n)}},{key:"intersection",value:function(t){for(var r=this,n=t,o=this.ranges(),i=n.ranges(),a=o.length,u=i.length,c=0,l=0,s=[];c=f&&s.push(new e(f,p)),r.max()>n.max()?l+=1:c+=1}if(0===s.length)throw new Error("found range of length 0");return 1===s.length?s[0]:new e(s)}},{key:"coverage",value:function(){var e,t=0,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return m(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(this.ranges());try{for(r.s();!(e=r.n()).done;){var n=e.value;t+=n.max()-n.min()+1}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"rangeOrder",value:function(e,t){var r=e,n=t;return arguments.length<2&&(n=r,r=this),r.min()n.min()?1:r.max()r.max()?1:0}}],r&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function S(e){let t=e.length;for(;--t>=0;)e[t]=0}const A=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),x=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),O=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),E=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),j=new Array(576);S(j);const P=new Array(60);S(P);const k=new Array(512);S(k);const C=new Array(256);S(C);const _=new Array(29);S(_);const L=new Array(30);function T(e,t,r,n,o){this.static_tree=e,this.extra_bits=t,this.extra_base=r,this.elems=n,this.max_length=o,this.has_stree=e&&e.length}let I,M,R;function N(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}S(L);const F=e=>e<256?k[e]:k[256+(e>>>7)],D=(e,t)=>{e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},B=(e,t,r)=>{e.bi_valid>16-r?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=r-16):(e.bi_buf|=t<{B(e,r[2*t],r[2*t+1])},G=(e,t)=>{let r=0;do{r|=1&e,e>>>=1,r<<=1}while(--t>0);return r>>>1},U=(e,t,r)=>{const n=new Array(16);let o,i,a=0;for(o=1;o<=15;o++)a=a+r[o-1]<<1,n[o]=a;for(i=0;i<=t;i++){let t=e[2*i+1];0!==t&&(e[2*i]=G(n[t]++,t))}},H=e=>{let t;for(t=0;t<286;t++)e.dyn_ltree[2*t]=0;for(t=0;t<30;t++)e.dyn_dtree[2*t]=0;for(t=0;t<19;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},V=e=>{e.bi_valid>8?D(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},W=(e,t,r,n)=>{const o=2*t,i=2*r;return e[o]{const n=e.heap[r];let o=r<<1;for(;o<=e.heap_len&&(o{let n,o,i,a,u=0;if(0!==e.sym_next)do{n=255&e.pending_buf[e.sym_buf+u++],n+=(255&e.pending_buf[e.sym_buf+u++])<<8,o=e.pending_buf[e.sym_buf+u++],0===n?z(e,o,t):(i=C[o],z(e,i+256+1,t),a=A[i],0!==a&&(o-=_[i],B(e,o,a)),n--,i=F(n),z(e,i,r),a=x[i],0!==a&&(n-=L[i],B(e,n,a)))}while(u{const r=t.dyn_tree,n=t.stat_desc.static_tree,o=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,u,c,l=-1;for(e.heap_len=0,e.heap_max=573,a=0;a>1;a>=1;a--)q(e,r,a);c=i;do{a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],q(e,r,1),u=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=u,r[2*c]=r[2*a]+r[2*u],e.depth[c]=(e.depth[a]>=e.depth[u]?e.depth[a]:e.depth[u])+1,r[2*a+1]=r[2*u+1]=c,e.heap[1]=c++,q(e,r,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],((e,t)=>{const r=t.dyn_tree,n=t.max_code,o=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,u=t.stat_desc.extra_base,c=t.stat_desc.max_length;let l,s,f,p,d,h,y=0;for(p=0;p<=15;p++)e.bl_count[p]=0;for(r[2*e.heap[e.heap_max]+1]=0,l=e.heap_max+1;l<573;l++)s=e.heap[l],p=r[2*r[2*s+1]+1]+1,p>c&&(p=c,y++),r[2*s+1]=p,s>n||(e.bl_count[p]++,d=0,s>=u&&(d=a[s-u]),h=r[2*s],e.opt_len+=h*(p+d),i&&(e.static_len+=h*(o[2*s+1]+d)));if(0!==y){do{for(p=c-1;0===e.bl_count[p];)p--;e.bl_count[p]--,e.bl_count[p+1]+=2,e.bl_count[c]--,y-=2}while(y>0);for(p=c;0!==p;p--)for(s=e.bl_count[p];0!==s;)f=e.heap[--l],f>n||(r[2*f+1]!==p&&(e.opt_len+=(p-r[2*f+1])*r[2*f],r[2*f+1]=p),s--)}})(e,t),U(r,l,e.bl_count)},Y=(e,t,r)=>{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),t[2*(r+1)+1]=65535,n=0;n<=r;n++)o=a,a=t[2*(n+1)+1],++u{let n,o,i=-1,a=t[1],u=0,c=7,l=4;for(0===a&&(c=138,l=3),n=0;n<=r;n++)if(o=a,a=t[2*(n+1)+1],!(++u{B(e,0+(n?1:0),3),V(e),D(e,r),D(e,~r),r&&e.pending_buf.set(e.window.subarray(t,t+r),e.pending),e.pending+=r};var Z={_tr_init:e=>{J||((()=>{let e,t,r,n,o;const i=new Array(16);for(r=0,n=0;n<28;n++)for(_[n]=r,e=0;e<1<>=7;n<30;n++)for(L[n]=o<<7,e=0;e<1<{let o,i,a=0;e.level>0?(2===e.strm.data_type&&(e.strm.data_type=(e=>{let t,r=4093624447;for(t=0;t<=31;t++,r>>>=1)if(1&r&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t<256;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0})(e)),$(e,e.l_desc),$(e,e.d_desc),a=(e=>{let t;for(Y(e,e.dyn_ltree,e.l_desc.max_code),Y(e,e.dyn_dtree,e.d_desc.max_code),$(e,e.bl_desc),t=18;t>=3&&0===e.bl_tree[2*E[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t})(e),o=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=o&&(o=i)):o=i=r+5,r+4<=o&&-1!==t?X(e,t,r,n):4===e.strategy||i===o?(B(e,2+(n?1:0),3),Q(e,j,P)):(B(e,4+(n?1:0),3),((e,t,r,n)=>{let o;for(B(e,t-257,5),B(e,r-1,5),B(e,n-4,4),o=0;o(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=r,0===t?e.dyn_ltree[2*r]++:(e.matches++,t--,e.dyn_ltree[2*(C[r]+256+1)]++,e.dyn_dtree[2*F(t)]++),e.sym_next===e.sym_end),_tr_align:e=>{B(e,2,3),z(e,256,j),(e=>{16===e.bi_valid?(D(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)})(e)}},ee=(e,t,r,n)=>{let o=65535&e|0,i=e>>>16&65535|0,a=0;for(;0!==r;){a=r>2e3?2e3:r,r-=a;do{o=o+t[n++]|0,i=i+o|0}while(--a);o%=65521,i%=65521}return o|i<<16|0};const te=new Uint32Array((()=>{let e,t=[];for(var r=0;r<256;r++){e=r;for(var n=0;n<8;n++)e=1&e?3988292384^e>>>1:e>>>1;t[r]=e}return t})());var re=(e,t,r,n)=>{const o=te,i=n+r;e^=-1;for(let r=n;r>>8^o[255&(e^t[r])];return-1^e},ne={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},oe={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:ie,_tr_stored_block:ae,_tr_flush_block:ue,_tr_tally:ce,_tr_align:le}=Z,{Z_NO_FLUSH:se,Z_PARTIAL_FLUSH:fe,Z_FULL_FLUSH:pe,Z_FINISH:de,Z_BLOCK:he,Z_OK:ye,Z_STREAM_END:ve,Z_STREAM_ERROR:me,Z_DATA_ERROR:be,Z_BUF_ERROR:ge,Z_DEFAULT_COMPRESSION:we,Z_FILTERED:Se,Z_HUFFMAN_ONLY:Ae,Z_RLE:xe,Z_FIXED:Oe,Z_DEFAULT_STRATEGY:Ee,Z_UNKNOWN:je,Z_DEFLATED:Pe}=oe,ke=258,Ce=262,_e=42,Le=113,Te=666,Ie=(e,t)=>(e.msg=ne[t],t),Me=e=>2*e-(e>4?9:0),Re=e=>{let t=e.length;for(;--t>=0;)e[t]=0},Ne=e=>{let t,r,n,o=e.w_size;t=e.hash_size,n=t;do{r=e.head[--n],e.head[n]=r>=o?r-o:0}while(--t);t=o,n=t;do{r=e.prev[--n],e.prev[n]=r>=o?r-o:0}while(--t)};let Fe=(e,t,r)=>(t<{const t=e.state;let r=t.pending;r>e.avail_out&&(r=e.avail_out),0!==r&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+r),e.next_out),e.next_out+=r,t.pending_out+=r,e.total_out+=r,e.avail_out-=r,t.pending-=r,0===t.pending&&(t.pending_out=0))},Be=(e,t)=>{ue(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,De(e.strm)},ze=(e,t)=>{e.pending_buf[e.pending++]=t},Ge=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t},Ue=(e,t,r,n)=>{let o=e.avail_in;return o>n&&(o=n),0===o?0:(e.avail_in-=o,t.set(e.input.subarray(e.next_in,e.next_in+o),r),1===e.state.wrap?e.adler=ee(e.adler,t,o,r):2===e.state.wrap&&(e.adler=re(e.adler,t,o,r)),e.next_in+=o,e.total_in+=o,o)},He=(e,t)=>{let r,n,o=e.max_chain_length,i=e.strstart,a=e.prev_length,u=e.nice_match;const c=e.strstart>e.w_size-Ce?e.strstart-(e.w_size-Ce):0,l=e.window,s=e.w_mask,f=e.prev,p=e.strstart+ke;let d=l[i+a-1],h=l[i+a];e.prev_length>=e.good_match&&(o>>=2),u>e.lookahead&&(u=e.lookahead);do{if(r=t,l[r+a]===h&&l[r+a-1]===d&&l[r]===l[i]&&l[++r]===l[i+1]){i+=2,r++;do{}while(l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&l[++i]===l[++r]&&ia){if(e.match_start=t,a=n,n>=u)break;d=l[i+a-1],h=l[i+a]}}}while((t=f[t&s])>c&&0!=--o);return a<=e.lookahead?a:e.lookahead},Ve=e=>{const t=e.w_size;let r,n,o;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-Ce)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),Ne(e),n+=t),0===e.strm.avail_in)break;if(r=Ue(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=r,e.lookahead+e.insert>=3)for(o=e.strstart-e.insert,e.ins_h=e.window[o],e.ins_h=Fe(e,e.ins_h,e.window[o+1]);e.insert&&(e.ins_h=Fe(e,e.ins_h,e.window[o+3-1]),e.prev[o&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=o,o++,e.insert--,!(e.lookahead+e.insert<3)););}while(e.lookahead{let r,n,o,i=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,a=0,u=e.strm.avail_in;do{if(r=65535,o=e.bi_valid+42>>3,e.strm.avail_outn+e.strm.avail_in&&(r=n+e.strm.avail_in),r>o&&(r=o),r>8,e.pending_buf[e.pending-2]=~r,e.pending_buf[e.pending-1]=~r>>8,De(e.strm),n&&(n>r&&(n=r),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+n),e.strm.next_out),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n,e.block_start+=n,r-=n),r&&(Ue(e.strm,e.strm.output,e.strm.next_out,r),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r)}while(0===a);return u-=e.strm.avail_in,u&&(u>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=u&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-u,e.strm.next_in),e.strstart),e.strstart+=u,e.insert+=u>e.w_size-e.insert?e.w_size-e.insert:u),e.block_start=e.strstart),e.high_watero&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,o+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),o>e.strm.avail_in&&(o=e.strm.avail_in),o&&(Ue(e.strm,e.window,e.strstart,o),e.strstart+=o,e.insert+=o>e.w_size-e.insert?e.w_size-e.insert:o),e.high_water>3,o=e.pending_buf_size-o>65535?65535:e.pending_buf_size-o,i=o>e.w_size?e.w_size:o,n=e.strstart-e.block_start,(n>=i||(n||t===de)&&t!==se&&0===e.strm.avail_in&&n<=o)&&(r=n>o?o:n,a=t===de&&0===e.strm.avail_in&&r===n?1:0,ae(e,e.block_start,r,a),e.block_start+=r,De(e.strm)),a?3:1)},qe=(e,t)=>{let r,n;for(;;){if(e.lookahead=3&&(e.ins_h=Fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==r&&e.strstart-r<=e.w_size-Ce&&(e.match_length=He(e,r)),e.match_length>=3)if(n=ce(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){e.match_length--;do{e.strstart++,e.ins_h=Fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Fe(e,e.ins_h,e.window[e.strstart+1]);else n=ce(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Be(e,!1),0===e.strm.avail_out))return 1}return e.insert=e.strstart<2?e.strstart:2,t===de?(Be(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Be(e,!1),0===e.strm.avail_out)?1:2},Qe=(e,t)=>{let r,n,o;for(;;){if(e.lookahead=3&&(e.ins_h=Fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==r&&e.prev_length4096)&&(e.match_length=2)),e.prev_length>=3&&e.match_length<=e.prev_length){o=e.strstart+e.lookahead-3,n=ce(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=o&&(e.ins_h=Fe(e,e.ins_h,e.window[e.strstart+3-1]),r=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=2,e.strstart++,n&&(Be(e,!1),0===e.strm.avail_out))return 1}else if(e.match_available){if(n=ce(e,0,e.window[e.strstart-1]),n&&Be(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return 1}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=ce(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<2?e.strstart:2,t===de?(Be(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Be(e,!1),0===e.strm.avail_out)?1:2};function $e(e,t,r,n,o){this.good_length=e,this.max_lazy=t,this.nice_length=r,this.max_chain=n,this.func=o}const Ye=[new $e(0,0,0,0,We),new $e(4,4,8,4,qe),new $e(4,5,16,8,qe),new $e(4,6,32,32,qe),new $e(4,4,16,16,Qe),new $e(8,16,32,32,Qe),new $e(8,16,128,128,Qe),new $e(8,32,128,256,Qe),new $e(32,128,258,1024,Qe),new $e(32,258,258,4096,Qe)];function Ke(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=Pe,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),Re(this.dyn_ltree),Re(this.dyn_dtree),Re(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Re(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),Re(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Je=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==_e&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&t.status!==Le&&t.status!==Te?1:0},Xe=e=>{if(Je(e))return Ie(e,me);e.total_in=e.total_out=0,e.data_type=je;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?_e:Le,e.adler=2===t.wrap?0:1,t.last_flush=-2,ie(t),ye},Ze=e=>{const t=Xe(e);var r;return t===ye&&((r=e.state).window_size=2*r.w_size,Re(r.head),r.max_lazy_match=Ye[r.level].max_lazy,r.good_match=Ye[r.level].good_length,r.nice_match=Ye[r.level].nice_length,r.max_chain_length=Ye[r.level].max_chain,r.strstart=0,r.block_start=0,r.lookahead=0,r.insert=0,r.match_length=r.prev_length=2,r.match_available=0,r.ins_h=0),t},et=(e,t,r,n,o,i)=>{if(!e)return me;let a=1;if(t===we&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),o<1||o>9||r!==Pe||n<8||n>15||t<0||t>9||i<0||i>Oe||8===n&&1!==a)return Ie(e,me);8===n&&(n=9);const u=new Ke;return e.state=u,u.strm=e,u.status=_e,u.wrap=a,u.gzhead=null,u.w_bits=n,u.w_size=1<et(e,t,Pe,15,8,Ee),deflateInit2:et,deflateReset:Ze,deflateResetKeep:Xe,deflateSetHeader:(e,t)=>Je(e)||2!==e.state.wrap?me:(e.state.gzhead=t,ye),deflate:(e,t)=>{if(Je(e)||t>he||t<0)return e?Ie(e,me):me;const r=e.state;if(!e.output||0!==e.avail_in&&!e.input||r.status===Te&&t!==de)return Ie(e,0===e.avail_out?ge:me);const n=r.last_flush;if(r.last_flush=t,0!==r.pending){if(De(e),0===e.avail_out)return r.last_flush=-1,ye}else if(0===e.avail_in&&Me(t)<=Me(n)&&t!==de)return Ie(e,ge);if(r.status===Te&&0!==e.avail_in)return Ie(e,ge);if(r.status===_e&&0===r.wrap&&(r.status=Le),r.status===_e){let t=Pe+(r.w_bits-8<<4)<<8,n=-1;if(n=r.strategy>=Ae||r.level<2?0:r.level<6?1:6===r.level?2:3,t|=n<<6,0!==r.strstart&&(t|=32),t+=31-t%31,Ge(r,t),0!==r.strstart&&(Ge(r,e.adler>>>16),Ge(r,65535&e.adler)),e.adler=1,r.status=Le,De(e),0!==r.pending)return r.last_flush=-1,ye}if(57===r.status)if(e.adler=0,ze(r,31),ze(r,139),ze(r,8),r.gzhead)ze(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),ze(r,255&r.gzhead.time),ze(r,r.gzhead.time>>8&255),ze(r,r.gzhead.time>>16&255),ze(r,r.gzhead.time>>24&255),ze(r,9===r.level?2:r.strategy>=Ae||r.level<2?4:0),ze(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(ze(r,255&r.gzhead.extra.length),ze(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(e.adler=re(e.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69;else if(ze(r,0),ze(r,0),ze(r,0),ze(r,0),ze(r,0),ze(r,9===r.level?2:r.strategy>=Ae||r.level<2?4:0),ze(r,3),r.status=Le,De(e),0!==r.pending)return r.last_flush=-1,ye;if(69===r.status){if(r.gzhead.extra){let t=r.pending,n=(65535&r.gzhead.extra.length)-r.gzindex;for(;r.pending+n>r.pending_buf_size;){let o=r.pending_buf_size-r.pending;if(r.pending_buf.set(r.gzhead.extra.subarray(r.gzindex,r.gzindex+o),r.pending),r.pending=r.pending_buf_size,r.gzhead.hcrc&&r.pending>t&&(e.adler=re(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex+=o,De(e),0!==r.pending)return r.last_flush=-1,ye;t=0,n-=o}let o=new Uint8Array(r.gzhead.extra);r.pending_buf.set(o.subarray(r.gzindex,r.gzindex+n),r.pending),r.pending+=n,r.gzhead.hcrc&&r.pending>t&&(e.adler=re(e.adler,r.pending_buf,r.pending-t,t)),r.gzindex=0}r.status=73}if(73===r.status){if(r.gzhead.name){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=re(e.adler,r.pending_buf,r.pending-n,n)),De(e),0!==r.pending)return r.last_flush=-1,ye;n=0}t=r.gzindexn&&(e.adler=re(e.adler,r.pending_buf,r.pending-n,n)),r.gzindex=0}r.status=91}if(91===r.status){if(r.gzhead.comment){let t,n=r.pending;do{if(r.pending===r.pending_buf_size){if(r.gzhead.hcrc&&r.pending>n&&(e.adler=re(e.adler,r.pending_buf,r.pending-n,n)),De(e),0!==r.pending)return r.last_flush=-1,ye;n=0}t=r.gzindexn&&(e.adler=re(e.adler,r.pending_buf,r.pending-n,n))}r.status=103}if(103===r.status){if(r.gzhead.hcrc){if(r.pending+2>r.pending_buf_size&&(De(e),0!==r.pending))return r.last_flush=-1,ye;ze(r,255&e.adler),ze(r,e.adler>>8&255),e.adler=0}if(r.status=Le,De(e),0!==r.pending)return r.last_flush=-1,ye}if(0!==e.avail_in||0!==r.lookahead||t!==se&&r.status!==Te){let n=0===r.level?We(r,t):r.strategy===Ae?((e,t)=>{let r;for(;;){if(0===e.lookahead&&(Ve(e),0===e.lookahead)){if(t===se)return 1;break}if(e.match_length=0,r=ce(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,r&&(Be(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===de?(Be(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Be(e,!1),0===e.strm.avail_out)?1:2})(r,t):r.strategy===xe?((e,t)=>{let r,n,o,i;const a=e.window;for(;;){if(e.lookahead<=ke){if(Ve(e),e.lookahead<=ke&&t===se)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&e.strstart>0&&(o=e.strstart-1,n=a[o],n===a[++o]&&n===a[++o]&&n===a[++o])){i=e.strstart+ke;do{}while(n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&n===a[++o]&&oe.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(r=ce(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(r=ce(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),r&&(Be(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===de?(Be(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Be(e,!1),0===e.strm.avail_out)?1:2})(r,t):Ye[r.level].func(r,t);if(3!==n&&4!==n||(r.status=Te),1===n||3===n)return 0===e.avail_out&&(r.last_flush=-1),ye;if(2===n&&(t===fe?le(r):t!==he&&(ae(r,0,0,!1),t===pe&&(Re(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),De(e),0===e.avail_out))return r.last_flush=-1,ye}return t!==de?ye:r.wrap<=0?ve:(2===r.wrap?(ze(r,255&e.adler),ze(r,e.adler>>8&255),ze(r,e.adler>>16&255),ze(r,e.adler>>24&255),ze(r,255&e.total_in),ze(r,e.total_in>>8&255),ze(r,e.total_in>>16&255),ze(r,e.total_in>>24&255)):(Ge(r,e.adler>>>16),Ge(r,65535&e.adler)),De(e),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?ye:ve)},deflateEnd:e=>{if(Je(e))return me;const t=e.state.status;return e.state=null,t===Le?Ie(e,be):ye},deflateSetDictionary:(e,t)=>{let r=t.length;if(Je(e))return me;const n=e.state,o=n.wrap;if(2===o||1===o&&n.status!==_e||n.lookahead)return me;if(1===o&&(e.adler=ee(e.adler,t,r,0)),n.wrap=0,r>=n.w_size){0===o&&(Re(n.head),n.strstart=0,n.block_start=0,n.insert=0);let e=new Uint8Array(n.w_size);e.set(t.subarray(r-n.w_size,r),0),t=e,r=n.w_size}const i=e.avail_in,a=e.next_in,u=e.input;for(e.avail_in=r,e.next_in=0,e.input=t,Ve(n);n.lookahead>=3;){let e=n.strstart,t=n.lookahead-2;do{n.ins_h=Fe(n,n.ins_h,n.window[e+3-1]),n.prev[e&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=e,e++}while(--t);n.strstart=e,n.lookahead=2,Ve(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,e.next_in=a,e.input=u,e.avail_in=i,n.wrap=o,ye},deflateInfo:"pako deflate (from Nodeca project)"};const rt=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var nt={assign:function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const r=t.shift();if(r){if("object"!=typeof r)throw new TypeError(r+"must be non-object");for(const t in r)rt(r,t)&&(e[t]=r[t])}}return e},flattenChunks:e=>{let t=0;for(let r=0,n=e.length;r=252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;it[254]=it[254]=1;var at={string2buf:e=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);let t,r,n,o,i,a=e.length,u=0;for(o=0;o>>6,t[i++]=128|63&r):r<65536?(t[i++]=224|r>>>12,t[i++]=128|r>>>6&63,t[i++]=128|63&r):(t[i++]=240|r>>>18,t[i++]=128|r>>>12&63,t[i++]=128|r>>>6&63,t[i++]=128|63&r);return t},buf2string:(e,t)=>{const r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));let n,o;const i=new Array(2*r);for(o=0,n=0;n4)i[o++]=65533,n+=a-1;else{for(t&=2===a?31:3===a?15:7;a>1&&n1?i[o++]=65533:t<65536?i[o++]=t:(t-=65536,i[o++]=55296|t>>10&1023,i[o++]=56320|1023&t)}}return((e,t)=>{if(t<65534&&e.subarray&&ot)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let r="";for(let n=0;n{(t=t||e.length)>e.length&&(t=e.length);let r=t-1;for(;r>=0&&128==(192&e[r]);)r--;return r<0||0===r?t:r+it[e[r]]>t?r:t}},ut=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const ct=Object.prototype.toString,{Z_NO_FLUSH:lt,Z_SYNC_FLUSH:st,Z_FULL_FLUSH:ft,Z_FINISH:pt,Z_OK:dt,Z_STREAM_END:ht,Z_DEFAULT_COMPRESSION:yt,Z_DEFAULT_STRATEGY:vt,Z_DEFLATED:mt}=oe;function bt(e){this.options=nt.assign({level:yt,method:mt,chunkSize:16384,windowBits:15,memLevel:8,strategy:vt},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;let r=tt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(r!==dt)throw new Error(ne[r]);if(t.header&&tt.deflateSetHeader(this.strm,t.header),t.dictionary){let e;if(e="string"==typeof t.dictionary?at.string2buf(t.dictionary):"[object ArrayBuffer]"===ct.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,r=tt.deflateSetDictionary(this.strm,e),r!==dt)throw new Error(ne[r]);this._dict_set=!0}}function gt(e,t){const r=new bt(t);if(r.push(e,!0),r.err)throw r.msg||ne[r.err];return r.result}bt.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize;let o,i;if(this.ended)return!1;for(i=t===~~t?t:!0===t?pt:lt,"string"==typeof e?r.input=at.string2buf(e):"[object ArrayBuffer]"===ct.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),(i===st||i===ft)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if(o=tt.deflate(r,i),o===ht)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),o=tt.deflateEnd(this.strm),this.onEnd(o),this.ended=!0,o===dt;if(0!==r.avail_out){if(i>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},bt.prototype.onData=function(e){this.chunks.push(e)},bt.prototype.onEnd=function(e){e===dt&&(this.result=nt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var wt={Deflate:bt,deflate:gt,deflateRaw:function(e,t){return(t=t||{}).raw=!0,gt(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,gt(e,t)},constants:oe};const St=16209;var At=function(e,t){let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,A,x,O,E;const j=e.state;r=e.next_in,O=e.input,n=r+(e.avail_in-5),o=e.next_out,E=e.output,i=o-(t-e.avail_out),a=o+(e.avail_out-257),u=j.dmax,c=j.wsize,l=j.whave,s=j.wnext,f=j.window,p=j.hold,d=j.bits,h=j.lencode,y=j.distcode,v=(1<>>24,p>>>=g,d-=g,g=b>>>16&255,0===g)E[o++]=65535&b;else{if(!(16&g)){if(0==(64&g)){b=h[(65535&b)+(p&(1<>>=g,d-=g),d<15&&(p+=O[r++]<>>24,p>>>=g,d-=g,g=b>>>16&255,!(16&g)){if(0==(64&g)){b=y[(65535&b)+(p&(1<u){e.msg="invalid distance too far back",j.mode=St;break e}if(p>>>=g,d-=g,g=o-i,S>g){if(g=S-g,g>l&&j.sane){e.msg="invalid distance too far back",j.mode=St;break e}if(A=0,x=f,0===s){if(A+=c-g,g2;)E[o++]=x[A++],E[o++]=x[A++],E[o++]=x[A++],w-=3;w&&(E[o++]=x[A++],w>1&&(E[o++]=x[A++]))}else{A=o-S;do{E[o++]=E[A++],E[o++]=E[A++],E[o++]=E[A++],w-=3}while(w>2);w&&(E[o++]=E[A++],w>1&&(E[o++]=E[A++]))}break}}break}}while(r>3,r-=w,d-=w<<3,p&=(1<{const c=u.bits;let l,s,f,p,d,h,y=0,v=0,m=0,b=0,g=0,w=0,S=0,A=0,x=0,O=0,E=null;const j=new Uint16Array(16),P=new Uint16Array(16);let k,C,_,L=null;for(y=0;y<=15;y++)j[y]=0;for(v=0;v=1&&0===j[b];b--);if(g>b&&(g=b),0===b)return o[i++]=20971520,o[i++]=20971520,u.bits=1,0;for(m=1;m0&&(0===e||1!==b))return-1;for(P[1]=0,y=1;y<15;y++)P[y+1]=P[y]+j[y];for(v=0;v852||2===e&&x>592)return 1;for(;;){k=y-S,a[v]+1=h?(C=L[a[v]-h],_=E[a[v]-h]):(C=96,_=0),l=1<>S)+s]=k<<24|C<<16|_|0}while(0!==s);for(l=1<>=1;if(0!==l?(O&=l-1,O+=l):O=0,v++,0==--j[y]){if(y===b)break;y=t[r+a[v]]}if(y>g&&(O&p)!==f){for(0===S&&(S=g),d+=m,w=y-S,A=1<852||2===e&&x>592)return 1;f=O&p,o[f]=g<<24|w<<16|d-i|0}}return 0!==O&&(o[d+O]=y-S<<24|64<<16|0),u.bits=g,0};const{Z_FINISH:kt,Z_BLOCK:Ct,Z_TREES:_t,Z_OK:Lt,Z_STREAM_END:Tt,Z_NEED_DICT:It,Z_STREAM_ERROR:Mt,Z_DATA_ERROR:Rt,Z_MEM_ERROR:Nt,Z_BUF_ERROR:Ft,Z_DEFLATED:Dt}=oe,Bt=16180,zt=16190,Gt=16191,Ut=16192,Ht=16194,Vt=16199,Wt=16200,qt=16206,Qt=16209,$t=e=>(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24);function Yt(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const Kt=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode16211?1:0},Jt=e=>{if(Kt(e))return Mt;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Bt,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(852),t.distcode=t.distdyn=new Int32Array(592),t.sane=1,t.back=-1,Lt},Xt=e=>{if(Kt(e))return Mt;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,Jt(e)},Zt=(e,t)=>{let r;if(Kt(e))return Mt;const n=e.state;return t<0?(r=0,t=-t):(r=5+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?Mt:(null!==n.window&&n.wbits!==t&&(n.window=null),n.wrap=r,n.wbits=t,Xt(e))},er=(e,t)=>{if(!e)return Mt;const r=new Yt;e.state=r,r.strm=e,r.window=null,r.mode=Bt;const n=Zt(e,t);return n!==Lt&&(e.state=null),n};let tr,rr,nr=!0;const or=e=>{if(nr){tr=new Int32Array(512),rr=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Pt(1,e.lens,0,288,tr,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Pt(2,e.lens,0,32,rr,0,e.work,{bits:5}),nr=!1}e.lencode=tr,e.lenbits=9,e.distcode=rr,e.distbits=5},ir=(e,t,r,n)=>{let o;const i=e.state;return null===i.window&&(i.wsize=1<=i.wsize?(i.window.set(t.subarray(r-i.wsize,r),0),i.wnext=0,i.whave=i.wsize):(o=i.wsize-i.wnext,o>n&&(o=n),i.window.set(t.subarray(r-n,r-n+o),i.wnext),(n-=o)?(i.window.set(t.subarray(r-n,r),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=o,i.wnext===i.wsize&&(i.wnext=0),i.whaveer(e,15),inflateInit2:er,inflate:(e,t)=>{let r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,A,x,O=0;const E=new Uint8Array(4);let j,P;const k=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Kt(e)||!e.output||!e.input&&0!==e.avail_in)return Mt;r=e.state,r.mode===Gt&&(r.mode=Ut),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,f=u,p=c,x=Lt;e:for(;;)switch(r.mode){case Bt:if(0===r.wrap){r.mode=Ut;break}for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=re(r.check,E,2,0),l=0,s=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",r.mode=Qt;break}if((15&l)!==Dt){e.msg="unknown compression method",r.mode=Qt;break}if(l>>>=4,s-=4,A=8+(15&l),0===r.wbits&&(r.wbits=A),A>15||A>r.wbits){e.msg="invalid window size",r.mode=Qt;break}r.dmax=1<>8&1),512&r.flags&&4&r.wrap&&(E[0]=255&l,E[1]=l>>>8&255,r.check=re(r.check,E,2,0)),l=0,s=0,r.mode=16182;case 16182:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,r.check=re(r.check,E,4,0)),l=0,s=0,r.mode=16183;case 16183:for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>8),512&r.flags&&4&r.wrap&&(E[0]=255&l,E[1]=l>>>8&255,r.check=re(r.check,E,2,0)),l=0,s=0,r.mode=16184;case 16184:if(1024&r.flags){for(;s<16;){if(0===u)break e;u--,l+=n[i++]<>>8&255,r.check=re(r.check,E,2,0)),l=0,s=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags&&(d=r.length,d>u&&(d=u),d&&(r.head&&(A=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(n.subarray(i,i+d),A)),512&r.flags&&4&r.wrap&&(r.check=re(r.check,n,d,i)),u-=d,i+=d,r.length-=d),r.length))break e;r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===u)break e;d=0;do{A=n[i+d++],r.head&&A&&r.length<65536&&(r.head.name+=String.fromCharCode(A))}while(A&&d>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=Gt;break;case 16189:for(;s<32;){if(0===u)break e;u--,l+=n[i++]<>>=7&s,s-=7&s,r.mode=qt;break}for(;s<3;){if(0===u)break e;u--,l+=n[i++]<>>=1,s-=1,3&l){case 0:r.mode=16193;break;case 1:if(or(r),r.mode=Vt,t===_t){l>>>=2,s-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=Qt}l>>>=2,s-=2;break;case 16193:for(l>>>=7&s,s-=7&s;s<32;){if(0===u)break e;u--,l+=n[i++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=Qt;break}if(r.length=65535&l,l=0,s=0,r.mode=Ht,t===_t)break e;case Ht:r.mode=16195;case 16195:if(d=r.length,d){if(d>u&&(d=u),d>c&&(d=c),0===d)break e;o.set(n.subarray(i,i+d),a),u-=d,i+=d,c-=d,a+=d,r.length-=d;break}r.mode=Gt;break;case 16196:for(;s<14;){if(0===u)break e;u--,l+=n[i++]<>>=5,s-=5,r.ndist=1+(31&l),l>>>=5,s-=5,r.ncode=4+(15&l),l>>>=4,s-=4,r.nlen>286||r.ndist>30){e.msg="too many length or distance symbols",r.mode=Qt;break}r.have=0,r.mode=16197;case 16197:for(;r.have>>=3,s-=3}for(;r.have<19;)r.lens[k[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,j={bits:r.lenbits},x=Pt(0,r.lens,0,19,r.lencode,0,r.work,j),r.lenbits=j.bits,x){e.msg="invalid code lengths set",r.mode=Qt;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,m=O>>>16&255,b=65535&O,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=v,s-=v,r.lens[r.have++]=b;else{if(16===b){for(P=v+2;s>>=v,s-=v,0===r.have){e.msg="invalid bit length repeat",r.mode=Qt;break}A=r.lens[r.have-1],d=3+(3&l),l>>>=2,s-=2}else if(17===b){for(P=v+3;s>>=v,s-=v,A=0,d=3+(7&l),l>>>=3,s-=3}else{for(P=v+7;s>>=v,s-=v,A=0,d=11+(127&l),l>>>=7,s-=7}if(r.have+d>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=Qt;break}for(;d--;)r.lens[r.have++]=A}}if(r.mode===Qt)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=Qt;break}if(r.lenbits=9,j={bits:r.lenbits},x=Pt(1,r.lens,0,r.nlen,r.lencode,0,r.work,j),r.lenbits=j.bits,x){e.msg="invalid literal/lengths set",r.mode=Qt;break}if(r.distbits=6,r.distcode=r.distdyn,j={bits:r.distbits},x=Pt(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,j),r.distbits=j.bits,x){e.msg="invalid distances set",r.mode=Qt;break}if(r.mode=Vt,t===_t)break e;case Vt:r.mode=Wt;case Wt:if(u>=6&&c>=258){e.next_out=a,e.avail_out=c,e.next_in=i,e.avail_in=u,r.hold=l,r.bits=s,At(e,p),a=e.next_out,o=e.output,c=e.avail_out,i=e.next_in,n=e.input,u=e.avail_in,l=r.hold,s=r.bits,r.mode===Gt&&(r.back=-1);break}for(r.back=0;O=r.lencode[l&(1<>>24,m=O>>>16&255,b=65535&O,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=O>>>24,m=O>>>16&255,b=65535&O,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,r.length=b,0===m){r.mode=16205;break}if(32&m){r.back=-1,r.mode=Gt;break}if(64&m){e.msg="invalid literal/length code",r.mode=Qt;break}r.extra=15&m,r.mode=16201;case 16201:if(r.extra){for(P=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;O=r.distcode[l&(1<>>24,m=O>>>16&255,b=65535&O,!(v<=s);){if(0===u)break e;u--,l+=n[i++]<>g)],v=O>>>24,m=O>>>16&255,b=65535&O,!(g+v<=s);){if(0===u)break e;u--,l+=n[i++]<>>=g,s-=g,r.back+=g}if(l>>>=v,s-=v,r.back+=v,64&m){e.msg="invalid distance code",r.mode=Qt;break}r.offset=b,r.extra=15&m,r.mode=16203;case 16203:if(r.extra){for(P=r.extra;s>>=r.extra,s-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=Qt;break}r.mode=16204;case 16204:if(0===c)break e;if(d=p-c,r.offset>d){if(d=r.offset-d,d>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=Qt;break}d>r.wnext?(d-=r.wnext,h=r.wsize-d):h=r.wnext-d,d>r.length&&(d=r.length),y=r.window}else y=o,h=a-r.offset,d=r.length;d>c&&(d=c),c-=d,r.length-=d;do{o[a++]=y[h++]}while(--d);0===r.length&&(r.mode=Wt);break;case 16205:if(0===c)break e;o[a++]=r.length,c--,r.mode=Wt;break;case qt:if(r.wrap){for(;s<32;){if(0===u)break e;u--,l|=n[i++]<{if(Kt(e))return Mt;let t=e.state;return t.window&&(t.window=null),e.state=null,Lt},inflateGetHeader:(e,t)=>{if(Kt(e))return Mt;const r=e.state;return 0==(2&r.wrap)?Mt:(r.head=t,t.done=!1,Lt)},inflateSetDictionary:(e,t)=>{const r=t.length;let n,o,i;return Kt(e)?Mt:(n=e.state,0!==n.wrap&&n.mode!==zt?Mt:n.mode===zt&&(o=1,o=ee(o,t,r,0),o!==n.check)?Rt:(i=ir(e,t,r,r),i?(n.mode=16210,Nt):(n.havedict=1,Lt)))},inflateInfo:"pako inflate (from Nodeca project)"},ur=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const cr=Object.prototype.toString,{Z_NO_FLUSH:lr,Z_FINISH:sr,Z_OK:fr,Z_STREAM_END:pr,Z_NEED_DICT:dr,Z_STREAM_ERROR:hr,Z_DATA_ERROR:yr,Z_MEM_ERROR:vr}=oe;function mr(e){this.options=nt.assign({chunkSize:65536,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new ut,this.strm.avail_out=0;let r=ar.inflateInit2(this.strm,t.windowBits);if(r!==fr)throw new Error(ne[r]);if(this.header=new ur,ar.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=at.string2buf(t.dictionary):"[object ArrayBuffer]"===cr.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(r=ar.inflateSetDictionary(this.strm,t.dictionary),r!==fr)))throw new Error(ne[r])}function br(e,t){const r=new mr(t);if(r.push(e),r.err)throw r.msg||ne[r.err];return r.result}mr.prototype.push=function(e,t){const r=this.strm,n=this.options.chunkSize,o=this.options.dictionary;let i,a,u;if(this.ended)return!1;for(a=t===~~t?t:!0===t?sr:lr,"[object ArrayBuffer]"===cr.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;;){for(0===r.avail_out&&(r.output=new Uint8Array(n),r.next_out=0,r.avail_out=n),i=ar.inflate(r,a),i===dr&&o&&(i=ar.inflateSetDictionary(r,o),i===fr?i=ar.inflate(r,a):i===yr&&(i=dr));r.avail_in>0&&i===pr&&r.state.wrap>0&&0!==e[r.next_in];)ar.inflateReset(r),i=ar.inflate(r,a);switch(i){case hr:case yr:case dr:case vr:return this.onEnd(i),this.ended=!0,!1}if(u=r.avail_out,r.next_out&&(0===r.avail_out||i===pr))if("string"===this.options.to){let e=at.utf8border(r.output,r.next_out),t=r.next_out-e,o=at.buf2string(r.output,e);r.next_out=t,r.avail_out=n-t,t&&r.output.set(r.output.subarray(e,e+t),0),this.onData(o)}else this.onData(r.output.length===r.next_out?r.output:r.output.subarray(0,r.next_out));if(i!==fr||0!==u){if(i===pr)return i=ar.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(0===r.avail_in)break}}return!0},mr.prototype.onData=function(e){this.chunks.push(e)},mr.prototype.onEnd=function(e){e===fr&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=nt.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var gr={Inflate:mr,inflate:br,inflateRaw:function(e,t){return(t=t||{}).raw=!0,br(e,t)},ungzip:br,constants:oe};const{Deflate:wr,deflate:Sr,deflateRaw:Ar,gzip:xr}=wt,{Inflate:Or,inflate:Er,inflateRaw:jr,ungzip:Pr}=gr;var kr=jr;function Cr(e){return Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cr(e)}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(i.s();!(n=i.n()).done;){var a=n.value;t&&r&&Number(a.offset)-r<=2e3?(t.length=BigInt(Number(t.length)+Number(a.length)-r+Number(a.offset)),t.blocks.push(a)):o.push(t={blocks:[a],length:a.length,offset:a.offset}),r=Number(t.offset)+Number(t.length)}}catch(e){i.e(e)}finally{i.f()}return o}function Fr(e){if(e&&e.aborted){if("undefined"==typeof DOMException){var t=new Rr("aborted");throw t.code="ERR_ABORTED",t}throw new DOMException("aborted","AbortError")}}function Dr(e){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Dr(e)}function Br(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function zr(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ur(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Vr(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Wr(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Vr(i,n,o,a,u,"next",e)}function u(e){Vr(i,n,o,a,u,"throw",e)}a(void 0)}))}}function qr(e,t){for(var r=0;r=r}var Kr=function(){function e(t,r,n,i,a,u){var c,l=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.bbi=t,this.refsByName=r,this.cirTreeOffset=n,this.isBigEndian=i,this.isCompressed=a,this.blockType=u,this.featureCache=new(d())({cache:new(y())({maxSize:1e3}),fill:(c=Wr(Hr().mark((function e(t,r){var n,i,a,u;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=Number(t.length),i=Number(t.offset),e.next=4,l.bbi.read(o.Buffer.alloc(n),0,n,i,{signal:r});case 4:return a=e.sent,u=a.buffer,e.abrupt("return",u);case 7:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)})}),!(n>=0))throw new Error("invalid cirTreeOffset!");var s=function(e){var t=e?"big":"little",r=(new f).endianess(t).uint32("chromId").uint32("start").uint32("end").uint32("validCnt").floatle("minScore").floatle("maxScore").floatle("sumData").floatle("sumSqData").saveOffset("offset"),n=(new f).endianess(t).uint8("isLeaf").skip(1).uint16("cnt").choice({tag:"isLeaf",choices:{1:(new f).endianess(t).array("blocksToFetch",{length:"cnt",type:(new f).endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").uint64("blockSize").saveOffset("offset")}),0:(new f).array("recurOffsets",{length:"cnt",type:(new f).endianess(t).uint32("startChrom").uint32("startBase").uint32("endChrom").uint32("endBase").uint64("blockOffset").saveOffset("offset")})}}),o=(new f).endianess(t).uint32("chromId").int32("start").int32("end").string("rest",{zeroTerminated:!0}).saveOffset("offset");return{bigWigParser:(new f).endianess(t).skip(4).int32("blockStart").skip(4).uint32("itemStep").uint32("itemSpan").uint8("blockType").skip(1).uint16("itemCount").choice({tag:"blockType",choices:Qr(Qr(Qr({},3,(new f).array("items",{length:"itemCount",type:(new f).floatle("score")})),2,(new f).array("items",{length:"itemCount",type:(new f).endianess(t).int32("start").floatle("score")})),1,(new f).array("items",{length:"itemCount",type:(new f).endianess(t).int32("start").int32("end").floatle("score")}))}),bigBedParser:o,summaryParser:r,leafParser:n}}(i);this.leafParser=s.leafParser,this.bigBedParser=s.bigBedParser}var t,r,n,i;return t=e,r=[{key:"readWigData",value:(i=Wr(Hr().mark((function e(t,r,n,i,a){var u,c,l,s,f,p,d,h,y,v,m,b,g,S,A,x=this;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,u=this.refsByName,c=this.bbi,l=this.cirTreeOffset,s=this.isBigEndian,void 0===(f=u[t])&&i.complete(),p={chrId:f,start:r,end:n},this.cirTreePromise||(this.cirTreePromise=c.read(o.Buffer.alloc(48),0,48,Number(l),a)),e.next=8,this.cirTreePromise;case 8:return d=e.sent,h=d.buffer,y=s?h.readUInt32BE(4):h.readUInt32LE(4),v=[],m=0,b=function(e,t,r){try{var n=e.subarray(t),o=x.leafParser.parse(n);if(o.blocksToFetch&&(v=v.concat(o.blocksToFetch.filter((function(e){return g(e)})).map((function(e){return{offset:e.blockOffset,length:e.blockSize}})))),o.recurOffsets){var a=o.recurOffsets.filter((function(e){return g(e)})).map((function(e){return Number(e.blockOffset)}));a.length>0&&A(a,r+1)}}catch(e){i.error(e)}},g=function(e){var t=e.startChrom,o=e.startBase,i=e.endChrom,a=e.endBase;return(tf||i===f&&a>=r)},S=function(){var e=Wr(Hr().mark((function e(t,r,n){var o,u,c,l,s,f;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,o=r.max()-r.min(),u=r.min(),e.next=5,x.featureCache.get("".concat(o,"_").concat(u),{length:o,offset:u},null==a?void 0:a.signal);case 5:c=e.sent,l=Gr(t);try{for(l.s();!(s=l.n()).done;)f=s.value,r.contains(f)&&(b(c,f-u,n),0==(m-=1)&&x.readFeatures(i,v,zr(zr({},a),{},{request:p})))}catch(e){l.e(e)}finally{l.f()}e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),i.error(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,r,n){return e.apply(this,arguments)}}(),A=function(e,t){try{m+=e.length;for(var r=4+32*Number(y),n=new w(e[0],e[0]+r),o=1;o2&&void 0!==s[2]?s[2]:{},e.prev=1,o=this.blockType,i=this.isCompressed,a=n.signal,u=n.request,c=Nr(r),Fr(a),e.next=8,Promise.all(c.map(function(){var e=Wr(Hr().mark((function e(r){var n,c,s,f,p,d,h,y;return Hr().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Fr(a),n=r.length,c=r.offset,e.next=4,l.featureCache.get("".concat(n,"_").concat(c),r,a);case 4:s=e.sent,f=Gr(r.blocks),e.prev=6,f.s();case 8:if((p=f.n()).done){e.next=27;break}d=p.value,Fr(a),h=Number(d.offset)-Number(r.offset),y=s,i&&(v=s.subarray(h),y=kr(v.subarray(2)),h=0),Fr(a),e.t0=o,e.next="summary"===e.t0?18:"bigwig"===e.t0?20:"bigbed"===e.t0?22:24;break;case 18:return t.next(l.parseSummaryBlock(y,h,u)),e.abrupt("break",25);case 20:return t.next(l.parseBigWigBlock(y,h,u)),e.abrupt("break",25);case 22:return t.next(l.parseBigBedBlock(y,h,256*Number(d.offset),u)),e.abrupt("break",25);case 24:console.warn("Don't know what to do with ".concat(o));case 25:e.next=8;break;case 27:e.next=32;break;case 29:e.prev=29,e.t1=e.catch(6),f.e(e.t1);case 32:return e.prev=32,f.f(),e.finish(32);case 35:case"end":return e.stop()}var v}),e,null,[[6,29,32,35]])})));return function(t){return e.apply(this,arguments)}}()));case 8:t.complete(),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.error(e.t0);case 14:case"end":return e.stop()}}),e,this,[[1,11]])}))),function(e,t){return n.apply(this,arguments)})}],r&&qr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Jr=r(39962),Xr=r(19157),Zr=r(69191),en=r(83809);function tn(e){return tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},tn(e)}function rn(){rn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==tn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function nn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function on(e){for(var t=1;t1&&void 0!==y[1]?y[1]:2e3,e.next=3,this.bbi.read(o.Buffer.alloc(r),0,r,0,t);case 3:if(n=e.sent,i=n.buffer,a=this._isBigEndian(i),u=pn(a),c=u.headerParser.parse(i),l=c.magic,s=c.asOffset,f=c.totalSummaryOffset,c.fileType=l===fn?"bigbed":"bigwig",!(s>r||f>r)){e.next=12;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 12:if(s&&(p=Number(c.asOffset),c.autoSql=(v=i.subarray(p,i.indexOf(0,p)),(new TextDecoder).decode(v))),!(c.totalSummaryOffset>r-40)){e.next=15;break}return e.abrupt("return",this._getMainHeader(t,2*r));case 15:return c.totalSummaryOffset&&(d=i.subarray(Number(c.totalSummaryOffset)),h=u.totalSummaryParser.parse(d),c.totalSummary=on(on({},h),{},{basesCovered:Number(h.basesCovered)})),e.abrupt("return",on(on({},c),{},{isBigEndian:a}));case 17:case"end":return e.stop()}var v}),e,this)}))),function(e){return c.apply(this,arguments)})},{key:"_isBigEndian",value:function(e){var t=e.readInt32LE(0);if(t===sn||t===fn)return!1;if((t=e.readInt32BE(0))===sn||t===fn)return!0;throw new Error("not a BigWig/BigBed file")}},{key:"_readChromTree",value:(u=un(rn().mark((function e(t,r){var n,i,a,u,c,l,s,p,d,h,y,v,m,b,g,w=this;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:for(n=t.isBigEndian,i=n?"big":"little",a=[],u={},c=Number(t.unzoomedDataOffset),l=Number(t.chromTreeOffset);c%4!=0;)c+=1;return s=c-l,e.next=10,this.bbi.read(o.Buffer.alloc(s),0,s,Number(l),r);case 10:return p=e.sent,d=p.buffer,h=pn(n),y=h.chromTreeParser.parse(d),v=y.keySize,m=(new f).endianess(i).string("key",{stripNull:!0,length:v}).uint32("refId").uint32("refSize").saveOffset("offset"),b=(new f).endianess(i).skip(v).uint64("childOffset").saveOffset("offset"),g=function(){var e=un(rn().mark((function e(t){var r,n,o,i,c,s,f,p,y,v,S,A,x,O;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((r=t)>=d.length)){e.next=3;break}throw new Error("reading beyond end of buffer");case 3:if(n=h.isLeafNode.parse(d.subarray(r)),o=n.isLeafNode,i=n.cnt,r+=n.offset,!o){e.next=10;break}for(c=0;c0,u));case 9:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getFeatureStream",value:(i=un(rn().mark((function e(t,r,n,o){var i,a,u,c,l;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(o);case 2:if(i=this.renameRefSeqs(t),c=(u=o||{}).basesPerSpan,l=u.scale,!c){e.next=10;break}return e.next=7,this.getView(1/c,o);case 7:a=e.sent,e.next=19;break;case 10:if(!l){e.next=16;break}return e.next=13,this.getView(l,o);case 13:a=e.sent,e.next=19;break;case 16:return e.next=18,this.getView(1,o);case 18:a=e.sent;case 19:return e.abrupt("return",new Xr.c((function(e){a.readWigData(i,r,n,e,o)})));case 20:case"end":return e.stop()}}),e,this)}))),function(e,t,r,n){return i.apply(this,arguments)})},{key:"getFeatures",value:(n=un(rn().mark((function e(t,r,n,o){var i,a;return rn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getFeatureStream(t,r,n,o);case 2:return i=e.sent,e.next=5,(0,Zr._)(i.pipe((0,en.$)()));case 5:return a=e.sent,e.abrupt("return",a.flat());case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r,o){return n.apply(this,arguments)})}],r&&cn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function hn(e){return hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},hn(e)}function yn(){yn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==hn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function vn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function mn(e,t){for(var r=0;r=0)){e.next=20;break}if(!((p=o[f])&&p.reductionLevel<=2*l)){e.next=17;break}return d=Number(p.indexOffset),e.abrupt("return",new Kr(this.bbi,i,d,u,c>0,"summary"));case 17:f-=1,e.next=12;break;case 20:return e.abrupt("return",this.getUnzoomedView(r));case 21:case"end":return e.stop()}}),e,this)})),i=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function a(e){vn(i,r,n,a,u,"next",e)}function u(e){vn(i,r,n,a,u,"throw",e)}a(void 0)}))},function(e,t){return i.apply(this,arguments)})}],n&&mn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(dn),On=r(61436),En=r(41327),jn=r(17133);function Pn(e){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Pn(e)}var kn=["signal"];function Cn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=_n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function _n(e,t){if(e){if("string"==typeof e)return Ln(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ln(e,t):void 0}}function Ln(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function In(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Mn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){In(i,n,o,a,u,"next",e)}function u(e){In(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Rn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Nn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.signal,r=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,kn);return this.readIndicesCache.get(JSON.stringify(r),e,t)}},{key:"getView",value:(c=Mn(Tn().mark((function e(t,r){return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.getUnzoomedView(r));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return c.apply(this,arguments)})},{key:"_readIndices",value:(u=Mn(Tn().mark((function e(t){var r,n,i,a,u,c,l,s,p,d,h,y,v,m,b,g;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader(t);case 2:return r=e.sent,n=r.extHeaderOffset,i=r.isBigEndian,e.next=7,this.bbi.read(o.Buffer.alloc(64),0,64,Number(n));case 7:if(a=e.sent,u=a.buffer,c=i?"big":"little",l=(new f).endianess(c).uint16("size").uint16("count").uint64("offset").parse(u),s=l.count,p=l.offset,0!==s){e.next=14;break}return e.abrupt("return",[]);case 14:return h=(d=20)*s,e.next=18,this.bbi.read(o.Buffer.alloc(h),0,h,Number(p));case 18:for(y=e.sent,v=y.buffer,m=(new f).endianess(c).int16("type").int16("fieldcount").uint64("offset").skip(4).int16("field"),b=[],g=0;g1&&void 0!==l[1]?l[1]:{},e.next=3,this.getHeader(r);case 3:return n=e.sent,i=n.isBigEndian,e.next=7,this.readIndices(r);case 7:if(0!==(a=e.sent).length){e.next=10;break}return e.abrupt("return",[]);case 10:return u=a.map(function(){var e=Mn(Tn().mark((function e(n){var a,u,l,s,p,d,h,y,v,m,b,g;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.offset,u=n.field,e.next=3,c.bbi.read(o.Buffer.alloc(32),0,32,Number(a),r);case 3:return l=e.sent,s=l.buffer,p=i?"big":"little",d=(new f).endianess(p).int32("magic").int32("blockSize").int32("keySize").int32("valSize").uint64("itemCount"),h=d.parse(s),y=h.blockSize,v=h.keySize,m=h.valSize,b=(new f).endianess(p).int8("nodeType").skip(1).int16("cnt").choice({tag:"nodeType",choices:{0:(new f).array("leafkeys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset")}),1:(new f).array("keys",{length:"cnt",type:(new f).endianess(p).string("key",{length:v,stripNull:!0}).uint64("offset").uint32("length").uint32("reserved")})}}),g=function(){var e=Mn(Tn().mark((function e(n){var i,a,l,s,f,p,d,h,w;return Tn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=Number(n),a=4+y*(v+m),e.next=4,c.bbi.read(o.Buffer.alloc(a),0,a,i,r);case 4:if(l=e.sent,s=l.buffer,!(f=b.parse(s)).leafkeys){e.next=18;break}d=0;case 9:if(!(d1&&void 0!==u[1]?u[1]:{},e.next=3,this.searchExtraIndexBlocks(t,r);case 3:if(0!==(n=e.sent).length){e.next=6;break}return e.abrupt("return",[]);case 6:return e.next=8,this.getUnzoomedView(r);case 8:return o=e.sent,i=n.map((function(e){return new Xr.c((function(t){o.readFeatures(t,[e],r)})).pipe((0,En.T)((function(e,t){return e.concat(t)})),(0,jn.T)((function(t){var r,n=Cn(t);try{for(n.s();!(r=n.n()).done;)r.value.field=e.field}catch(e){n.e(e)}finally{n.f()}return t})))})),e.next=12,(0,Zr._)(On.h.apply(void 0,function(e){if(Array.isArray(e))return Ln(e)}(c=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||_n(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()));case 12:return a=e.sent,e.abrupt("return",a.filter((function(e){var r;return(null===(r=e.rest)||void 0===r?void 0:r.split("\t")[(e.field||0)-3])===t})));case 14:case"end":return e.stop()}var c}),e,this)}))),function(e){return i.apply(this,arguments)})}],n&&Fn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(dn)},38004:e=>{"use strict";function t(e,r,n,o){this.message=e,this.expected=r,this.found=n,this.location=o,this.name="SyntaxError","function"==typeof Error.captureStackTrace&&Error.captureStackTrace(this,t)}!function(e,t){function r(){this.constructor=e}r.prototype=t.prototype,e.prototype=new r}(t,Error),t.buildMessage=function(e,t){var r={literal:function(e){return'"'+o(e.text)+'"'},class:function(e){var t,r="";for(t=0;t0){for(t=1,n=1;tRe&&(Re=Te,Ne=[]),Ne.push(e))}function We(){var t,r,n,i,a,p,d;return t=Te,et()!==o&&(r=qe())!==o&&et()!==o&&(n=Qe())!==o&&et()!==o&&(i=Ye())!==o&&et()!==o?(40===e.charCodeAt(Te)?(a=u,Te++):(a=o,0===Fe&&Ve(c)),a!==o&&et()!==o?(p=function(){var e,t,r,n,i;if(e=Te,(t=Ke())!==o)if(et()!==o){for(r=[],n=Te,et()!==o&&(i=Ke())!==o?(Ie=n,n=j(t,i)):(Te=n,n=o);n!==o;)r.push(n),n=Te,et()!==o&&(i=Ke())!==o?(Ie=n,n=j(t,i)):(Te=n,n=o);r!==o&&(n=et())!==o?(Ie=e,e=t=P(t,r)):(Te=e,e=o)}else Te=e,e=o;else Te=e,e=o;return e}(),p!==o&&et()!==o?(41===e.charCodeAt(Te)?(d=l,Te++):(d=o,0===Fe&&Ve(s)),d!==o&&et()!==o?(Ie=t,t=f(r,n,i,p)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t}function qe(){var t;return e.substr(Te,6)===p?(t=p,Te+=6):(t=o,0===Fe&&Ve(d)),t===o&&(e.substr(Te,6)===h?(t=h,Te+=6):(t=o,0===Fe&&Ve(y)),t===o&&(e.substr(Te,5)===v?(t=v,Te+=5):(t=o,0===Fe&&Ve(m)))),t}function Qe(){var t,r,n,i;return(t=Xe())===o&&(t=Te,(r=Xe())!==o&&(n=$e())!==o?t=r=[r,n]:(Te=t,t=o),t===o&&(t=Te,(r=Xe())!==o?(e.substr(Te,4)===b?(n=b,Te+=4):(n=o,0===Fe&&Ve(g)),n!==o?t=r=[r,n]:(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Xe())!==o&&(n=$e())!==o?(e.substr(Te,4)===b?(i=b,Te+=4):(i=o,0===Fe&&Ve(g)),i!==o?t=r=[r,n,i]:(Te=t,t=o)):(Te=t,t=o)))),t}function $e(){var t;return e.substr(Te,7)===w?(t=w,Te+=7):(t=o,0===Fe&&Ve(S)),t===o&&(e.substr(Te,5)===A?(t=A,Te+=5):(t=o,0===Fe&&Ve(x)),t===o&&(e.substr(Te,6)===O?(t=O,Te+=6):(t=o,0===Fe&&Ve(E)))),t}function Ye(){var e;return(e=Ze())===o&&(e=et()),e}function Ke(){var t,r,n,i,a,f,p,d;return t=Te,(r=Je())!==o&&et()!==o&&(n=Xe())!==o&&et()!==o?(59===e.charCodeAt(Te)?(i=_,Te++):(i=o,0===Fe&&Ve(L)),i!==o&&et()!==o&&(a=Ye())!==o?(Ie=t,t=r=T(r,n,a)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Je())!==o&&et()!==o?(91===e.charCodeAt(Te)?(n=I,Te++):(n=o,0===Fe&&Ve(M)),n!==o&&et()!==o?(i=function(){var t;return t=function(){var t,r,n;if(Fe++,t=Te,et()!==o){if(r=[],je.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&Ve(Pe)),n!==o)for(;n!==o;)r.push(n),je.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&Ve(Pe));else r=o;r!==o?(Ie=t,t=ke()):(Te=t,t=o)}else Te=t,t=o;return Fe--,t===o&&(o,0===Fe&&Ve(Ee)),t}(),t===o&&(t=Xe()),t}(),i!==o&&et()!==o?(93===e.charCodeAt(Te)?(a=R,Te++):(a=o,0===Fe&&Ve(N)),a!==o&&et()!==o&&(f=Xe())!==o&&et()!==o?(59===e.charCodeAt(Te)?(p=_,Te++):(p=o,0===Fe&&Ve(L)),p!==o&&et()!==o&&(d=Ye())!==o?(Ie=t,t=r=F(r,i,f,d)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=Te,(r=Je())!==o&&et()!==o?(40===e.charCodeAt(Te)?(n=u,Te++):(n=o,0===Fe&&Ve(c)),n!==o&&et()!==o?(i=function(){var t,r,n,i,a,u;if(t=Te,(r=Xe())!==o){for(n=[],i=Te,44===e.charCodeAt(Te)?(a=B,Te++):(a=o,0===Fe&&Ve(z)),a!==o&&et()!==o&&(u=Xe())!==o?(Ie=i,i=a=j(r,u)):(Te=i,i=o);i!==o;)n.push(i),i=Te,44===e.charCodeAt(Te)?(a=B,Te++):(a=o,0===Fe&&Ve(z)),a!==o&&et()!==o&&(u=Xe())!==o?(Ie=i,i=a=j(r,u)):(Te=i,i=o);n!==o?(Ie=t,t=r=G(r,n)):(Te=t,t=o)}else Te=t,t=o;return t}(),i!==o&&et()!==o?(41===e.charCodeAt(Te)?(a=l,Te++):(a=o,0===Fe&&Ve(s)),a!==o&&et()!==o&&(f=Xe())!==o&&et()!==o?(59===e.charCodeAt(Te)?(p=_,Te++):(p=o,0===Fe&&Ve(L)),p!==o&&et()!==o&&(d=Ye())!==o?(Ie=t,t=r=D(r,i,f,d)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o)):(Te=t,t=o),t===o&&(t=function(){var t,r,n,i,a;return t=Te,(r=et())!==o?(n=function(){var t;return 35===e.charCodeAt(Te)?(t=k,Te++):(t=o,0===Fe&&Ve(C)),t}(),n!==o&&(i=Ze())!==o&&(a=et())!==o?t=r=[r,n,i,a]:(Te=t,t=o)):(Te=t,t=o),t}()))),t}function Je(){var t,r,n;return e.substr(Te,3)===U?(t=U,Te+=3):(t=o,0===Fe&&Ve(H)),t===o&&(e.substr(Te,4)===V?(t=V,Te+=4):(t=o,0===Fe&&Ve(W)),t===o&&(e.substr(Te,5)===q?(t=q,Te+=5):(t=o,0===Fe&&Ve(Q)),t===o&&(e.substr(Te,6)===$?(t=$,Te+=6):(t=o,0===Fe&&Ve(Y)),t===o&&(e.substr(Te,4)===K?(t=K,Te+=4):(t=o,0===Fe&&Ve(J)),t===o&&(e.substr(Te,5)===X?(t=X,Te+=5):(t=o,0===Fe&&Ve(Z)),t===o&&(e.substr(Te,5)===ee?(t=ee,Te+=5):(t=o,0===Fe&&Ve(te)),t===o&&(e.substr(Te,4)===re?(t=re,Te+=4):(t=o,0===Fe&&Ve(ne)),t===o&&(e.substr(Te,6)===oe?(t=oe,Te+=6):(t=o,0===Fe&&Ve(ie)),t===o&&(e.substr(Te,7)===ae?(t=ae,Te+=7):(t=o,0===Fe&&Ve(ue)),t===o&&(e.substr(Te,4)===ce?(t=ce,Te+=4):(t=o,0===Fe&&Ve(le)),t===o&&(e.substr(Te,6)===se?(t=se,Te+=6):(t=o,0===Fe&&Ve(fe)),t===o&&(e.substr(Te,6)===pe?(t=pe,Te+=6):(t=o,0===Fe&&Ve(de)),t===o&&(e.substr(Te,3)===he?(t=he,Te+=3):(t=o,0===Fe&&Ve(ye)),t===o&&(t=Te,(r=qe())!==o&&et()!==o&&(n=Qe())!==o?(Ie=t,t=r=ve(r,n)):(Te=t,t=o))))))))))))))),t}function Xe(){var t,r,n,i,a;if(t=Te,r=Te,me.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&Ve(be)),n!==o){for(i=[],ge.test(e.charAt(Te))?(a=e.charAt(Te),Te++):(a=o,0===Fe&&Ve(we));a!==o;)i.push(a),ge.test(e.charAt(Te))?(a=e.charAt(Te),Te++):(a=o,0===Fe&&Ve(we));i!==o?r=n=[n,i]:(Te=r,r=o)}else Te=r,r=o;return r!==o&&(Ie=t,r=Se(r)),r}function Ze(){var t,r,n;for(t=Te,r=[],Ae.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&Ve(xe));n!==o;)r.push(n),Ae.test(e.charAt(Te))?(n=e.charAt(Te),Te++):(n=o,0===Fe&&Ve(xe));return r!==o&&(Ie=t,r=Oe(r)),r}function et(){var t,r;for(Fe++,t=[],_e.test(e.charAt(Te))?(r=e.charAt(Te),Te++):(r=o,0===Fe&&Ve(Le));r!==o;)t.push(r),_e.test(e.charAt(Te))?(r=e.charAt(Te),Te++):(r=o,0===Fe&&Ve(Le));return Fe--,t===o&&(r=o,0===Fe&&Ve(Ce)),t}if((n=a())!==o&&Te===e.length)return n;throw n!==o&&Te{"use strict";r.d(t,{A:()=>P});var n={};r.r(n),r.d(n,{bigChain:()=>a,bigGenePred:()=>u,bigInteract:()=>c,bigLink:()=>l,bigMaf:()=>s,bigNarrowPeak:()=>f,bigPsl:()=>p,defaultBedSchema:()=>d,mafFrames:()=>h,mafSummary:()=>y});var o=r(38004),i=r.n(o),a='table bigChain\n"bigChain pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint tSize; "size of target sequence"\n string qName; "name of query sequence"\n uint qSize; "size of query sequence"\n uint qStart; "start of alignment on query sequence"\n uint qEnd; "end of alignment on query sequence"\n uint chainScore; "score from chain"\n )',u='table bigGenePred\n"bigGenePred gene models"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - for strand"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n string name2; "Alternative/human readable name"\n string cdsStartStat; "Status of CDS start annotation (none, unknown, incomplete, or complete)"\n string cdsEndStat; "Status of CDS end annotation (none, unknown, incomplete, or complete)"\n int[blockCount] exonFrames; "Exon frame {0,1,2}, or -1 if no frame for exon"\n string type; "Transcript type"\n string geneName; "Primary identifier for gene"\n string geneName2; "Alternative/human readable gene name"\n string geneType; "Gene type"\n )',c='table interact\n"interaction between two regions"\n (\n string chrom; "Chromosome (or contig, scaffold, etc.). For interchromosomal, use 2 records"\n uint chromStart; "Start position of lower region. For interchromosomal, set to chromStart of this region"\n uint chromEnd; "End position of upper region. For interchromosomal, set to chromEnd of this region"\n string name; "Name of item, for display. Usually \'sourceName/targetName/exp\' or empty"\n uint score; "Score (0-1000)"\n double value; "Strength of interaction or other data value. Typically basis for score"\n string exp; "Experiment name (metadata for filtering). Use . if not applicable"\n string color; "Item color. Specified as r,g,b or hexadecimal #RRGGBB or html color name, as in //www.w3.org/TR/css3-color/#html4. Use 0 and spectrum setting to shade by score"\n string sourceChrom; "Chromosome of source region (directional) or lower region. For non-directional interchromosomal, chrom of this region."\n uint sourceStart; "Start position in chromosome of source/lower/this region"\n uint sourceEnd; "End position in chromosome of source/lower/this region"\n string sourceName; "Identifier of source/lower/this region"\n string sourceStrand; "Orientation of source/lower/this region: + or -. Use . if not applicable"\n string targetChrom; "Chromosome of target region (directional) or upper region. For non-directional interchromosomal, chrom of other region"\n uint targetStart; "Start position in chromosome of target/upper/this region"\n uint targetEnd; "End position in chromosome of target/upper/this region"\n string targetName; "Identifier of target/upper/this region"\n string targetStrand; "Orientation of target/upper/this region: + or -. Use . if not applicable"\n\n )',l='table bigLink\n"bigLink pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint qStart; "start of alignment on query sequence"\n )',s='table bedMaf\n"Bed3 with MAF block"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n lstring mafBlock; "MAF block"\n )',f='table bigNarrowPeak\n"BED6+4 Peaks of signal enrichment based on pooled, normalized (interpreted) data."\n(\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name;\t "Name given to a region (preferably unique). Use . if no name is assigned"\n uint score; "Indicates how dark the peak will be displayed in the browser (0-1000) "\n char[1] strand; "+ or - or . for unknown"\n float signalValue; "Measurement of average enrichment for the region"\n float pValue; "Statistical significance of signal value (-log10). Set to -1 if not used."\n float qValue; "Statistical significance with multiple-test correction applied (FDR -log10). Set to -1 if not used."\n int peak; "Point-source called for this peak; 0-based offset from chromStart. Set to -1 if no point-source called."\n)',p='table bigPsl\n"bigPsl pairwise alignment"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string name; "Name or ID of item, ideally both human readable and unique"\n uint score; "Score (0-1000)"\n char[1] strand; "+ or - indicates whether the query aligns to the + or - strand on the reference"\n uint thickStart; "Start of where display should be thick (start codon)"\n uint thickEnd; "End of where display should be thick (stop codon)"\n uint reserved; "RGB value (use R,G,B string in input file)"\n int blockCount; "Number of blocks"\n int[blockCount] blockSizes; "Comma separated list of block sizes"\n int[blockCount] chromStarts; "Start positions relative to chromStart"\n\n uint oChromStart;"Start position in other chromosome"\n uint oChromEnd; "End position in other chromosome"\n char[1] oStrand; "+ or -, - means that psl was reversed into BED-compatible coordinates"\n uint oChromSize; "Size of other chromosome."\n int[blockCount] oChromStarts; "Start positions relative to oChromStart or from oChromStart+oChromSize depending on strand"\n\n lstring oSequence; "Sequence on other chrom (or empty)"\n string oCDS; "CDS in NCBI format"\n\n uint chromSize;"Size of target chromosome"\n\n uint match; "Number of bases matched."\n uint misMatch; " Number of bases that don\'t match "\n uint repMatch; " Number of bases that match but are part of repeats "\n uint nCount; " Number of \'N\' bases "\n uint seqType; "0=empty, 1=nucleotide, 2=amino_acid"\n )',d='table defaultBedSchema\n"BED12"\n (\n string chrom; "The name of the chromosome (e.g. chr3, chrY, chr2_random) or scaffold (e.g. scaffold10671)."\n uint chromStart; "The starting position of the feature in the chromosome or scaffold. The first base in a chromosome is numbered 0."\n uint chromEnd; "The ending position of the feature in the chromosome or scaffold. The chromEnd base is not included in the display of the feature. For example, the first 100 bases of a chromosome are defined as chromStart=0, chromEnd=100, and span the bases numbered 0-99."\n string name; "Defines the name of the BED line."\n float score; "Feature score, doesn\'t care about the 0-1000 limit as in bed"\n char strand; "Defines the strand. Either \'.\' (=no strand) or \'+\' or \'-\'"\n uint thickStart; "The starting position at which the feature is drawn thickly (for example, the start codon in gene displays). When there is no thick part, thickStart and thickEnd are usually set to the chromStart position."\n uint thickEnd; "The ending position at which the feature is drawn thickly (for example the stop codon in gene displays)."\n string itemRgb; "An RGB value of the form R,G,B (e.g. 255,0,0). "\n uint blockCount; " The number of blocks (exons) in the BED line."\n uint[blockCount] blockSizes; " A comma-separated list of the block sizes. The number of items in this list should correspond to blockCount."\n uint[blockCount] blockStarts; "A comma-separated list of block starts. All of the blockStart positions should be calculated relative to chromStart. The number of items in this list should correspond to blockCount."\n )',h='table mafFrames\n"codon frame assignment for MAF components"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start range in chromosome"\n uint chromEnd; "End range in chromosome"\n string src; "Name of sequence source in MAF"\n ubyte frame; "frame (0,1,2) for first base(+) or last bast(-)"\n char[1] strand; "+ or -"\n string name; "Name of gene used to define frame"\n int prevFramePos; "target position of the previous base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n int nextFramePos; "target position of the next base (in transcription direction) that continues this frame, or -1 if none, or frame not contiguous"\n ubyte isExonStart; "does this start the CDS portion of an exon?"\n ubyte isExonEnd; "does this end the CDS portion of an exon?"\n )',y='table mafSummary\n"Positions and scores for alignment blocks"\n (\n string chrom; "Reference sequence chromosome or scaffold"\n uint chromStart; "Start position in chromosome"\n uint chromEnd; "End position in chromosome"\n string src; "Sequence name or database of alignment"\n float score; "Floating point score."\n char[1] leftStatus; "Gap/break annotation for preceding block"\n char[1] rightStatus; "Gap/break annotation for following block"\n )';function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t.autoSql)this.autoSql=S(i().parse(t.autoSql));else if(t.type){if(!m[t.type])throw new Error("Type not found");this.autoSql=S(m[t.type])}else this.autoSql=S(m.defaultBedSchema),this.attemptDefaultBed=!0}var t,r;return t=e,r=[{key:"parseLine",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.autoSql,n=t.uniqueId,o=Array.isArray(e)?e:e.split("\t"),i={};if(!this.attemptDefaultBed||this.attemptDefaultBed&&function(e){var t;return e.length>=12&&!Number.isNaN(parseInt(e[9],10))&&(null===(t=e[10])||void 0===t?void 0:t.split(",").filter((function(e){return!!e})).length)===parseInt(e[9],10)}(o))for(var a=0;a{"use strict";r.r(t),r.d(t,{BgzfFilehandle:()=>I,unzip:()=>s,unzipChunk:()=>p,unzipChunkSlice:()=>h});var n=r(85832),o=r(39962),i=r(159);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e){return f.apply(this,arguments)}function f(){return(f=l(u().mark((function e(t){var r,o,a,c,l,s,f,p,d,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:e.prev=0,o=0,a=0,c=[],l=0;case 5:if(f=t.subarray(o),s=new i.Inflate,r=s.strm,s.push(f,i.Z_SYNC_FLUSH),!s.err){e.next=12;break}throw new Error(s.msg);case 12:o+=r.next_in,c[a]=s.result,l+=c[a].length,a+=1;case 16:if(r.avail_in){e.next=5;break}case 17:for(p=new Uint8Array(l),d=0,h=0;d=c.blockPosition)){e.next=30;break}return f[y]=f[y].subarray(0,c.blockPosition===a.blockPosition?c.dataPosition-a.dataPosition+1:c.dataPosition+1),p.push(l),d.push(s),h+=f[y].length,e.abrupt("break",33);case 30:h+=f[y].length,y++;case 32:if(o.avail_in){e.next=9;break}case 33:for(S=new Uint8Array(h),A=0,x=0;A=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function w(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){w(i,n,o,a,u,"next",e)}function u(e){w(i,n,o,a,u,"throw",e)}a(void 0)}))}}function A(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=m().fromBytesLE(e.slice(t,t+8),r);if(n.greaterThan(Number.MAX_SAFE_INTEGER)||n.lessThan(Number.MIN_SAFE_INTEGER))throw new TypeError("integer overflow");return n.toNumber()}},{key:"_getIndex",value:function(){return this.index||(this.index=this._readIndex()),this.index}},{key:"_readIndex",value:(u=S(g().mark((function e(){var t,r,o,i,a,u,c;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.Buffer.allocUnsafe(8),e.next=3,this.filehandle.read(t,0,8,0);case 3:if(r=this._readLongWithOverflow(t,0,!0)){e.next=6;break}return e.abrupt("return",[[0,0]]);case 6:if((o=new Array(r+1))[0]=[0,0],!((i=16*r)>Number.MAX_SAFE_INTEGER)){e.next=11;break}throw new TypeError("integer overflow");case 11:return t=n.Buffer.allocUnsafe(i),e.next=14,this.filehandle.read(t,0,i,8);case 14:for(a=0;ar?0:n0?c=l-1:s<0&&(u=l+1),l=Math.ceil((c-u)/2)+u,s=a(o[l],o[l+1]);i.push(o[l]),f=l+1;case 15:if(!(f=n)){e.next=19;break}return e.abrupt("break",22);case 19:f+=1,e.next=15;break;case 22:return i[i.length-1][1]e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function C(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function _(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){C(i,n,o,a,u,"next",e)}function u(e){C(i,n,o,a,u,"throw",e)}a(void 0)}))}}function L(e,t){for(var r=0;r=i?0:i-d,y=Math.min(i+o,d+f.length)-d,h>=0&&h{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return o="function"==typeof Symbol&&"symbol"===n(Symbol.iterator)?function(e){return n(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":n(e)},o(e)}var i=r(85832).Buffer,a=r(44841),u=r(94165).o,c=r(12899);"undefined"!=typeof window&&(window.Buffer=i),"undefined"!=typeof self&&(self.Buffer=i);var l={UInt8:1,UInt16LE:2,UInt16BE:2,UInt32LE:4,UInt32BE:4,Int8:1,Int16LE:2,Int16BE:2,Int32LE:4,Int32BE:4,FloatLE:4,FloatBE:4,DoubleLE:8,DoubleBE:8,UInt64:8,Int64:8},s={},f="___parser_",p=[];!function(){var e;for(e=1;e<=32;e++)p.push(e)}();var d={};Object.keys(l).concat(Object.keys({String:null,Buffer:null,Array:null,Skip:null,Choice:null,Nest:null,Bit:null,Itf8:null,Ltf8:null})).forEach((function(e){d[e.toLowerCase()]=e}));var h=function(){this.varName="",this.type="",this.options={},this.next=null,this.head=null,this.compiled=null,this.endian="le",this.constructorFn=null,this.alias=null};h.start=function(){return new h},Object.keys(l).forEach((function(e){h.prototype[e.toLowerCase()]=function(t,r){return this.setNextParser(e.toLowerCase(),t,r)};var t=e.replace(/BE|LE/,"").toLowerCase();t in h.prototype||(h.prototype[t]=function(e,r){return this[t+this.endian](e,r)})})),p.forEach((function(e){h.prototype["bit".concat(e.toString())]=function(t,r){return r||(r={}),r.length=e,this.setNextParser("bit",t,r)}})),h.prototype.namely=function(e){return s[e]=this,this.alias=e,this},h.prototype.skip=function(e,t){if(t&&t.assert)throw new Error("assert option on skip is not allowed.");return this.setNextParser("skip","",{length:e})},h.prototype.string=function(e,t){if(!t.zeroTerminated&&!t.length&&!t.greedy)throw new Error("Neither length, zeroTerminated, nor greedy is defined for string.");if((t.zeroTerminated||t.length)&&t.greedy)throw new Error("greedy is mutually exclusive with length and zeroTerminated for string.");if(t.stripNull&&!t.length&&!t.greedy)throw new Error("Length or greedy must be defined if stripNull is defined.");return t.encoding=t.encoding||"utf8",this.setNextParser("string",e,t)},h.prototype.buffer=function(e,t){if(!t.length&&!t.readUntil)throw new Error("Length nor readUntil is defined in buffer parser");return this.setNextParser("buffer",e,t)},h.prototype.array=function(e,t){if(!t.readUntil&&!t.length&&!t.lengthInBytes)throw new Error("Length option of array is not defined.");if(!t.type)throw new Error("Type option of array is not defined.");if("string"==typeof t.type&&!s[t.type]&&Object.keys(l).indexOf(d[t.type])<0)throw new Error('Specified primitive type "'.concat(t.type,'" is not supported.'));return this.setNextParser("array",e,t)},h.prototype.choice=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.tag)throw new Error("Tag option of array is not defined.");if(!t.choices)throw new Error("Choices option of array is not defined.");return Object.keys(t.choices).forEach((function(r){if(!t.choices[r])throw new Error("Choice Case ".concat(r," of ").concat(e," is not valid."));if("string"==typeof t.choices[r]&&!s[t.choices[r]]&&Object.keys(l).indexOf(d[t.choices[r]])<0)throw new Error('Specified primitive type "'.concat(t.choices[r],'" is not supported.'))}),this),this.setNextParser("choice",e,t)},h.prototype.nest=function(e,t){if(1===arguments.length&&"object"===o(e)&&(t=e,e=null),!t.type)throw new Error("Type option of nest is not defined.");if(!(t.type instanceof h||s[t.type]))throw new Error("Type option of nest must be a Parser object.");if(!(t.type instanceof h||e))throw new Error("options.type must be a object if variable name is omitted.");return this.setNextParser("nest",e,t)},h.prototype.endianess=function(e){switch(e.toLowerCase()){case"little":this.endian="le";break;case"big":this.endian="be";break;default:throw new Error("Invalid endianess: ".concat(e))}return this},h.prototype.create=function(e){if(!(e instanceof Function))throw new Error("Constructor must be a Function object.");return this.constructorFn=e,this},h.prototype.getCode=function(){var e=new u;return e.pushCode("if (!Buffer.isBuffer(buffer)) {"),e.generateError('"argument buffer is not a Buffer object"'),e.pushCode("}"),this.alias?this.addAliasedCode(e):this.addRawCode(e),this.alias?e.pushCode("return {0}(0)",f+this.alias):e.pushCode("return { offset: offset, result: vars };"),e.code},h.prototype.addRawCode=function(e){e.pushCode("var offset = 0;"),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };")},h.prototype.addAliasedCode=function(e){return e.pushCode("function {0}(offset) {",f+this.alias),this.constructorFn?e.pushCode("var vars = new constructorFn();"):e.pushCode("var vars = {};"),this.generate(e),e.markResolved(this.alias),this.resolveReferences(e),e.pushCode("return { offset: offset, result: vars };"),e.pushCode("}"),e},h.prototype.resolveReferences=function(e){var t=e.getUnresolvedReferences();e.markRequested(t),t.forEach((function(t){s[t].addAliasedCode(e)}))},h.prototype.compile=function(){var e="(function(buffer, constructorFn, Long) { ".concat(this.getCode()," })");this.compiled=a.runInThisContext(e)},h.prototype.sizeOf=function(){var e=NaN;if(Object.keys(l).indexOf(this.type)>=0)e=l[this.type];else if("String"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Buffer"===this.type&&"number"==typeof this.options.length)e=this.options.length;else if("Array"===this.type&&"number"==typeof this.options.length){var t=NaN;"string"==typeof this.options.type?t=l[d[this.options.type]]:this.options.type instanceof h&&(t=this.options.type.sizeOf()),e=this.options.length*t}else"Skip"===this.type?e=this.options.length:"Nest"===this.type?e=this.options.type.sizeOf():this.type||(e=0);return this.next&&(e+=this.next.sizeOf()),e},h.prototype.parse=function(e){return this.compiled||this.compile(),this.compiled(e,this.constructorFn,c)},h.prototype.setNextParser=function(e,t,r){var n=new h;return n.type=d[e],n.varName=t,n.options=r||n.options,n.endian=this.endian,this.head?this.head.next=n:this.next=n,this.head=n,this},h.prototype.generate=function(e){this.type&&(this["generate".concat(this.type)](e),this.generateAssert(e));var t=e.generateVariable(this.varName);return this.options.formatter&&this.generateFormatter(e,t,this.options.formatter),this.generateNext(e)},h.prototype.generateAssert=function(e){if(this.options.assert){var t=e.generateVariable(this.varName);switch(o(this.options.assert)){case"function":e.pushCode("if (!({0}).call(vars, {1})) {",this.options.assert,t);break;case"number":e.pushCode("if ({0} !== {1}) {",this.options.assert,t);break;case"string":e.pushCode('if ("{0}" !== {1}) {',this.options.assert,t);break;default:throw new Error("Assert option supports only strings, numbers and assert functions.")}e.generateError('"Assert error: {0} is " + {0}',t),e.pushCode("}")}},h.prototype.generateNext=function(e){return this.next&&(e=this.next.generate(e)),e},Object.keys(l).forEach((function(e){h.prototype["generate".concat(e)]=function(t){"UInt64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), true, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):"Int64"===e?t.pushCode("{0} = Long.fromBytes(buffer.slice(offset,offset+8), false, this.endian === 'le').toNumber();",t.generateVariable(this.varName),e):t.pushCode("{0} = buffer.read{1}(offset);",t.generateVariable(this.varName),e),t.pushCode("offset += {0};",l[e])}})),h.prototype.generateBit=function(e){var t=JSON.parse(JSON.stringify(this));if(t.varName=e.generateVariable(t.varName),e.bitFields.push(t),!this.next||this.next&&["Bit","Nest"].indexOf(this.next.type)<0){var r=0;e.bitFields.forEach((function(e){r+=e.options.length}));var n=e.generateTmpVariable();if(r<=8)e.pushCode("var {0} = buffer.readUInt8(offset);",n),r=8;else if(r<=16)e.pushCode("var {0} = buffer.readUInt16BE(offset);",n),r=16;else if(r<=24){var o=e.generateTmpVariable(),i=e.generateTmpVariable();e.pushCode("var {0} = buffer.readUInt16BE(offset);",o),e.pushCode("var {0} = buffer.readUInt8(offset + 2);",i),e.pushCode("var {2} = ({0} << 8) | {1};",o,i,n),r=24}else{if(!(r<=32))throw new Error("Currently, bit field sequence longer than 4-bytes is not supported.");e.pushCode("var {0} = buffer.readUInt32BE(offset);",n),r=32}e.pushCode("offset += {0};",r/8);var a=0,u="be"===this.endian;e.bitFields.forEach((function(t){e.pushCode("{0} = {1} >> {2} & {3};",t.varName,n,u?r-a-t.options.length:a,(1< offset++);"),e.pushCode("{0} = buffer.toString('{1}', {2}, offset);",t,this.options.encoding,r)),this.options.stripNull&&e.pushCode("{0} = {0}.replace(/\\x00+$/g, '')",t)},h.prototype.generateBuffer=function(e){"eof"===this.options.readUntil?e.pushCode("{0} = buffer.slice(offset);",e.generateVariable(this.varName)):(e.pushCode("{0} = buffer.slice(offset, offset + {1});",e.generateVariable(this.varName),e.generateOption(this.options.length)),e.pushCode("offset += {0};",e.generateOption(this.options.length))),this.options.clone&&e.pushCode("{0} = Buffer.from({0});",e.generateVariable(this.varName))},h.prototype.generateArray=function(e){var t=e.generateOption(this.options.length),r=e.generateOption(this.options.lengthInBytes),n=this.options.type,o=e.generateTmpVariable(),i=e.generateVariable(this.varName),a=e.generateTmpVariable(),u=this.options.key,c="string"==typeof u;if(c?e.pushCode("{0} = {};",i):e.pushCode("{0} = [];",i),"function"==typeof this.options.readUntil?e.pushCode("do {"):"eof"===this.options.readUntil?e.pushCode("for (var {0} = 0; offset < buffer.length; {0}++) {",o):void 0!==r?e.pushCode("for (var {0} = offset; offset - {0} < {1}; ) {",o,r):e.pushCode("for (var {0} = 0; {0} < {1}; {0}++) {",o,t),"string"==typeof n)if(s[n]){var p=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",p,f+n),e.pushCode("var {0} = {1}.result; offset = {1}.offset;",a,p),n!==this.alias&&e.addReference(n)}else e.pushCode("var {0} = buffer.read{1}(offset);",a,d[n]),e.pushCode("offset += {0};",l[d[n]]);else n instanceof h&&(e.pushCode("var {0} = {};",a),e.pushScope(a),n.generate(e),e.popScope());c?e.pushCode("{0}[{2}.{1}] = {2};",i,u,a):e.pushCode("{0}.push({1});",i,a),e.pushCode("}"),"function"==typeof this.options.readUntil&&e.pushCode(" while (!({0}).call(this, {1}, buffer.slice(offset)));",this.options.readUntil,a)},h.prototype.generateChoiceCase=function(e,t,r){if("string"==typeof r)if(s[r]){var n=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",n,f+r),e.pushCode("{0} = {1}.result; offset = {1}.offset;",e.generateVariable(this.varName),n),r!==this.alias&&e.addReference(r)}else e.pushCode("{0} = buffer.read{1}(offset);",e.generateVariable(this.varName),d[r]),e.pushCode("offset += {0};",l[d[r]]);else r instanceof h&&(e.pushPath(t),r.generate(e),e.popPath(t))},h.prototype.generateChoice=function(e){var t=e.generateOption(this.options.tag);this.varName&&e.pushCode("{0} = {};",e.generateVariable(this.varName)),e.pushCode("switch({0}) {",t),Object.keys(this.options.choices).forEach((function(t){var r=this.options.choices[t];Number.isNaN(parseInt(t,10))?e.pushCode("case '{0}':",t):e.pushCode("case {0}:",t),this.generateChoiceCase(e,this.varName,r),e.pushCode("break;")}),this),e.pushCode("default:"),this.options.defaultChoice?this.generateChoiceCase(e,this.varName,this.options.defaultChoice):e.generateError('"Met undefined tag value " + {0} + " at choice"',t),e.pushCode("}")},h.prototype.generateNest=function(e){var t=e.generateVariable(this.varName);if(this.options.type instanceof h)this.varName&&e.pushCode("{0} = {};",t),e.pushPath(this.varName),this.options.type.generate(e),e.popPath(this.varName);else if(s[this.options.type]){var r=e.generateTmpVariable();e.pushCode("var {0} = {1}(offset);",r,f+this.options.type),e.pushCode("{0} = {1}.result; offset = {1}.offset;",t,r),this.options.type!==this.alias&&e.addReference(this.options.type)}},h.prototype.generateFormatter=function(e,t,r){"function"==typeof r&&e.pushCode("{0} = ({1}).call(this, {0});",t,r)},h.prototype.isInteger=function(){return!!this.type.match(/U?Int[8|16|32][BE|LE]?|Bit\d+/)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.itf8=function(e,t){return this.setNextParser("itf8",e,t)},h.prototype.generateItf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((").concat(r,"<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((").concat(r,"<<16) | (buffer[offset+1]<< 8) | buffer[offset+2]) & 0x1fffff;\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((").concat(r,"<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4\n } else {\n ").concat(t," = ((").concat(r," & 0x0f)<<28) | (buffer[offset+1]<<20) | (buffer[offset+2]<<12) | (buffer[offset+3]<<4) | (buffer[offset+4] & 0x0f);\n // x=((0xff & 0x0f)<<28) | (0xff<<20) | (0xff<<12) | (0xff<<4) | (0x0f & 0x0f);\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5\n }\n "))},h.prototype.ltf8=function(e,t){return this.setNextParser("ltf8",e,t)},h.prototype.generateLtf8=function(e){var t=e.generateVariable(this.varName),r=e.generateTmpVariable();e.pushCode("\n var ".concat(r," = buffer[offset];\n if (").concat(r," < 0x80) {\n ").concat(t," = ").concat(r,";\n offset += 1;\n } else if (").concat(r," < 0xc0) {\n ").concat(t," = ((buffer[offset]<<8) | buffer[offset+1]) & 0x3fff;\n offset += 2;\n } else if (").concat(r," < 0xe0) {\n ").concat(t," = ((buffer[offset]<<16) | (buffer[offset+1]<<8) | buffer[offset+2]) & 0x1fffff;\n ").concat(t," = (((").concat(r," & 63) << 16) | buffer.readUInt16LE(offset + 1));\n offset += 3;\n } else if (").concat(r," < 0xf0) {\n ").concat(t," = ((buffer[offset]<<24) | (buffer[offset+1]<<16) | (buffer[offset+2]<<8) | buffer[offset+3]) & 0x0fffffff;\n offset += 4;\n } else if (").concat(r," < 0xf8) {\n ").concat(t," = (((buffer[offset] & 15) * Math.pow(2,32))) +\n (buffer[offset+1]<<24) | (buffer[offset+2]<<16 | buffer[offset+3]<<8 | buffer[offset+4])\n // TODO *val_p = uv < 0x80000000UL ? uv : -((int32_t) (0xffffffffUL - uv)) - 1;\n offset += 5;\n } else if (").concat(r," < 0xfc) {\n ").concat(t," = ((((buffer[offset] & 7) << 8) | buffer[offset+1] )) * Math.pow(2,32) +\n (buffer[offset+2]<<24) | (buffer[offset+3]<<16 | buffer[offset+4]<<8 | buffer[offset+5])\n offset += 6;\n } else if (").concat(r," < 0xfe) {\n ").concat(t," = ((((buffer[offset] & 3) << 16) | buffer[offset+1]<<8 | buffer[offset+2])) * Math.pow(2,32) +\n (buffer[offset+3]<<24) | (buffer[offset+4]<<16 | buffer[offset+5]<<8 | buffer[offset+6])\n offset += 7;\n } else if (").concat(r," < 0xff) {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+8));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 8;\n } else {\n ").concat(t," = Long.fromBytesBE(buffer.slice(offset+1,offset+9));\n if (").concat(t,".greaterThan(Number.MAX_SAFE_INTEGER) || ").concat(t,".lessThan(Number.MIN_SAFE_INTEGER))\n throw new Error('integer overflow')\n ").concat(t," = ").concat(t,".toNumber()\n offset += 9;\n }\n "))},t.i=h},94165:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return n="function"==typeof Symbol&&"symbol"===r(Symbol.iterator)?function(e){return r(e)}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":r(e)},n(e)}var o=function(){this.code="",this.scopes=[["vars"]],this.isAsync=!1,this.bitFields=[],this.tmpVariableCount=0,this.references={}};o.prototype.generateVariable=function(e){var t=[];for(Array.prototype.push.apply(t,this.scopes[this.scopes.length-1]);/^\$parent\./.test(e);)t.pop(),e=e.replace(/^\$parent\./,"");return e&&t.push(e),t.join(".")},o.prototype.generateOption=function(e){switch(n(e)){case"number":return e.toString();case"string":return this.generateVariable(e);case"function":return"(".concat(e,").call(").concat(this.generateVariable(),", vars)");default:return}},o.prototype.generateError=function(){var e=Array.prototype.slice.call(arguments),t=o.interpolate.apply(this,e);this.isAsync?this.pushCode("return process.nextTick(function() { callback(new Error(".concat(t,"), vars); });")):this.pushCode("throw new Error(".concat(t,");"))},o.prototype.generateTmpVariable=function(){return"$tmp".concat(this.tmpVariableCount++)},o.prototype.pushCode=function(){var e=Array.prototype.slice.call(arguments);this.code+="".concat(o.interpolate.apply(this,e),"\n")},o.prototype.pushPath=function(e){e&&this.scopes[this.scopes.length-1].push(e)},o.prototype.popPath=function(e){e&&this.scopes[this.scopes.length-1].pop()},o.prototype.pushScope=function(e){this.scopes.push([e])},o.prototype.popScope=function(){this.scopes.pop()},o.prototype.addReference=function(e){this.references[e]||(this.references[e]={resolved:!1,requested:!1})},o.prototype.markResolved=function(e){this.references[e].resolved=!0},o.prototype.markRequested=function(e){e.forEach(function(e){this.references[e].requested=!0}.bind(this))},o.prototype.getUnresolvedReferences=function(){var e=this.references;return Object.keys(this.references).filter((function(t){return!e[t].resolved&&!e[t].requested}))},o.interpolate=function(e){var t=e.match(/{\d+}/g),r=Array.prototype.slice.call(arguments,1);return t&&t.forEach((function(t){var n=parseInt(t.substr(1,t.length-2),10);e=e.replace(t,r[n].toString())})),e},t.o=o},44841:e=>{e.exports.runInThisContext=function(e){return new Function("code","return eval(code);").call(globalThis,e)}},67245:(e,t,r)=>{"use strict";r.d(t,{A:()=>ie});var n={};r.r(n),r.d(n,{escape:()=>y,escapeColumn:()=>v,formatAttributes:()=>w,formatComment:()=>E,formatDirective:()=>O,formatFeature:()=>x,formatItem:()=>P,formatSequence:()=>j,parseAttributes:()=>m,parseDirective:()=>g,parseFeature:()=>b,unescape:()=>d});var o=r(47775),i=r(10136);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(e.id).concat(e.description?" ".concat(e.description):"","\n").concat(e.sequence,"\n")}function P(e){function t(e){return"attributes"in e?x(e):"directive"in e?O(e):"sequence"in e?j(e):"comment"in e?E(e):"# (invalid item found during format)\n"}return Array.isArray(e)?e.map(t):t(e)}function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function C(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||I(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r\s*(\S+)\s*(.*)/.exec(e);t?(this._flush(),this.currentSequence={id:t[1],sequence:""},t[2]&&(this.currentSequence.description=t[2].trim())):this.currentSequence&&/\S/.test(e)&&(this.currentSequence.sequence+=e.replace(/\s/g,""))}},{key:"_flush",value:function(){this.currentSequence&&this.seqCallback(this.currentSequence)}},{key:"finish",value:function(){this._flush()}}]),e}(),z=function(){function e(t){R(this,e),this.fastaParser=void 0,this.eof=!1,this.lineNumber=0,this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},this._underConstructionOrphans={};var r=function(){};this.featureCallback=t.featureCallback||r,this.endCallback=t.endCallback||r,this.commentCallback=t.commentCallback||r,this.errorCallback=t.errorCallback||r,this.directiveCallback=t.directiveCallback||r,this.sequenceCallback=t.sequenceCallback||r,this.disableDerivesFromReferences=t.disableDerivesFromReferences||!1,this.bufferSize=void 0===t.bufferSize?1e3:t.bufferSize}return F(e,[{key:"addLine",value:function(e){if(this.fastaParser)this.fastaParser.addLine(e);else if(!this.eof)if(this.lineNumber+=1,/^\s*[^#\s>]/.test(e))this._bufferLine(e);else{var t=/^\s*(#+)(.*)/.exec(e);if(t){var r=T(t,2)[1],n=T(t,3)[2];if(3===r.length)this._emitAllUnderConstructionFeatures();else if(2===r.length){var o=g(e);o&&("FASTA"===o.directive?(this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new B(this.sequenceCallback)):this._emitItem(o))}else n=n.replace(/\s*/,""),this._emitItem({comment:n})}else if(/^\s*$/.test(e));else{if(!/^\s*>/.test(e)){var i=e.replace(/\r?\n?$/g,"");throw new Error("GFF3 parse error. Cannot parse '".concat(i,"'."))}this._emitAllUnderConstructionFeatures(),this.eof=!0,this.fastaParser=new B(this.sequenceCallback),this.fastaParser.addLine(e)}}}},{key:"finish",value:function(){this._emitAllUnderConstructionFeatures(),this.fastaParser&&this.fastaParser.finish(),this.endCallback()}},{key:"_emitItem",value:function(e){Array.isArray(e)?this.featureCallback(e):"directive"in e?this.directiveCallback(e):"comment"in e&&this.commentCallback(e)}},{key:"_enforceBufferSizeLimit",value:function(){for(var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,r=function t(r){r&&Array.isArray(r)&&r[0].attributes&&r[0].attributes.ID&&r[0].attributes.ID[0]&&(r[0].attributes.ID.forEach((function(t){delete e._underConstructionById[t],delete e._completedReferences[t]})),r.forEach((function(e){e.child_features&&e.child_features.forEach((function(e){return t(e)})),e.derived_features&&e.derived_features.forEach((function(e){return t(e)}))})))};this._underConstructionTopLevel.length+t>this.bufferSize;){var n=this._underConstructionTopLevel.shift();n&&(this._emitItem(n),r(n))}}},{key:"_emitAllUnderConstructionFeatures",value:function(){if(this._underConstructionTopLevel.forEach(this._emitItem.bind(this)),this._underConstructionTopLevel=[],this._underConstructionById={},this._completedReferences={},Array.from(Object.values(this._underConstructionOrphans)).length)throw new Error("some features reference other features that do not exist in the file (or in the same '###' scope). ".concat(Object.keys(this._underConstructionOrphans)))}},{key:"_bufferLine",value:function(e){var t,r,n,o=this,i=L(L({},b(e)),{},{child_features:[],derived_features:[]}),a=(null===(t=i.attributes)||void 0===t?void 0:t.ID)||[],u=(null===(r=i.attributes)||void 0===r?void 0:r.Parent)||[],c=this.disableDerivesFromReferences?[]:(null===(n=i.attributes)||void 0===n?void 0:n.Derives_from)||[];if(a.length||u.length||c.length){var l=void 0;a.forEach((function(e){var t=o._underConstructionById[e];t?(t[t.length-1].type!==i.type&&o._parseError('multi-line feature "'.concat(e,'" has inconsistent types: "').concat(i.type,'", "').concat(t[t.length-1].type,'"')),t.push(i),l=t):(l=[i],o._enforceBufferSizeLimit(1),u.length||c.length||o._underConstructionTopLevel.push(l),o._underConstructionById[e]=l,o._resolveReferencesTo(l,e))})),this._resolveReferencesFrom(l||[i],{Parent:u,Derives_from:c},a)}else this._emitItem([i])}},{key:"_resolveReferencesTo",value:function(e,t){var r=this._underConstructionOrphans[t];r&&(e.forEach((function(e){var t;(t=e.child_features).push.apply(t,C(r.Parent))})),e.forEach((function(e){var t;(t=e.derived_features).push.apply(t,C(r.Derives_from))})),delete this._underConstructionOrphans[t])}},{key:"_parseError",value:function(e){this.eof=!0,this.errorCallback("".concat(this.lineNumber,": ").concat(e))}},{key:"_resolveReferencesFrom",value:function(e,t,r){var n=this;function o(e,t,r){var n=e[t];n||(n={},e[t]=n);var o=n[r]||!1;return n[r]=!0,o}t.Parent.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Parent,".concat(t))})).length||i.forEach((function(t){t.child_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Parent.push(e)}})),t.Derives_from.forEach((function(t){var i=n._underConstructionById[t];if(i){r.filter((function(e){return o(n._completedReferences,e,"Derives_from,".concat(t))})).length||i.forEach((function(t){t.derived_features.push(e)}))}else{var a=n._underConstructionOrphans[t];a||(a={Parent:[],Derives_from:[]},n._underConstructionOrphans[t]=a),a.Derives_from.push(e)}}))}}]),e}(),G=r(94931);function U(e){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},U(e)}function H(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function V(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};H(this,t),(e=q(this,t,[{objectMode:!0}])).textBuffer="";var n=re(r);e.encoding=r.encoding||"utf8",e.decoder=new i.I;var o=e.push.bind(Y(e));return e.parser=new z({featureCallback:n.parseFeatures?o:void 0,directiveCallback:n.parseDirectives?o:void 0,commentCallback:n.parseComments?o:void 0,sequenceCallback:n.parseSequences?o:void 0,errorCallback:function(t){return e.emit("error",t)},bufferSize:n.bufferSize,disableDerivesFromReferences:n.disableDerivesFromReferences}),e}return K(t,e),W(t,[{key:"_addLine",value:function(e){e&&this.parser.addLine(e)}},{key:"_nextText",value:function(e){var t=this,r=(this.textBuffer+e).split(/\r?\n/);this.textBuffer=r.pop()||"",r.forEach((function(e){return t._addLine(e)}))}},{key:"_transform",value:function(e,t,r){this._nextText(this.decoder.write(e)),te(r)}},{key:"_flush",value:function(e){this.decoder.end&&this._nextText(this.decoder.end()),null!=this.textBuffer&&this._addLine(this.textBuffer),this.parser.finish(),te(e)}}]),t}(o.Transform),oe=function(e){function t(){var e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return H(this,t),(e=q(this,t,[Object.assign(r,{objectMode:!0})])).linesSinceLastSyncMark=0,e.haveWeEmittedData=!1,e.fastaMode=!1,e.minLinesBetweenSyncMarks=r.minSyncLines||100,e.insertVersionDirective=r.insertVersionDirective||!1,e}return K(t,e),W(t,[{key:"_transform",value:function(e,t,r){var n;if(!this.haveWeEmittedData&&this.insertVersionDirective){var o=Array.isArray(e)?e[0]:e;"directive"in o&&"gff-version"!==o.directive&&this.push("##gff-version 3\n")}if("sequence"in e&&!this.fastaMode&&(this.push("##FASTA\n"),this.fastaMode=!0),n=Array.isArray(e)?e.map(P).join(""):P(e),this.push(n),this.linesSinceLastSyncMark>=this.minLinesBetweenSyncMarks)this.push("###\n"),this.linesSinceLastSyncMark=0;else{for(var i=0,a=0;a0&&void 0!==arguments[0]?arguments[0]:{})},parseStringSync:function(e){if(!e)return[];var t=re(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),r=[],n=r.push.bind(r),o=new z({featureCallback:t.parseFeatures?n:void 0,directiveCallback:t.parseDirectives?n:void 0,commentCallback:t.parseComments?n:void 0,sequenceCallback:t.parseSequences?n:void 0,disableDerivesFromReferences:t.disableDerivesFromReferences||!1,bufferSize:1/0,errorCallback:function(e){throw e}});return e.split(/\r?\n/).forEach(o.addLine.bind(o)),o.finish(),r},formatSync:function(e){var t=[],r=[];e.forEach((function(e){"sequence"in e?r.push(e):t.push(e)}));var n=t.map(P).join("");return r.length&&(n+="##FASTA\n",n+=r.map(j).join("")),n},formatStream:function(){return new oe(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})},formatFile:function(e,t){var r=Z({insertVersionDirective:!0},arguments.length>2&&void 0!==arguments[2]?arguments[2]:{});return new Promise((function(n,o){e.pipe(new oe(r)).on("end",(function(){return n(null)})).on("error",o).pipe(t)}))},util:n}},92561:(e,t,r)=>{"use strict";r.d(t,{tP:()=>S,BL:()=>y});var n=r(39962),o=r(12388),i=r(85832).Buffer;function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){for(var r=0;r3?s[3]:void 0,o=s.length>2?s[2]:void 0,!((r=s.length>1&&void 0!==s[1]?s[1]:0)<0)){e.next=6;break}throw new TypeError("regionStart cannot be less than 0");case 6:if((void 0===o||o>t.length)&&(o=t.length),!(r>=o)){e.next=9;break}return e.abrupt("return","");case 9:return a=p(t,r),c=p(t,o)-a,l=i.allocUnsafe(c),e.next=14,this.fasta.read(l,0,c,a,n);case 14:return e.abrupt("return",l.toString("utf8").replace(/\s+/g,""));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})}],r&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t,r){return t=g(t),function(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,b()?Reflect.construct(t,r||[],g(e).constructor):t.apply(e,r))}function b(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(b=function(){return!!e})()}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function w(e,t){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},w(e,t)}var S=function(e){function t(e){var r,n=e.fasta,i=e.path,a=e.fai,u=e.faiPath,c=e.gzi,l=e.gziPath;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=m(this,t,[{fasta:n,path:i,fai:a,faiPath:u}]),n&&c?r.fasta=new o.BgzfFilehandle({filehandle:n,gziFilehandle:c}):i&&l&&(r.fasta=new o.BgzfFilehandle({path:i,gziPath:l})),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&w(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(y)},87906:(e,t,r)=>{"use strict";r.d(t,{wD:()=>ke});var n=r(87791),o=r.n(n),i=r(84137),a=r.n(i),u=r(85832),c=r(39962),l=r(12388);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(p())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&d(o,r.prototype),o}(e,arguments,h(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),d(r,e)},f(e)}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=function(){return!!e})()}function d(e,t){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},d(e,t)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e){if(e.greaterThan(Number.MAX_SAFE_INTEGER)||e.lessThan(Number.MIN_SAFE_INTEGER))throw new Error("integer overflow");return e.toNumber()}var v=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=h(r=t),function(e,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,p()?Reflect.construct(r,n||[],h(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(f(Error));function m(e){if(e&&e.aborted){if("undefined"!=typeof DOMException)throw new DOMException("aborted","AbortError");var t=new v("aborted");throw t.code="ERR_ABORTED",t}}function b(e,t){var r=[],n=null;return 0===e.length?e:(e.sort((function(e,t){var r=e.minv.blockPosition-t.minv.blockPosition;return 0!==r?r:e.minv.dataPosition-t.minv.dataPosition})),e.forEach((function(e){var o,i;(!t||e.maxv.compareTo(t)>0)&&(null===n?(r.push(e),n=e):(o=n,(i=e).minv.blockPosition-o.maxv.blockPosition<65e3&&i.maxv.blockPosition-o.minv.blockPosition<5e6?e.maxv.compareTo(n.maxv)>0&&(n.maxv=e.maxv):(r.push(e),n=e)))})),r)}var g=r(12899),w=r.n(g);function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function A(e,t){for(var r=0;r0&&(e=n[t]);return e}}],(r=[{key:"toString",value:function(){return"".concat(this.blockPosition,":").concat(this.dataPosition)}},{key:"compareTo",value:function(e){return this.blockPosition-e.blockPosition||this.dataPosition-e.dataPosition}}])&&A(t.prototype,r),n&&A(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function E(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(arguments.length>2&&void 0!==arguments[2]&&arguments[2])throw new Error("big-endian virtual file offsets not implemented");return new O(1099511627776*e[t+7]+4294967296*e[t+6]+16777216*e[t+5]+65536*e[t+4]+256*e[t+3]+e[t+2],e[t+1]<<8|e[t])}function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function P(e,t){for(var r=0;r3&&void 0!==arguments[3]?arguments[3]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.minv=t,this.maxv=r,this.bin=n,this._fetchedSize=o}var t,r;return t=e,(r=[{key:"toUniqueString",value:function(){return"".concat(this.minv,"..").concat(this.maxv," (bin ").concat(this.bin,", fetchedSize ").concat(this.fetchedSize(),")")}},{key:"toString",value:function(){return this.toUniqueString()}},{key:"compareTo",value:function(e){return this.minv.compareTo(e.minv)||this.maxv.compareTo(e.maxv)||this.bin-e.bin}},{key:"fetchedSize",value:function(){return void 0!==this._fetchedSize?this._fetchedSize:this.maxv.blockPosition+65536-this.minv.blockPosition}}])&&P(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_=["indices"];function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function T(){T=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(I([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==L(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function I(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function M(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function R(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){M(i,n,o,a,u,"next",e)}function u(e){M(i,n,o,a,u,"throw",e)}a(void 0)}))}}function N(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.parse(t);case 3:return(r=e.sent).indices,n=I(r,_),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"_findFirstData",value:function(e,t){return e?e.compareTo(t)>0?t:e:t}},{key:"parse",value:(o=R(T().mark((function e(){var t,r=this,n=arguments;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},this.parseP||(this.parseP=this._parse(t).catch((function(e){throw r.parseP=void 0,e}))),e.abrupt("return",this.parseP);case 3:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"hasRefSeq",value:(n=R(T().mark((function e(t){var r,n,o,i=arguments;return T().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:{},e.next=3,this.parse(r);case 3:return o=e.sent,e.abrupt("return",!!(null===(n=o.indices[t])||void 0===n?void 0:n.binIndex));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&N(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function B(e){return B="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},B(e)}function z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||U(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=U(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function U(e,t){if(e){if("string"==typeof e)return H(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?H(e,t):void 0}}function H(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function W(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function q(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){W(i,n,o,a,u,"next",e)}function u(e){W(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Q(e,t){for(var r=0;r>26),1+((t-=1)>>26)],[9+(e>>23),9+(t>>23)],[73+(e>>20),73+(t>>20)],[585+(e>>17),585+(t>>17)],[4681+(e>>14),4681+(t>>14)]]}var ee=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),Y(this,t,arguments)}var r,n,o,i,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&X(e,t)}(t,e),r=t,n=[{key:"lineCount",value:(a=q(V().mark((function e(t){var r,n,o,i,a=arguments;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=a.length>1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_parse",value:(i=q(V().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d,h,y,v,b,g,w,S,A=this,x=arguments;return V().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=x.length>0&&void 0!==x[0]?x[0]:{},e.next=3,this.filehandle.readFile(t);case 3:return r=e.sent,e.next=6,(0,l.unzip)(r);case 6:if(n=e.sent,m(t.signal),21578324===n.readUInt32LE(0)){e.next=10;break}throw new Error("Not a TBI file");case 10:if(o=n.readInt32LE(4),i=n.readInt32LE(8),a=65536&i?"zero-based-half-open":"1-based-closed",u={0:"generic",1:"SAM",2:"VCF"}[15&i]){e.next=17;break}throw new Error("invalid Tabix preset format flags ".concat(i));case 17:return c={ref:n.readInt32LE(12),start:n.readInt32LE(16),end:n.readInt32LE(20)},s=n.readInt32LE(24),37449,f=Math.pow(2,29),p=s?String.fromCharCode(s):null,d=n.readInt32LE(28),h=n.readInt32LE(32),y=this._parseNameBytes(n.slice(36,36+h)),v=y.refNameToId,b=y.refIdToName,g=36+h,S=new Array(o).fill(0).map((function(){var e=n.readInt32LE(g);g+=4;for(var t,r={},o=0;o37450)throw new Error("tabix index contains too many bins, please use a CSI index");if(37450===i){var a=n.readInt32LE(g);g+=4,2===a&&(t=A.parsePseudoBin(n,g)),g+=16*a}else{var u=n.readInt32LE(g);g+=4;for(var c=new Array(u),l=0;l3&&void 0!==P[3]?P[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:(u.linearIndex.length?u.linearIndex[r>>14>=u.linearIndex.length?u.linearIndex.length-1:r>>14]:new O(0,0))||console.warn("querying outside of possible tabix range"),c=Z(r,n),l=[],s=G(c);try{for(s.s();!(f=s.n()).done;)for(p=z(f.value,2),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y]){v=G(u.binIndex[y]);try{for(v.s();!(m=v.n()).done;)g=m.value,l.push(new C(g.minv,g.maxv,y))}catch(e){v.e(e)}finally{v.f()}}}catch(e){s.e(e)}finally{s.f()}for(w=u.linearIndex.length,S=null,A=Math.min(r>>14,w-1),x=Math.min(n>>14,w-1),E=A;E<=x;++E)(j=u.linearIndex[E])&&(!S||j.compareTo(S)<0)&&(S=j);return e.abrupt("return",b(l,S));case 23:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return o.apply(this,arguments)})}],n&&Q(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(D);function te(e){return te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},te(e)}function re(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ne(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function ne(e,t){if(e){if("string"==typeof e)return oe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?oe(e,t):void 0}}function oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ce(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function le(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){ce(i,n,o,a,u,"next",e)}function u(e){ce(i,n,o,a,u,"throw",e)}a(void 0)}))}}function se(e,t){for(var r=0;r1&&void 0!==a[1]?a[1]:{},e.next=3,this.parse(r);case 3:if(n=e.sent){e.next=6;break}return e.abrupt("return",-1);case 6:if(o=n.refNameToId[t],n.indices[o]){e.next=10;break}return e.abrupt("return",-1);case 10:if(!(i=n.indices[o].stats)){e.next=13;break}return e.abrupt("return",i.lineCount);case 13:return e.abrupt("return",-1);case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"indexCov",value:function(){throw new Error("CSI indexes do not support indexcov")}},{key:"parseAuxData",value:function(e,t){var r=e.readInt32LE(t),n=65536&r?"zero-based-half-open":"1-based-closed",o={0:"generic",1:"SAM",2:"VCF"}[15&r];if(!o)throw new Error("invalid Tabix preset format flags ".concat(r));var i={ref:e.readInt32LE(t+4),start:e.readInt32LE(t+8),end:e.readInt32LE(t+12)},a=e.readInt32LE(t+16),u=a?String.fromCharCode(a):null,c=e.readInt32LE(t+20),l=e.readInt32LE(t+24),s=this._parseNameBytes(e.slice(t+28,t+28+l));return{refIdToName:s.refIdToName,refNameToId:s.refNameToId,skipLines:c,metaChar:u,columnNumbers:i,format:o,coordinateType:n}}},{key:"_parseNameBytes",value:function(e){for(var t=0,r=0,n=[],o={},i=0;i0&&void 0!==d[0]?d[0]:{},e.t0=l.unzip,e.next=4,this.filehandle.readFile(t);case 4:return e.t1=e.sent,e.next=7,(0,e.t0)(e.t1);case 7:if(21582659!==(r=e.sent).readUInt32LE(0)){e.next=12;break}n=1,e.next=17;break;case 12:if(38359875!==r.readUInt32LE(0)){e.next=16;break}n=2,e.next=17;break;case 16:throw new Error("Not a CSI file");case 17:return this.minShift=r.readInt32LE(4),this.depth=r.readInt32LE(8),this.maxBinNumber=((1<<3*(this.depth+1))-1)/7,o=Math.pow(2,this.minShift+3*this.depth),i=r.readInt32LE(12),a=i&&i>=30?this.parseAuxData(r,16):{refIdToName:[],refNameToId:{},metaChar:null,columnNumbers:{ref:0,start:1,end:2},coordinateType:"zero-based-half-open",format:"generic"},u=r.readInt32LE(16+i),s=16+i+4,f=new Array(u).fill(0).map((function(){var e=r.readInt32LE(s);s+=4;for(var t,n={},o=0;op.maxBinNumber)t=p.parsePseudoBin(r,s+4),s+=48;else{var a=E(r,s+4);c=p._findFirstData(c,a);var u=r.readInt32LE(s+12);s+=16;for(var l=new Array(u),f=0;f3&&void 0!==w[3]?w[3]:{},r<0&&(r=0),e.next=4,this.parse(o);case 4:if(i=e.sent){e.next=7;break}return e.abrupt("return",[]);case 7:if(a=i.refNameToId[t],u=i.indices[a]){e.next=11;break}return e.abrupt("return",[]);case 11:c=this.reg2bins(r,n),l=[],s=re(c);try{for(s.s();!(f=s.n()).done;)for(S=f.value,A=2,p=function(e){if(Array.isArray(e))return e}(S)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(S,A)||ne(S,A)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),d=p[0],h=p[1],y=d;y<=h;y++)if(u.binIndex[y]){v=re(u.binIndex[y]);try{for(v.s();!(m=v.n()).done;)g=m.value,l.push(new C(g.minv,g.maxv,y))}catch(e){v.e(e)}finally{v.f()}}}catch(e){s.e(e)}finally{s.f()}return e.abrupt("return",b(l,new O(0,0)));case 16:case"end":return e.stop()}var S,A}),e,this)}))),function(e,t,r){return o.apply(this,arguments)})},{key:"reg2bins",value:function(e,t){(e-=1)<1&&(e=1),t>Math.pow(2,50)&&(t=Math.pow(2,34)),t-=1;for(var r,n=0,o=0,i=this.minShift+3*this.depth,a=[];n<=this.depth;i-=3,o+=(r=3*n,1*Math.pow(2,r)),n+=1){var u=o+ve(e,i),c=o+ve(t,i);if(c-u+a.length>this.maxBinNumber)throw new Error("query ".concat(e,"-").concat(t," is too large for current binning scheme (shift ").concat(this.minShift,", depth ").concat(this.depth,"), try a smaller query or a coarser index binning scheme"));a.push([u,c])}return a}}],n&&se(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(D);function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ge(){ge=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==be(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function we(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Se(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Se(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Se(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rthis.chunkSizeLimit)){e.next=30;break}throw new Error("Too much data. Chunk size ".concat(v.toLocaleString()," bytes exceeds chunkSizeLimit of ").concat(this.chunkSizeLimit.toLocaleString(),"."));case 30:e.next=25;break;case 32:e.next=37;break;case 34:e.prev=34,e.t0=e.catch(23),d.e(e.t0);case 37:return e.prev=37,d.f(),e.finish(37);case 40:b=Date.now(),g=we(p),e.prev=42,g.s();case 44:if((w=g.n()).done){e.next=83;break}return S=w.value,A=void 0,e.next=49,this.chunkCache.get(S.toString(),S,a);case 49:x=e.sent,O=x.buffer,E=x.cpositions,j=x.dpositions,m(a),P=0,k=0;case 56:if(!(P=j[k++];);k--}if(T=this.checkLine(l,t,s,f,L),I=T.startCoordinate,M=T.overlaps,!(void 0!==A&&void 0!==I&&A>I)){e.next=66;break}throw new Error("Lines not sorted by start coordinate (".concat(A," > ").concat(I,"), this file is not usable with Tabix."));case 66:if(A=I,!M){e.next=71;break}c(L.trim(),256*E[k]+(P-j[k])+S.minv.dataPosition+1),e.next=73;break;case 71:if(!(void 0!==I&&I>=f)){e.next=73;break}return e.abrupt("return");case 73:if(!(this.yieldTime&&b-Date.now()>this.yieldTime)){e.next=78;break}return b=Date.now(),m(a),e.next=78,Pe(1);case 78:P=C+1,e.next=56;break;case 81:e.next=44;break;case 83:e.next=88;break;case 85:e.prev=85,e.t1=e.catch(42),g.e(e.t1);case 88:return e.prev=88,g.f(),e.finish(88);case 91:case"end":return e.stop()}}),e,this,[[23,34,37,40],[42,85,88,91]])}))),function(e,t,r,n){return y.apply(this,arguments)})},{key:"getMetadata",value:(h=xe(ge().mark((function e(){var t,r=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.index.getMetadata(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getHeaderBuffer",value:(d=xe(ge().mark((function e(){var t,r,n,o,i,a,u,c,s,f,p,d,h=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=h.length>0&&void 0!==h[0]?h[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,n=r.firstDataLine,o=r.metaChar,i=r.maxBlockSize,m(t.signal),a=((null==n?void 0:n.blockPosition)||0)+i,e.next=11,this._readRegion(0,a,t);case 11:return u=e.sent,e.next=14,(0,l.unzip)(u);case 14:if(c=e.sent,!o){e.next=28;break}s=-1,f="\n".charCodeAt(0),p=o.charCodeAt(0),d=0;case 20:if(!(d0&&void 0!==n[0]?n[0]:{},e.next=3,this.getHeaderBuffer(t);case 3:return r=e.sent,e.abrupt("return",r.toString("utf8"));case 5:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getReferenceSequenceNames",value:(f=xe(ge().mark((function e(){var t,r,n=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:{},e.next=3,this.getMetadata(t);case 3:return r=e.sent,e.abrupt("return",r.refIdToName);case 5:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"checkLine",value:function(e,t,r,n,o){var i=e.columnNumbers,a=e.metaChar,u=e.coordinateType,c=e.format;if(a&&o.startsWith(a))return{overlaps:!1};var l=i.ref,s=i.start,f=i.end;l||(l=0),s||(s=0),f||(f=0),"VCF"===c&&(f=8);for(var p=Math.max(l,s,f),d=1,h=0,y="",v=-1/0,m=0;m=n)return{startCoordinate:v,overlaps:!1};if((0===f||f===s)&&v+1<=r)return{startCoordinate:v,overlaps:!1}}else if("VCF"===c&&4===d)y=o.slice(h,m);else if(d===f&&("VCF"===c?this._getVcfEnd(v,y,o.slice(h,m)):parseInt(o.slice(h,m),10))<=r)return{overlaps:!1};if(h=m+1,(d+=1)>p)break}return{startCoordinate:v,overlaps:!0}}},{key:"_getVcfEnd",value:function(e,t,r){var n=e+t.length,o=r.includes("SVTYPE=TRA");if("."===r[0]||o){if(o)return e+1}else for(var i=";",a=0;a1&&void 0!==n[1]?n[1]:{},e.abrupt("return",this.index.lineCount(t,r));case 2:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"_readRegion",value:(i=xe(ge().mark((function e(t,r){var n,o,i,a,c,l=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=l.length>2&&void 0!==l[2]?l[2]:{},o=u.Buffer.alloc(r),e.next=4,this.filehandle.read(o,0,r,t,n);case 4:return i=e.sent,a=i.bytesRead,c=i.buffer,e.abrupt("return",c.slice(0,a));case 8:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"readChunk",value:(n=xe(ge().mark((function e(t){var r,n,o=arguments;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this._readRegion(t.minv.blockPosition,t.fetchedSize(),r);case 3:return n=e.sent,e.abrupt("return",(0,l.unzipChunkSlice)(n,t));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Oe(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},61:(e,t,r)=>{"use strict";r.d(t,{A:()=>f,h:()=>s});const n={InfoFields:{AA:{Number:1,Type:"String",Description:"Ancestral allele"},AC:{Number:"A",Type:"Integer",Description:"Allele count in genotypes, for each ALT allele, in the same order as listed"},AD:{Number:"R",Type:"Integer",Description:"Total read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},AF:{Number:"A",Type:"Float",Description:"Allele frequency for each ALT allele in the same order as listed (estimated from primary data, not called genotypes)"},AN:{Number:1,Type:"Integer",Description:"Total number of alleles in called genotypes"},BQ:{Number:1,Type:"Float",Description:"RMS base quality"},CIGAR:{Number:1,Type:"Float",Description:"Cigar string describing how to align an alternate allele to the reference allele"},DB:{Number:0,Type:"Flag",Description:"dbSNP membership"},DP:{Number:1,Type:"Integer",Description:"combined depth across samples"},END:{Number:1,Type:"Integer",Description:"End position (for use with symbolic alleles)"},H2:{Number:0,Type:"Flag",Description:"HapMap2 membership"},H3:{Number:0,Type:"Flag",Description:"HapMap3 membership"},MQ:{Number:1,Type:null,Description:"RMS mapping quality"},MQ0:{Number:1,Type:"Integer",Description:"Number of MAPQ == 0 reads"},NS:{Number:1,Type:"Integer",Description:"Number of samples with data"},SB:{Number:4,Type:"Integer",Description:"Strand bias"},SOMATIC:{Number:0,Type:"Flag",Description:"Somatic mutation (for cancer genomics)"},VALIDATED:{Number:0,Type:"Flag",Description:"Validated by follow-up experiment"},"1000G":{Number:0,Type:"Flag",Description:"1000 Genomes membership"},IMPRECISE:{Number:0,Type:"Flag",Description:"Imprecise structural variation"},NOVEL:{Number:0,Type:"Flag",Description:"Indicates a novel structural variation"},SVTYPE:{Number:1,Type:"String",Description:"Type of structural variant"},SVLEN:{Number:null,Type:"Integer",Description:"Difference in length between REF and ALT alleles"},CIPOS:{Number:2,Type:"Integer",Description:"Confidence interval around POS for imprecise variants"},CIEND:{Number:2,Type:"Integer",Description:"Confidence interval around END for imprecise variants"},HOMLEN:{Type:"Integer",Description:"Length of base pair identical micro-homology at event breakpoints"},HOMSEQ:{Type:"String",Description:"Sequence of base pair identical micro-homology at event breakpoints"},BKPTID:{Type:"String",Description:"ID of the assembled alternate allele in the assembly file"},MEINFO:{Number:4,Type:"String",Description:"Mobile element info of the form NAME,START,END,POLARITY"},METRANS:{Number:4,Type:"String",Description:"Mobile element transduction info of the form CHR,START,END,POLARITY"},DGVID:{Number:1,Type:"String",Description:"ID of this element in Database of Genomic Variation"},DBVARID:{Number:1,Type:"String",Description:"ID of this element in DBVAR"},DBRIPID:{Number:1,Type:"String",Description:"ID of this element in DBRIP"},MATEID:{Number:null,Type:"String",Description:"ID of mate breakends"},PARID:{Number:1,Type:"String",Description:"ID of partner breakend"},EVENT:{Number:1,Type:"String",Description:"ID of event associated to breakend"},CILEN:{Number:2,Type:"Integer",Description:"Confidence interval around the inserted material between breakend"},DPADJ:{Type:"Integer",Description:"Read Depth of adjacency"},CN:{Number:1,Type:"Integer",Description:"Copy number of segment containing breakend"},CNADJ:{Number:null,Type:"Integer",Description:"Copy number of adjacency"},CICN:{Number:2,Type:"Integer",Description:"Confidence interval around copy number for the segment"},CICNADJ:{Number:null,Type:"Integer",Description:"Confidence interval around copy number for the adjacency"}},GenotypeFields:{AD:{Number:"R",Type:"Integer",Description:"Read depth for each allele"},ADF:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the forward strand"},ADR:{Number:"R",Type:"Integer",Description:"Read depth for each allele on the reverse strand"},DP:{Number:1,Type:"Integer",Description:"Read depth"},EC:{Number:"A",Type:"Integer",Description:"Expected alternate allele counts"},FT:{Number:1,Type:"String",Description:'Filter indicating if this genotype was "called"'},GL:{Number:"G",Type:"Float",Description:"Genotype likelihoods"},GP:{Number:"G",Type:"Float",Description:"Genotype posterior probabilities"},GQ:{Number:1,Type:"Integer",Description:"Conditional genotype quality"},GT:{Number:1,Type:"String",Description:"Genotype"},HQ:{Number:2,Type:"Integer",Description:"Haplotype quality"},MQ:{Number:1,Type:"Integer",Description:"RMS mapping quality"},PL:{Number:"G",Type:"Integer",Description:"Phred-scaled genotype likelihoods rounded to the closest integer"},PQ:{Number:1,Type:"Integer",Description:"Phasing quality"},PS:{Number:1,Type:"Integer",Description:"Phase set"}},AltTypes:{DEL:{Description:"Deletion relative to the reference"},INS:{Description:"Insertion of novel sequence relative to the reference"},DUP:{Description:"Region of elevated copy number relative to the reference"},INV:{Description:"Inversion of reference sequence"},CNV:{Description:"Copy number variable region (may be both deletion and duplication)"},"DUP:TANDEM":{Description:"Tandem duplication"},"DEL:ME":{Description:"Deletion of mobile element relative to the reference"},"INS:ME":{Description:"Insertion of a mobile element relative to the reference"},NON_REF:{Description:"Represents any possible alternative allele at this location"},"*":{Description:"Represents any possible alternative allele at this location"}},FilterTypes:{PASS:{Description:"Passed all filters"}}};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1){for(var r,n,o,i=e.includes("[")?"right":"left",a=0;a(.*)");if(!c)throw new Error("failed to parse ".concat(e));var l=null==c?void 0:c[2];return l?{Join:"left",Replacement:l,MateDirection:"right",MatePosition:"<".concat(null==c?void 0:c[1],">:1")}:void 0}if(e.includes("<")){var s=e.match("(.*)<(.*)>");if(!s)throw new Error("failed to parse ".concat(e));var f=null==s?void 0:s[1];return f?{Join:"right",Replacement:f,MateDirection:"right",MatePosition:"<".concat(null==s?void 0:s[2],">:1")}:void 0}}const f=function(){function e(t){var r=this,o=t.header,i=void 0===o?"":o,a=t.strict,u=void 0===a||a;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!i||!i.length)throw new Error("empty header received");var c,l=i.split(/[\r\n]+/).filter((function(e){return e}));if(!l.length)throw new Error("no non-empty header lines specified");if(this.strict=u,this.metadata=JSON.parse(JSON.stringify({INFO:n.InfoFields,FORMAT:n.GenotypeFields,ALT:n.AltTypes,FILTER:n.FilterTypes})),l.forEach((function(e){if(!e.startsWith("#"))throw new Error("Bad line in header:\n".concat(e));e.startsWith("##")?r._parseMetadata(e):c=e})),!c)throw new Error("No format line found in header");var s=c.trim().split("\t"),f=s.slice(0,8),p=["#CHROM","POS","ID","REF","ALT","QUAL","FILTER","INFO"];if(s.length<8)throw new Error("VCF header missing columns:\n".concat(c));if(f.length!==p.length||!f.every((function(e,t){return e===p[t]})))throw new Error("VCF column headers not correct:\n".concat(c));this.samples=s.slice(9)}var t,r;return t=e,r=[{key:"_parseGenotypes",value:function(e,t){var r=this,n=t.split("\t"),o={},i=null==e?void 0:e.split(":");return i&&this.samples.forEach((function(e,t){o[e]={},i.forEach((function(t){o[e][t]=null})),n[t].split(":").filter((function(e){return e})).forEach((function(t,n){var a;if(""===t||"."===t||void 0===t)a=null;else{var u=t.split(",").map((function(e){return"."===e?null:e})),c=r.getMetadata("FORMAT",i[n],"Type");a="Integer"===c||"Float"===c?u.map((function(e){return e?+e:e})):u}o[e][i[n]]=a}),{})})),o}},{key:"_parseMetadata",value:function(e){var t=e.trim().match(/^##(.+?)=(.*)/);if(!t)throw new Error("Line is not a valid metadata line: ".concat(e));var r=i(t.slice(1,3),2),n=r[0],o=r[1];if(o.startsWith("<")){n in this.metadata||(this.metadata[n]={});var a=i(this._parseStructuredMetaVal(o),2),u=a[0],c=a[1];this.metadata[n][u]=c}else this.metadata[n]=o}},{key:"_parseStructuredMetaVal",value:function(e){var t=this._parseKeyValue(e.replace(/^<|>$/g,""),","),r=t.ID;return delete t.ID,"Number"in t&&(Number.isNaN(Number(t.Number))||(t.Number=Number(t.Number))),[r,t]}},{key:"getMetadata",value:function(){for(var e=this.metadata,t=arguments.length,r=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:";",r={},n="",o="",i=1,a=0;ae.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function s(e){return function(e){if(Array.isArray(e))return p(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||f(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&u.every((function(e){return(0,y.default)(e)}))?h.default.createElement(b.default,{key:o,name:o,prefix:P,value:u}):h.default.createElement(g.default,{key:o,name:o,value:u,description:f,prefix:P});if((0,y.default)(u)){t.omitSingleLevel;var p=l(t,i);return(0,m.isUriLocation)(u)?E?null:h.default.createElement(w.default,{key:o,name:o,prefix:P,value:u}):h.default.createElement(e,c(c({},p),{},{key:o,attributes:u,descriptions:d,prefix:[].concat(s(P),[o])}))}return h.default.createElement(S.default,{key:o,name:o,value:O(u,o),description:f,prefix:P,width:Math.min(L,170)})})))}},98330:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(3024),a=n(r(4990)),u=r(31050),c=r(87931),l=(0,i.makeStyles)()((function(e){return{fieldValue:{wordBreak:"break-word",maxHeight:300,fontSize:12,padding:e.spacing(.5),overflow:"auto"}}}));t.default=function(e){var t=e.value,r=l().classes,n="".concat(t).match(/^https?:\/\//);return o.default.createElement("div",{className:r.fieldValue},o.default.isValidElement(t)?t:n?o.default.createElement(u.Link,{href:"".concat(t)},"".concat(t)):o.default.createElement(c.SanitizedHTML,{html:(0,a.default)(t)?JSON.stringify(t):String(t)}))}},19895:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["id"];function i(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e,t,r){var o;return o=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==n(o)?o:String(o))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o))})),L=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(n);try{for(L.s();!(t=L.n()).done;)for(var T=t.value,I=0,M=Object.keys(T);Ie.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};return e.forEach((function(e){(0,i.default)(t)&&(t=t[e])})),"string"==typeof t?t:(0,i.default)(t)&&"string"==typeof(null==t?void 0:t.Description)?t.Description:void 0}},53387:function(e,t,r){"use strict";function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2*p?"".concat(n.slice(0,p),"...").concat(n.slice(-p)):n):null)})),l?a.default.createElement("span",{style:{background:u.updownstreamColor}},l):null)}},36067:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(92536),a=r(66708);t.default=function(e){var t=e.cds,r=e.sequence;return o.default.createElement("span",{style:{background:i.cdsColor}},(0,a.stitch)(t,r))}},51233:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(92536);t.default=function(e){var t=e.sequence,r=e.upstream,n=e.downstream;return o.default.createElement(o.default.Fragment,null,r?o.default.createElement("span",{style:{background:i.updownstreamColor}},r):null,o.default.createElement("span",{style:{background:i.genomeColor}},t),n?o.default.createElement("span",{style:{background:i.updownstreamColor}},n):null)}},78600:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(66708),a=r(92536);t.default=function(e){for(var t=e.cds,r=e.sequence,n=e.codonTable,u=(0,i.stitch)(t,r),c="",l=0;le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r".concat(r.name||r.id||"".concat(r.refName,":").concat(r.start+1,"-").concat(r.end),"-").concat(n,"\n")),u.default.createElement("br",null),"genomic"===n?u.default.createElement(p.default,{sequence:y}):"genomic_sequence_updownstream"===n?u.default.createElement(p.default,{sequence:y,upstream:m,downstream:g}):"cds"===n?u.default.createElement(d.default,{cds:A,sequence:y}):"cdna"===n?u.default.createElement(s.default,{exons:O,cds:A,utr:x,sequence:y,intronBp:a}):"protein"===n?u.default.createElement(f.default,{cds:A,codonTable:j,sequence:y}):"gene"===n?u.default.createElement(s.default,{exons:O,cds:A,utr:x,sequence:y,includeIntrons:!0,intronBp:a}):"gene_collapsed_intron"===n?u.default.createElement(s.default,{exons:O,cds:A,sequence:y,utr:x,includeIntrons:!0,collapseIntron:!0,intronBp:a}):"gene_updownstream"===n?u.default.createElement(s.default,{exons:O,cds:A,sequence:y,utr:x,upstream:m,downstream:g,includeIntrons:!0,intronBp:a}):"gene_updownstream_collapsed_intron"===n?u.default.createElement(s.default,{exons:O,cds:A,sequence:y,utr:x,upstream:m,downstream:g,includeIntrons:!0,collapseIntron:!0,intronBp:a}):u.default.createElement("div",null,"Unknown type")))}));t.default=h},64466:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rp)){e.next=7;break}d({error:"Genomic sequence larger than ".concat(p,'bp, use "force load" button to display')}),e.next=19;break;case 7:return l=i-r,s=a+r,e.next=11,b(i,a,u);case 11:return f=e.sent,e.next=14,b(Math.max(0,l),i,u);case 14:return h=e.sent,e.next=17,b(a,s,u);case 17:y=e.sent,c||d({seq:f,upstream:h,downstream:y});case 19:e.next=25;break;case 21:e.prev=21,e.t0=e.catch(0),console.error(e.t0),v(e.t0);case 25:case"end":return e.stop()}}),e,null,[[0,21]])})))(),function(){c=!0}}),[t,e,r,n]),{sequence:c,error:y}}},68486:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.genomeColor=t.updownstreamColor=t.cdsColor=t.proteinColor=t.utrColor=t.intronColor=void 0,t.intronColor=void 0,t.utrColor="rgb(200,240,240)",t.proteinColor="rgb(220,160,220)",t.cdsColor="rgb(220,220,180)",t.updownstreamColor="rgba(250,200,200)",t.genomeColor="rgb(200,280,200)"},7946:function(e,t,r){"use strict";var n=["featureData","finalizedFeatureData"],o=["unformattedFeatureData","featureData"];function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{};t<=o||null===(n=e.subfeatures)||void 0===n||n.map((function(e){m(e,t,r,o+1,i),r(e)}))}function b(e){return s.types.model("BaseFeatureWidget",{id:y.ElementId,type:s.types.literal("BaseFeatureWidget"),featureData:s.types.frozen(),formattedFields:s.types.frozen(),unformattedFeatureData:s.types.frozen(),view:s.types.safeReference(e.pluggableMstType("view","stateModel")),track:s.types.safeReference(e.pluggableMstType("track","stateModel")),trackId:s.types.maybe(s.types.string),trackType:s.types.maybe(s.types.string),maxDepth:s.types.maybe(s.types.number)}).volatile((function(){return{error:void 0}})).actions((function(e){return{setFeatureData:function(t){e.unformattedFeatureData=t},clearFeatureData:function(){e.featureData=void 0},setFormattedData:function(t){e.featureData=t},setExtra:function(t,r,n){e.trackId=r,e.trackType=t,e.maxDepth=n},setError:function(t){e.error=t}}})).actions((function(e){return{afterCreate:function(){(0,s.addDisposer)(e,(0,f.autorun)((function(){try{var t=e.unformattedFeatureData,r=e.track,n=(0,h.getSession)(e);if(r&&e.setExtra(r.type,r.configuration.trackId,(0,d.getConf)(r,["formatDetails","maxDepth"])),t){var o=(0,p.default)(t),i=function(e,t){return c(c({},(0,d.getConf)(n,["formatDetails",e],{feature:t})),(0,d.getConf)(r,["formatDetails",e],{feature:t}))};r&&(o.__jbrowsefmt=i("feature",o),m(o,(0,d.getConf)(r,["formatDetails","depth"]),(function(e){e.__jbrowsefmt=i("subfeatures",e)}))),e.setFormattedData(o)}}catch(t){console.error(t),e.setError(t)}})))}}})).preProcessSnapshot((function(e){return c({unformattedFeatureData:e.featureData,featureData:e.finalizedFeatureData},a(e,n))})).postProcessSnapshot((function(e){e.unformattedFeatureData;var t=e.featureData,r=a(e,o);return c({finalizedFeatureData:JSON.parse(JSON.stringify(t,(function(e,t){return void 0===t?null:t})))},r)}))}t.configSchema=v,t.default=b,t.stateModelFactory=b},66708:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r.start&&e.start<=r.start})),u=t.findIndex((function(e){return e.end>=o.end&&e.start<=o.end})),c=t[u],l=t[i],s=[].concat(n(t.slice(0,i)),[{start:l.start,end:r.start}]).map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),f=[{start:o.end,end:c.end}].concat(n(t.slice(u+1))).map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(s),n(f))},t.calculateUTRs2=function(e,t){if(!e.length)return[];var r=e.at(0),o=e.at(-1),i=[{start:t.start,end:r.start}].map((function(e){return a(a({},e),{},{type:"five_prime_UTR"})})),u=[{start:o.end,end:t.end}].map((function(e){return a(a({},e),{},{type:"three_prime_UTR"})}));return[].concat(n(i),n(u))},t.ellipses=function(e){return e.length>20?"".concat(e.slice(0,20),"..."):e}},41702:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions=[],this.fetchESM=null==r?void 0:r.fetchESM,this.fetchCJS=null==r?void 0:r.fetchCJS,this.definitions=JSON.parse(JSON.stringify(t))}var t,r,n,u,c,s,f;return t=e,r=[{key:"loadCJSPlugin",value:(f=l(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n=new URL(t.cjsUrl,r)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('Cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchCJS){e.next=5;break}throw new Error("No fetchCJS callback provided");case 5:return e.abrupt("return",this.fetchCJS(n.href));case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"loadESMPlugin",value:(s=l(i().mark((function e(t,r){var n,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="esmUrl"in t?new URL(t.esmUrl,r):new URL(t.esmLoc.uri,t.esmLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(this.fetchESM){e.next=5;break}throw new Error("No ESM fetcher installed");case 5:return e.next=7,this.fetchESM(n.href);case 7:if(o=e.sent){e.next=10;break}throw new Error("Could not load ESM plugin: ".concat(n));case 10:return e.abrupt("return",o);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"loadUMDPlugin",value:(c=l(i().mark((function e(t,r){var n,o,a,u;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("http:"===(n="url"in t?new URL(t.url,r):"umdUrl"in t?new URL(t.umdUrl,r):new URL(t.umdLoc.uri,t.umdLoc.baseUri)).protocol||"https:"===n.protocol){e.next=3;break}throw new Error('cannot load plugins using protocol "'.concat(n.protocol,'"'));case 3:if(o=t.name,a="JBrowsePlugin".concat(o),"undefined"!=typeof jest){e.next=10;break}return e.next=8,b(n.href);case 8:e.next=11;break;case 10:globalThis[a]={default:p.default};case 11:if(u=globalThis[a]){e.next=14;break}throw new Error("Failed to load UMD bundle for ".concat(o,", ").concat(a," is undefined"));case 14:return e.abrupt("return",u);case 15:case"end":return e.stop()}}),e)}))),function(e,t){return c.apply(this,arguments)})},{key:"loadPlugin",value:(u=l(i().mark((function e(t,r){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!h.isElectron||!w(t)){e.next=6;break}return e.next=3,this.loadCJSPlugin(t,r);case 3:case 9:case 15:n=e.sent,e.next=23;break;case 6:if(!v(t)){e.next=12;break}return e.next=9,this.loadESMPlugin(t,r);case 12:if(!y(t)){e.next=18;break}return e.next=15,this.loadUMDPlugin(t,r);case 18:if(h.isElectron||!w(t)){e.next=22;break}throw new Error("CommonJS plugin found, but not in a NodeJS environment: ".concat(JSON.stringify(t)));case 22:throw new Error("Could not determine plugin type: ".concat(JSON.stringify(t)));case 23:if(n.default){e.next=25;break}throw new Error("".concat(S(t)," does not have a default export, cannot load"));case 25:return e.abrupt("return",n.default);case 26:case"end":return e.stop()}}),e,this)}))),function(e,t){return u.apply(this,arguments)})},{key:"installGlobalReExports",value:function(e){e.JBrowseExports=Object.fromEntries(Object.entries(d.default).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());return[n[0],n[1]]})))}},{key:"load",value:(n=l(i().mark((function e(t){var r=this;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(this.definitions.map(function(){var e=l(i().mark((function e(n){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.loadPlugin(n,t);case 2:return e.t0=e.sent,e.t1=n,e.abrupt("return",{plugin:e.t0,definition:e.t1});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 1:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=A},91070:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,i=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),u=new T(n||[]);return i(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,u,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&o.call(O,u)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(n,i,a,u){var c=d(e[n],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var n;i(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,i=function r(){for(;++n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function a(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[];s(this,e),this.plugins=[],this.jexl=(0,_.default)(),this.pluginMetadata={},this.runtimePluginDefinitions=[],this.elementCreationSchedule=new L("renderer","adapter","text search adapter","display","track","connection","view","widget","rpc method","internet account","add track workflow"),this.rendererTypes=new T("RendererType",v.default),this.adapterTypes=new T("AdapterType",m.default),this.textSearchAdapterTypes=new T("TextSearchAdapterType",E.default),this.trackTypes=new T("TrackType",b.default),this.displayTypes=new T("DisplayType",g.default),this.connectionTypes=new T("ConnectionType",A.default),this.viewTypes=new T("ViewType",w.default),this.widgetTypes=new T("WidgetType",S.default),this.rpcMethods=new T("RpcMethodType",x.default),this.addTrackWidgets=new T("AddTrackWorkflow",j.default),this.internetAccountTypes=new T("InternetAccountType",O.default),this.configured=!1,this.extensionPoints=new Map,this.jbrequireCache=new Map,this.lib=k.default,this.load=function(e){return t.jbrequireCache.has(e)||t.jbrequireCache.set(e,e(t)),t.jbrequireCache.get(e)},this.jbrequire=function(e){if("string"==typeof e){var r=t.lib[e];if(!r)throw new TypeError("No jbrequire re-export defined for package '".concat(e,"'. If this package must be shared between plugins, add it to ReExports.js. If it does not need to be shared, just import it normally."));return r}if("function"==typeof e)return t.load(e);if(e.default)return t.jbrequire(e.default);throw new TypeError("lib passed to jbrequire must be either a string or a function")},this.addPlugin({plugin:new C.default,metadata:{isCore:!0}}),r.forEach((function(e){t.addPlugin(e)}))}var t,r;return p(e,[{key:"pluginConfigurationSchemas",value:function(){var e={};return this.plugins.forEach((function(t){t.configurationSchema&&(e[t.name]=t.configurationSchema)})),e}},{key:"addPlugin",value:function(e){if(this.configured)throw new Error("JBrowse already configured, cannot add plugins");var t,r,n=(t="install"in e&&"configure"in e?[e,{}]:[e.plugin,e.metadata],r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||u(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1],a=void 0===i?{}:i;if(this.plugins.includes(o))throw new Error("plugin already installed");return this.pluginMetadata[o.name]=a,"definition"in e&&this.runtimePluginDefinitions.push(e.definition),o.install(this),this.plugins.push(o),this}},{key:"getPlugin",value:function(e){return this.plugins.find((function(t){return t.name===e}))}},{key:"hasPlugin",value:function(e){return void 0!==this.getPlugin(e)}},{key:"createPluggableElements",value:function(){return this.elementCreationSchedule&&(this.elementCreationSchedule.run(),delete this.elementCreationSchedule),this}},{key:"setRootModel",value:function(e){this.rootModel=e}},{key:"configure",value:function(){var e=this;if(this.configured)throw new Error("already configured");return this.plugins.forEach((function(t){return t.configure(e)})),this.configured=!0,this}},{key:"getElementTypeRecord",value:function(e){switch(e){case"adapter":return this.adapterTypes;case"text search adapter":return this.textSearchAdapterTypes;case"connection":return this.connectionTypes;case"widget":return this.widgetTypes;case"renderer":return this.rendererTypes;case"display":return this.displayTypes;case"track":return this.trackTypes;case"view":return this.viewTypes;case"rpc method":return this.rpcMethods;case"internet account":return this.internetAccountTypes;case"add track workflow":return this.addTrackWidgets;default:throw new Error("invalid element type '".concat(e,"'"))}}},{key:"addElementType",value:function(e,t){var r,n=this;if("function"!=typeof t)throw new Error("must provide a callback function that returns the new type object");var o=this.getElementTypeRecord(e);return null===(r=this.elementCreationSchedule)||void 0===r||r.add(e,(function(){var r=t(n);if(!r.name)throw new Error("cannot add a ".concat(e," with no name"));if(o.has(r.name))throw new Error("".concat(e," ").concat(r.name," already registered, cannot register it again"));o.add(r.name,n.evaluateExtensionPoint("Core-extendPluggableElement",r))})),this}},{key:"getElementType",value:function(e,t){return this.getElementTypeRecord(e).get(t)}},{key:"getElementTypesInGroup",value:function(e){return this.getElementTypeRecord(e).all()}},{key:"getTrackElements",value:function(){return this.getElementTypesInGroup("track")}},{key:"getConnectionElements",value:function(){return this.getElementTypesInGroup("connection")}},{key:"getAddTrackWorkflowElements",value:function(){return this.getElementTypesInGroup("add track workflow")}},{key:"getRpcElements",value:function(){return this.getElementTypesInGroup("rpc method")}},{key:"getDisplayElements",value:function(){return this.getElementTypesInGroup("display")}},{key:"getAdapterElements",value:function(){return this.getElementTypesInGroup("adapter")}},{key:"pluggableMstType",value:function(e,t){var r,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:y.types.maybe(y.types.null),o=this.getElementTypeRecord(e).all().map((function(e){return e[t]})).filter((function(e){return(0,y.isType)(e)&&(0,y.isModelType)(e)}));return 0===o.length&&"undefined"==typeof jest?(console.warn("No pluggable types found matching ('".concat(e,"','").concat(t,"')")),n):(r=y.types).union.apply(r,a(o))}},{key:"pluggableConfigSchemaType",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"configSchema",n=this.getElementTypeRecord(e).all().map((function(e){return e[r]})).filter((function(e){return(0,P.isBareConfigurationSchemaType)(e)}));return 0===n.length&&n.push((0,P.ConfigurationSchema)("Null",{})),(t=y.types).union.apply(t,a(n))}},{key:"getRendererType",value:function(e){return this.rendererTypes.get(e)}},{key:"getRendererTypes",value:function(){return this.rendererTypes.all()}},{key:"getAdapterType",value:function(e){return this.adapterTypes.get(e)}},{key:"getTextSearchAdapterType",value:function(e){return this.textSearchAdapterTypes.get(e)}},{key:"getTrackType",value:function(e){return this.trackTypes.get(e)}},{key:"getDisplayType",value:function(e){return this.displayTypes.get(e)}},{key:"getViewType",value:function(e){return this.viewTypes.get(e)}},{key:"getAddTrackWorkflow",value:function(e){return this.addTrackWidgets.get(e)}},{key:"getWidgetType",value:function(e){return this.widgetTypes.get(e)}},{key:"getConnectionType",value:function(e){return this.connectionTypes.get(e)}},{key:"getRpcMethodType",value:function(e){return this.rpcMethods.get(e)}},{key:"getInternetAccountType",value:function(e){return this.internetAccountTypes.get(e)}},{key:"addRendererType",value:function(e){return this.addElementType("renderer",e)}},{key:"addAdapterType",value:function(e){return this.addElementType("adapter",e)}},{key:"addTextSearchAdapterType",value:function(e){return this.addElementType("text search adapter",e)}},{key:"addTrackType",value:function(e){var t=this;return this.addElementType("track",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.trackType!==r.name||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addDisplayType",value:function(e){return this.addElementType("display",e)}},{key:"addViewType",value:function(e){var t=this;return this.addElementType("view",(function(){var r=e(t);return t.getElementTypesInGroup("display").forEach((function(e){e.viewType!==r.name&&e.viewType!==r.extendedName||r.displayTypes.includes(e)||r.addDisplayType(e)})),r}))}},{key:"addWidgetType",value:function(e){return this.addElementType("widget",e)}},{key:"addConnectionType",value:function(e){return this.addElementType("connection",e)}},{key:"addRpcMethod",value:function(e){return this.addElementType("rpc method",e)}},{key:"addInternetAccountType",value:function(e){return this.addElementType("internet account",e)}},{key:"addAddTrackWorkflowType",value:function(e){return this.addElementType("add track workflow",e)}},{key:"addToExtensionPoint",value:function(e,t){var r=this.extensionPoints.get(e);r||(r=[],this.extensionPoints.set(e,r)),r.push(t)}},{key:"evaluateExtensionPoint",value:function(e,t,r){var n=this.extensionPoints.get(e),o=t;if(n){var a,u=i(n);try{for(u.s();!(a=u.n()).done;){var c=a.value;try{o=c(o,r)}catch(e){console.error(e)}}}catch(e){u.e(e)}finally{u.f()}}return o}},{key:"evaluateAsyncExtensionPoint",value:(t=n().mark((function e(t,r,o){var a,u,c,l,s;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.extensionPoints.get(t),u=r,!a){e.next=27;break}c=i(a),e.prev=4,c.s();case 6:if((l=c.n()).done){e.next=19;break}return s=l.value,e.prev=8,e.next=11,s(u,o);case 11:u=e.sent,e.next=17;break;case 14:e.prev=14,e.t0=e.catch(8),console.error(e.t0);case 17:e.next=6;break;case 19:e.next=24;break;case 21:e.prev=21,e.t1=e.catch(4),c.e(e.t1);case 24:return e.prev=24,c.f(),e.finish(24);case 27:return e.abrupt("return",u);case 28:case"end":return e.stop()}}),e,this,[[4,21,24,27],[8,14]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function u(e){o(a,n,i,u,c,"next",e)}function c(e){o(a,n,i,u,c,"throw",e)}u(void 0)}))},function(e,t,n){return r.apply(this,arguments)})}]),e}();t.default=I},7862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(52313);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.Attributes}})},13440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(52313);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.BaseCard}})},25983:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(52313);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.FeatureDetails}})},96039:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(15870);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},72539:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=["mobx","mobx-state-tree","react","react/jsx-runtime","react-dom","mobx-react","@mui/x-data-grid","@mui/material/utils","@material-ui/core/utils","tss-react/mui","@material-ui/core","@mui/material","prop-types","@mui/material/styles","@material-ui/core/styles","@material-ui/core/Accordion","@material-ui/core/AccordionActions","@material-ui/core/AccordionDetails","@material-ui/core/Alert","@material-ui/core/AlertTitle","@material-ui/core/Autocomplete","@material-ui/core/Avatar","@material-ui/core/AvatarGroup","@material-ui/core/Backdrop","@material-ui/core/Badge","@material-ui/core/Box","@material-ui/core/Breadcrumbs","@material-ui/core/Button","@material-ui/core/ButtonGroup","@material-ui/core/Card","@material-ui/core/CardActions","@material-ui/core/CardActionArea","@material-ui/core/CardContent","@material-ui/core/CardHeader","@material-ui/core/CardMedia","@material-ui/core/CircularProgress","@material-ui/core/Collapse","@material-ui/core/ClickAwayListener","@material-ui/core/Chip","@material-ui/core/Checkbox","@material-ui/core/Container","@material-ui/core/Dialog","@material-ui/core/DialogActions","@material-ui/core/DialogTitle","@material-ui/core/DialogContent","@material-ui/core/DialogContentText","@material-ui/core/Divider","@material-ui/core/Drawer","@material-ui/core/Fab","@material-ui/core/Fade","@material-ui/core/FilledInput","@material-ui/core/FormLabel","@material-ui/core/FormControl","@material-ui/core/FormControlLabel","@material-ui/core/FormHelperText","@material-ui/core/FormGroup","@material-ui/core/Grid","@material-ui/core/Grow","@material-ui/core/Icon","@material-ui/core/IconButton","@material-ui/core/Input","@material-ui/core/InputBase","@material-ui/core/InputLabel","@material-ui/core/InputAdornment","@material-ui/core/Link","@material-ui/core/LinearProgress","@material-ui/core/List","@material-ui/core/ListItem","@material-ui/core/ListItemAvatar","@material-ui/core/ListItemSecondaryAction","@material-ui/core/ListItemIcon","@material-ui/core/ListSubheader","@material-ui/core/ListItemText","@material-ui/core/Menu","@material-ui/core/MenuItem","@material-ui/core/MenuList","@material-ui/core/Modal","@material-ui/core/NativeSelect","@material-ui/core/OutlinedInput","@material-ui/core/Pagination","@material-ui/core/PaginationItem","@material-ui/core/Paper","@material-ui/core/Popover","@material-ui/core/Popper","@material-ui/core/Portal","@material-ui/core/Radio","@material-ui/core/RadioGroup","@material-ui/core/Rating","@material-ui/core/ScopedCssBaseline","@material-ui/core/Select","@material-ui/core/Skeleton","@material-ui/core/Slider","@material-ui/core/Snackbar","@material-ui/core/SnackbarContent","@material-ui/core/SpeedDial","@material-ui/core/SpeedDialAction","@material-ui/core/SpeedDialIcon","@material-ui/core/Stack","@material-ui/core/Step","@material-ui/core/StepButton","@material-ui/core/StepConnector","@material-ui/core/StepLabel","@material-ui/core/StepIcon","@material-ui/core/Stepper","@material-ui/core/SvgIcon","@material-ui/core/Switch","@material-ui/core/Tab","@material-ui/core/Table","@material-ui/core/TableBody","@material-ui/core/TableCell","@material-ui/core/TableContainer","@material-ui/core/TableFooter","@material-ui/core/TableHead","@material-ui/core/TablePagination","@material-ui/core/TableRow","@material-ui/core/TableSortLabel","@material-ui/core/Tabs","@material-ui/core/TextField","@material-ui/core/TextareaAutosize","@material-ui/core/ToggleButton","@material-ui/core/ToggleButtonGroup","@material-ui/core/Toolbar","@material-ui/core/Tooltip","@material-ui/core/Typography","@mui/material/Accordion","@mui/material/AccordionActions","@mui/material/AccordionDetails","@mui/material/Alert","@mui/material/AlertTitle","@mui/material/Autocomplete","@mui/material/Avatar","@mui/material/AvatarGroup","@mui/material/Backdrop","@mui/material/Badge","@mui/material/Box","@mui/material/Breadcrumbs","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/Card","@mui/material/CardActions","@mui/material/CardActionArea","@mui/material/CardContent","@mui/material/CardHeader","@mui/material/CardMedia","@mui/material/CircularProgress","@mui/material/Collapse","@mui/material/ClickAwayListener","@mui/material/Chip","@mui/material/Checkbox","@mui/material/Container","@mui/material/Dialog","@mui/material/DialogActions","@mui/material/DialogTitle","@mui/material/DialogContent","@mui/material/DialogContentText","@mui/material/Divider","@mui/material/Drawer","@mui/material/Fab","@mui/material/Fade","@mui/material/FilledInput","@mui/material/FormLabel","@mui/material/FormControl","@mui/material/FormControlLabel","@mui/material/FormHelperText","@mui/material/FormGroup","@mui/material/Grid","@mui/material/Grow","@mui/material/Icon","@mui/material/IconButton","@mui/material/Input","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/InputAdornment","@mui/material/Link","@mui/material/LinearProgress","@mui/material/List","@mui/material/ListItem","@mui/material/ListItemAvatar","@mui/material/ListItemSecondaryAction","@mui/material/ListItemIcon","@mui/material/ListSubheader","@mui/material/ListItemText","@mui/material/Menu","@mui/material/MenuItem","@mui/material/MenuList","@mui/material/Modal","@mui/material/NativeSelect","@mui/material/OutlinedInput","@mui/material/Pagination","@mui/material/PaginationItem","@mui/material/Paper","@mui/material/Popover","@mui/material/Popper","@mui/material/Portal","@mui/material/Radio","@mui/material/RadioGroup","@mui/material/Rating","@mui/material/ScopedCssBaseline","@mui/material/Select","@mui/material/Skeleton","@mui/material/Slider","@mui/material/Snackbar","@mui/material/SnackbarContent","@mui/material/SpeedDial","@mui/material/SpeedDialAction","@mui/material/SpeedDialIcon","@mui/material/Stack","@mui/material/Step","@mui/material/StepButton","@mui/material/StepConnector","@mui/material/StepLabel","@mui/material/StepIcon","@mui/material/Stepper","@mui/material/SvgIcon","@mui/material/Switch","@mui/material/Tab","@mui/material/Table","@mui/material/TableBody","@mui/material/TableCell","@mui/material/TableContainer","@mui/material/TableFooter","@mui/material/TableHead","@mui/material/TablePagination","@mui/material/TableRow","@mui/material/TableSortLabel","@mui/material/Tabs","@mui/material/TextField","@mui/material/TextareaAutosize","@mui/material/ToggleButton","@mui/material/ToggleButtonGroup","@mui/material/Toolbar","@mui/material/Tooltip","@mui/material/Typography","@material-ui/lab/ToggleButton","@material-ui/lab/ToggleButtonGroup","@material-ui/lab/Autocomplete","@material-ui/lab/Alert","@material-ui/lab","@jbrowse/core/Plugin","@jbrowse/core/pluggableElementTypes","@jbrowse/core/pluggableElementTypes/ViewType","@jbrowse/core/pluggableElementTypes/AdapterType","@jbrowse/core/pluggableElementTypes/DisplayType","@jbrowse/core/pluggableElementTypes/TrackType","@jbrowse/core/pluggableElementTypes/WidgetType","@jbrowse/core/pluggableElementTypes/models","@jbrowse/core/pluggableElementTypes/renderers/ServerSideRendererType","@jbrowse/core/pluggableElementTypes/renderers/CircularChordRendererType","@jbrowse/core/pluggableElementTypes/renderers/BoxRendererType","@jbrowse/core/pluggableElementTypes/renderers/FeatureRendererType","@jbrowse/core/pluggableElementTypes/renderers/RendererType","@jbrowse/core/configuration","@jbrowse/core/util/types/mst","@jbrowse/core/ui","@jbrowse/core/util","@jbrowse/core/util/color","@jbrowse/core/util/layouts","@jbrowse/core/util/tracks","@jbrowse/core/util/Base1DViewModel","@jbrowse/core/util/io","@jbrowse/core/util/mst-reflection","@jbrowse/core/util/rxjs","@jbrowse/core/BaseFeatureWidget/BaseFeatureDetail","@jbrowse/core/data_adapters/BaseAdapter"]},15870:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)throw new Error("The following modules are in the modules libs, but not the re-exports list: ".concat(se.join(", ")));var fe=Y.default.filter((function(e){return!le.includes(e)}));if(fe.length)throw new Error("The following modules are in the re-exports list, but not the modules libs: ".concat(fe.join(", ")));t.default=ce},93015:(e,t)=>{"use strict";function r(e,t,r){return t=o(t),function(e,t){if(t&&("object"===a(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,n()?Reflect.construct(t,r||[],o(e).constructor):t.apply(e,r))}function n(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(n=function(){return!!e})()}function o(e){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},o(e)}function i(e,t){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},i(e,t)}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(n,o);if(!n.sessionId)throw new Error("sessionId is required");return r.get((0,w.adapterConfigCacheKey)(t),{adapterConf:t,self:e,options:a},void 0,i)},getRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(null==t?void 0:t.sessionId){n.next=2;break}throw new Error("sessionId is required");case 2:return n.next=4,r.getAdapterMapEntry(e,t);case 4:return o=n.sent,n.abrupt("return",o.forwardMap);case 6:case"end":return n.stop()}}),n)})))()},getReverseRefNameMapForAdapter:function(e,t){var r=this;return d(l().mark((function n(){var o;return l().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,r.getAdapterMapEntry(e,t);case 2:return o=n.sent,n.abrupt("return",o.reverseMap);case 4:case"end":return n.stop()}}),n)})))()}}}))}},97711:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(54133);t.default=function(e){return(0,n.ConfigurationSchema)("BaseAssembly",{aliases:{type:"stringArray",defaultValue:[],description:"Other possible names for the assembly"},sequence:e.getTrackType("ReferenceSequenceTrack").configSchema,refNameColors:{type:"stringArray",defaultValue:[],description:"Define custom colors for each reference sequence. Will cycle through this list if there are not enough colors for every sequence."},refNameAliases:(0,n.ConfigurationSchema)("RefNameAliases",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"RefNameAliasAdapter"}}}}),cytobands:(0,n.ConfigurationSchema)("Cytoband",{adapter:e.pluggableConfigSchemaType("adapter")},{preProcessSnapshot:function(e){return e.adapter?e:{adapter:{type:"CytobandAdapter"}}}}),displayName:{type:"string",defaultValue:"",description:'A human readable display name for the assembly e.g. "Homo sapiens (hg38)" while the assembly name may just be "hg38"'}},{explicitIdentifier:"name"})}},97587:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||l(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if("string"!=typeof e)throw new Error("first arg must be string name of the model that this config schema goes with");var o=t,i=n;return(null===(r=n.baseConfiguration)||void 0===r?void 0:r.jbrowseSchemaDefinition)&&(o=a(a({},n.baseConfiguration.jbrowseSchemaDefinition),o),delete(i=a(a({},n.baseConfiguration.jbrowseSchemaOptions),n)).baseConfiguration),{schemaDefinition:o,options:i}}(e,t,r),i=o.schemaDefinition,l=o.options,y=function(e,t,r){var o,i={};if(r.explicitlyTyped&&(i.type=s.types.optional(s.types.literal(e),e)),r.explicitIdentifier&&r.implicitIdentifier)throw new Error("Cannot have both explicit and implicit identifiers in ".concat(e));r.explicitIdentifier?"string"==typeof r.explicitIdentifier?(i[r.explicitIdentifier]=s.types.identifier,o=r.explicitIdentifier):(i.id=s.types.identifier,o="id"):r.implicitIdentifier&&("string"==typeof r.implicitIdentifier?(i[r.implicitIdentifier]=f.ElementId,o=r.implicitIdentifier):(i.id=f.ElementId,o="id"));var l={isJBrowseConfigurationSchema:!0,jbrowseSchema:{modelName:e,definition:t,options:r}};Object.entries(t).forEach((function(t){var r=n(t,2),o=r[0],a=r[1];if((0,s.isType)(a)&&(0,s.isLateType)(a)||(0,d.isConfigurationSchemaType)(a))i[o]=a;else if("string"==typeof a||"number"==typeof a)l[o]=a;else{if("object"!==c(a))throw new Error('invalid configuration schema definition, "'.concat(o,'" must be either a valid configuration slot definition, a constant, or a nested configuration schema'));if(!a.type)throw new Error("no type set for config slot ".concat(e,".").concat(o));try{i[o]=(0,p.default)(o,a)}catch(t){throw new Error("invalid config slot definition for ".concat(e,".").concat(o,": ").concat(t))}}}));var y=s.types.model("".concat(e,"ConfigurationSchema"),i).actions((function(e){return{setSubschema:function(t,r){if(!(0,d.isConfigurationSchemaType)(i[t]))throw new Error("".concat(t," is not a subschema, cannot replace"));var n=(0,s.isStateTreeNode)(r)?r:i[t].create(r);return e[t]=n,n}}}));Object.keys(l).length&&(y=y.volatile((function(){return l}))),r.actions&&(y=y.actions(r.actions)),r.views&&(y=y.views(r.views)),r.extend&&(y=y.extend(r.extend));var v=o?u({},o,"placeholderId"):{},m=r.explicitlyTyped?a({type:e},v):v,b=(0,s.getSnapshot)(y.create(m));return y=y.postProcessSnapshot((function(e){for(var t,r={},o=!0,i=0,a=Object.entries(e);i{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(72731),i=r(77424),a=r(20191),u=r(57525),c={stringArray:o.types.array(o.types.string),stringArrayMap:o.types.map(o.types.array(o.types.string)),numberMap:o.types.map(o.types.number),boolean:o.types.boolean,color:o.types.refinement("Color",o.types.string,(function(){return!0})),integer:o.types.integer,number:o.types.number,string:o.types.string,text:o.types.string,fileLocation:a.FileLocation,frozen:o.types.frozen()},l={stringArray:[],stringArrayMap:{},numberMap:{},boolean:!0,color:"black",integer:1,number:1,string:"",text:"",fileLocation:{uri:"/path/to/resource.txt",locationType:"UriLocation"},frozen:{}},s=function(e){return{views:{get valueJSON(){return e.value}}}},f=function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}}}},p={fileLocation:f,number:s,integer:s,boolean:s,frozen:f,stringArray:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t){e.value.push(t)},removeAtIndex:function(t){e.value.splice(t,1)},setAtIndex:function(t,r){e.value[t]=r}}}},stringArrayMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)},addToKey:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.push(r)},removeAtKeyIndex:function(t,r){var n=e.value.get(t);if(!n)throw new Error("".concat(t," not found"));n.splice(r,1)},setAtKeyIndex:function(t,r,n){var o=e.value.get(t);if(!o)throw new Error("".concat(t," not found"));o[r]=n}}}},numberMap:function(e){return{views:{get valueJSON(){return JSON.stringify(e.value)}},actions:{add:function(t,r){e.value.set(t,r)},remove:function(t){e.value.delete(t)}}}}},d=o.types.refinement("JexlString",o.types.string,(function(e){return e.startsWith("jexl:")}));t.default=function(e,t){var r=t.description,a=void 0===r?"":r,s=t.model,f=t.type,h=t.defaultValue,y=t.contextVariable,v=void 0===y?[]:y;if(!f)throw new Error("type name required");if(s||(s=c[f]),!s)throw new Error('no builtin config slot type "'.concat(f,"\", and no 'model' param provided"));if(void 0===h)throw new Error("no 'defaultValue' provided");var m="".concat(e.charAt(0).toUpperCase()).concat(e.slice(1),"ConfigSlot"),b=o.types.model(m,{name:o.types.literal(e),description:o.types.literal(a),type:o.types.literal(f),value:o.types.optional(o.types.union(d,s),h)}).volatile((function(){return{contextVariable:v}})).views((function(e){return{get isCallback(){return String(e.value).startsWith("jexl:")}}})).views((function(e){return{get expr(){if(e.isCallback){var t=(0,u.getEnv)(e).pluginManager;return t||"undefined"!=typeof jest||console.warn("no pluginManager detected on config env (if you dynamically instantiate a config, for example in renderProps for your display model, check that you add the env argument)"),(0,i.stringToJexlExpression)(String(e.value),null==t?void 0:t.jexl)}return{evalSync:function(){return e.value}}},get valueJSON(){var t;if(!e.isCallback)return(null==(t=e.value)?void 0:t.toJSON)?t.toJSON():'"'.concat(t,'"')}}})).preProcessSnapshot((function(t){return"object"===n(t)&&t.name===e?t:{name:e,description:a,type:f,value:t}})).postProcessSnapshot((function(e){return"object"===n(e.value)?JSON.stringify(e.value)!==JSON.stringify(h)?e.value:void 0:e.value!==h?e.value:void 0})).actions((function(e){return{set:function(t){e.value=t},reset:function(){e.value=h},convertToCallback:function(){e.isCallback||(e.value="jexl:".concat(e.valueJSON||"''"))},convertToValue:function(){if(e.isCallback){try{var t=e.expr.evalSync();if(void 0!==t)return void(e.value=t)}catch(e){}if(e.value=h,e.isCallback){if(!(f in l))throw new Error("no fallbackDefault defined for type ".concat(f));e.value=l[f]}}}}}));p[f]&&(b=b.extend(p[f]));var g=o.types.optional(b,{name:e,type:f,description:a,value:h});return Object.defineProperty(g,"isJBrowseConfigurationSlot",{value:!0}),g}},54133:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigurationReference=t.ConfigurationSchema=void 0;var i=r(6996);Object.defineProperty(t,"ConfigurationSchema",{enumerable:!0,get:function(){return i.ConfigurationSchema}}),Object.defineProperty(t,"ConfigurationReference",{enumerable:!0,get:function(){return i.ConfigurationReference}}),o(r(98373),t)},98373:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new TypeError("must provide conf object to read");if(!t)return JSON.parse(JSON.stringify((0,i.getSnapshot)(e)));if("string"==typeof t){var n=e[t];if(!n&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(n=e.get(t)),!n)return;if(n.expr){var o=n.expr.evalSync(r);return(0,i.isStateTreeNode)(o)?JSON.parse(JSON.stringify((0,i.getSnapshot)(o))):o}return(0,i.isStateTreeNode)(n)?JSON.parse(JSON.stringify((0,i.getSnapshot)(n))):n}if(Array.isArray(t)){var a=t[0];if(t.length>1){var c=t.slice(1),l=e[a];return!l&&(0,i.isStateTreeNode)(e)&&(0,i.isMapType)((0,i.getType)(e))&&(l=e.get(a)),l?u(l,c,r):void 0}return u(e,a,r)}throw new TypeError("slotPath must be a string or array")}function c(e){if((0,i.isType)(e)){if((0,i.isModelType)(e)&&("isJBrowseConfigurationSchema"in e||e.name.includes("ConfigurationSchema")))return!0;if((0,i.isLateType)(e))return!0}return!1}function l(e){return!!(0,i.isType)(e)&&(!!c(e)||((0,i.isUnionType)(e)?(0,a.getUnionSubTypes)(e).every((function(e){return l(e)||"undefined"===e.name})):!(!(0,i.isOptionalType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isArrayType)(e)||!l((0,a.getSubType)(e)))||!(!(0,i.isMapType)(e)||!l((0,a.getSubType)(e)))))}function s(e){return(0,i.isStateTreeNode)(e)&&l((0,i.getType)(e))}t.readConfObject=u,t.getConf=function(e,t,r){if(!e)throw new TypeError("must provide a model object");var n=e.configuration;if(s(n))return u(n,t,r);throw new TypeError("cannot getConf on this model, it has no configuration")},t.getTypeNamesFromExplicitlyTypedUnion=function e(t){if((0,i.isType)(t)&&(t=(0,a.resolveLateType)(t),(0,i.isUnionType)(t))){var r=[];return(0,a.getUnionSubTypes)(t).forEach((function(t){var n,i=e(t=(0,a.resolveLateType)(t));if(i.length||(i=[(0,a.getDefaultValue)(t).type]),!i[0])throw new Error("invalid config schema type ".concat(t));r.push.apply(r,function(e){if(Array.isArray(e))return o(e)}(n=i)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(n)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(n)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())})),r}return[]},t.isBareConfigurationSchemaType=c,t.isConfigurationSchemaType=l,t.isConfigurationModel=s,t.isConfigurationSlotType=function(e){return"object"===n(e)&&null!==e&&"isJBrowseConfigurationSlot"in e}},38477:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:s.create(),r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.config=t,this.getSubAdapter=r,this.pluginManager=n,"undefined"==typeof jest){var o=(0,u.isStateTreeNode)(t)?(0,u.getSnapshot)(t):t;this.id="".concat((0,l.default)(o))}else this.id="test"}var t,r;return t=e,(r=[{key:"getConf",value:function(e){return(0,c.readConfObject)(this.config,e)}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.BaseAdapter=f,f.capabilities=[]},71249:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}function s(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,g.ObservableCreate)(function(){var n=l(u().mark((function n(o){var i;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.hasDataForRefName(e.refName,r);case 2:i=n.sent,(0,w.checkAbortSignal)(r.signal),i?t.getFeatures(e,r).subscribe(o):o.complete();case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"getFeaturesInMultipleRegions",value:function(e){var t,r=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return v.merge.apply(void 0,function(e){if(Array.isArray(e))return a(e)}(t=e.map((function(e){return r.getFeaturesInRegion(e,n)})))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())}},{key:"hasDataForRefName",value:(d=l(u().mark((function e(t){var r,n,o=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=o.length>1&&void 0!==o[1]?o[1]:{},e.next=3,this.getRefNames(r);case 3:return n=e.sent,e.abrupt("return",n.includes(t));case 5:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"getRegionQuantitativeStats",value:(f=l(u().mark((function e(t,r){var n;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.getFeatures(t,r),e.abrupt("return",(0,S.scoresToStats)(t,n));case 2:case"end":return e.stop()}}),e,this)}))),function(e,t){return f.apply(this,arguments)})},{key:"getMultiRegionQuantitativeStats",value:(c=l(u().mark((function e(){var t,r,n,o,i,a,c,l,s,f=this,p=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=p.length>1?p[1]:void 0,(t=p.length>0&&void 0!==p[0]?p[0]:[]).length){e.next=4;break}return e.abrupt("return",(0,S.blankStats)());case 4:return e.next=6,Promise.all(t.map((function(e){return f.getRegionQuantitativeStats(e,r)})));case 6:return n=e.sent,o=(0,w.max)(n.map((function(e){return e.scoreMax}))),i=(0,w.min)(n.map((function(e){return e.scoreMin}))),a=(0,w.sum)(n.map((function(e){return e.scoreSum}))),c=(0,w.sum)(n.map((function(e){return e.scoreSumSquares}))),l=(0,w.sum)(n.map((function(e){return e.featureCount}))),s=(0,w.sum)(n.map((function(e){return e.basesCovered}))),e.abrupt("return",(0,S.rectifyStats)({scoreMin:i,scoreMax:o,featureCount:l,basesCovered:s,scoreSumSquares:c,scoreSum:a}));case 14:case"end":return e.stop()}}),e)}))),function(){return c.apply(this,arguments)})},{key:"getRegionFeatureDensityStats",value:function(e,t){var r=this,n=+Date.now(),o=function(){var n=l(u().mark((function n(o,c){var l,s,f,p;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return l=e.start,s=e.end,f=.75*l+.25*s,n.next=4,(0,v.firstValueFrom)(r.getFeatures(i(i({},e),{},{start:Math.max(0,Math.round(f-o/2)),end:Math.min(Math.round(f+o/2),s)}),t).pipe((0,m.toArray)()));case 4:return p=n.sent,n.abrupt("return",a(o,{featureDensity:p.length/o},p.length,c));case 6:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}(),a=function(){var t=l(u().mark((function t(r,i,a,c){var l,s;return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=e.end-e.start,!(a>=70||2*r>l)){t.next=5;break}return t.abrupt("return",i);case 5:if(!(c<=5e3)){t.next=12;break}return s=+Date.now(),c+=s-n,n=s,t.abrupt("return",o(2*r,c));case 12:return console.warn("Stats estimation reached timeout, or didn't get enough features"),t.abrupt("return",{featureDensity:Number.POSITIVE_INFINITY});case 14:case"end":return t.stop()}}),t)})));return function(e,r,n,o){return t.apply(this,arguments)}}();return o(1e3,0)}},{key:"getMultiRegionFeatureDensityStats",value:(o=l(u().mark((function e(t,r){return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.length){e.next=2;break}throw new Error("No regions supplied");case 2:return e.abrupt("return",this.getRegionFeatureDensityStats(t[0],r));case 3:case"end":return e.stop()}}),e,this)}))),function(e,t){return o.apply(this,arguments)})}],n&&s(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(b.BaseAdapter);t.BaseFeatureDataAdapter=A},66946:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},36653:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isTextSearchAdapter=t.isRefNameAliasAdapter=t.isFeatureAdapter=t.isRegionsAdapter=t.isSequenceAdapter=void 0,t.isSequenceAdapter=function(e){return"getRegions"in e&&"getFeatures"in e},t.isRegionsAdapter=function(e){return"getRegions"in e},t.isFeatureAdapter=function(e){return"getFeatures"in e},t.isRefNameAliasAdapter=function(e){return"getRefNameAliases"in e},t.isTextSearchAdapter=function(e){return"searchIndex"in e}},79349:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(54133).ConfigurationSchema)("CytobandAdapter",{cytobandLocation:{type:"fileLocation",defaultValue:{uri:"/path/to/cytoband.txt.gz"}}},{explicitlyTyped:!0});t.default=n},6276:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=r(7799),c=a(r(87883));t.default=function(e){e.addAdapterType((function(){return new u.AdapterType({name:"CytobandAdapter",configSchema:c.default,getAdapterClass:function(){return Promise.resolve().then((function(){return i(r(79349))})).then((function(e){return e.default}))}})}))}},18231:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};return"".concat((0,l.default)(e))}t.adapterConfigCacheKey=s;var f={};function p(e,t,r){return d.apply(this,arguments)}function d(){var e;return e=o().mark((function e(t,r,n){var i,a,u,c,l,d,h,y,v,m;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=s(n),f[i]){e.next=21;break}if(a=null==n?void 0:n.type){e.next=5;break}throw new Error("could not determine adapter type from adapter config snapshot ".concat(JSON.stringify(n)));case 5:if(u=t.getAdapterType(a)){e.next=8;break}throw new Error("unknown data adapter type ".concat(a));case 8:if(c=u.configSchema.create(n,{pluginManager:t}),l=p.bind(null,t,r),d=u.AdapterClass,h=u.getAdapterClass,e.t0=d,e.t0){e.next=16;break}return e.next=15,h();case 15:e.t0=e.sent;case 16:if(y=e.t0){e.next=19;break}throw new Error("Failed to get adapter");case 19:v=new y(c,l,t),f[i]={dataAdapter:v,sessionIds:new Set([r])};case 21:return(m=f[i]).sessionIds.add(r),e.abrupt("return",m);case 24:case"end":return e.stop()}}),e)})),d=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))},d.apply(this,arguments)}t.getAdapter=p,t.freeAdapterResources=function(e){var t=0,r=Object.keys(e);if(1===r.length&&"sessionId"===r[0]){var n=e.sessionId;Object.entries(f).forEach((function(e){var r,o,a=(o=2,function(e){if(Array.isArray(e))return e}(r=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,o)||i(r,o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),u=a[0],c=a[1];c.sessionIds.delete(n),0===c.sessionIds.size&&(t+=1,delete f[u])}))}else Object.values(f).forEach((function(t){if(t.dataAdapter.freeResources){var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.regions||(e.region?[e.region]:[]));try{for(n.s();!(r=n.n()).done;){var o=r.value;void 0!==o.refName&&t.dataAdapter.freeResources(o)}}catch(e){n.e(e)}finally{n.f()}}else console.warn(t.dataAdapter,"does not implement freeResources")}));return t},t.clearAdapterCache=function(){f={}}},52432:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t,r){return t=l(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,c()?Reflect.construct(t,r||[],l(e).constructor):t.apply(e,r))}function c(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(c=function(){return!!e})()}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function s(e,t){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},s(e,t)}var f=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var p=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),r=u(this,t,[e]),"AdapterClass"in e)r.AdapterClass=e.AdapterClass,r.getAdapterClass=a(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.AdapterClass);case 1:case"end":return t.stop()}}),t)})));else{if(!("getAdapterClass"in e))throw new Error("no AdapterClass or getAdapterClass is defined for adapter type ".concat(r.name));r.getAdapterClass=e.getAdapterClass}return r.configSchema=e.configSchema,r.adapterCapabilities=e.adapterCapabilities||[],r.adapterMetadata=e.adapterMetadata,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&s(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(f(r(92413)).default);t.default=p},64900:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return t=a(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=o(this,t,[e])).ReactComponent=e.ReactComponent,r.stateModel=e.stateModel,!r.ReactComponent)throw new Error("no ReactComponent defined for view ".concat(r.name));if(!r.stateModel)throw new Error("no stateModel defined for view ".concat(r.name));return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(c(r(92413)).default);t.default=l},8931:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return t=a(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=o(this,t,[e])).stateModel=e.stateModel,r.configSchema=e.configSchema,r.description=e.description,r.url=e.url,r.configEditorComponent=e.configEditorComponent,!r.stateModel)throw new Error("no stateModel defined for connection ".concat(r.name));if(!r.configSchema)throw new Error("no configSchema defined for connection ".concat(r.name));return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(c(r(92413)).default);t.default=l},12765:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return t=a(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(r(92413)),s=r(37679),f=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=o(this,t,[e])).stateModel=e.stateModel,r.subDisplay=e.subDisplay,r.configSchema=e.configSchema,r.ReactComponent=e.ReactComponent,r.trackType=e.trackType,r.viewType=e.viewType,!r.stateModel)throw new Error("no stateModel defined for display ".concat(r.name));if(!r.configSchema)throw new Error("no configSchema provided for display ".concat(r.name));if(!r.ReactComponent)throw new Error("no ReactComponent provided for display ".concat(r.name));if(!r.trackType)throw new Error("no trackType provided for display ".concat(r.name));if(!r.viewType)throw new Error("no viewType provided for display ".concat(r.name));if(!(0,s.getDefaultValue)(r.configSchema).type){var n=r.configSchema?r.configSchema.name:"UNKNOWN";throw new Error("".concat(n," is not explicitlyTyped"))}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(l.default);t.default=f},17959:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t,r){return t=a(t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,i()?Reflect.construct(t,r||[],a(e).constructor):t.apply(e,r))}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function a(e){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},a(e)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}var c=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=c(r(92413)),s=r(37679),f=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=o(this,t,[e])).stateModel=e.stateModel,r.configSchema=e.configSchema,!r.stateModel)throw new Error("no stateModel defined for internet account type ".concat(r.name));if(!r.configSchema)throw new Error("no configSchema provided for internet account type ".concat(r.name));if(!(0,s.getDefaultValue)(r.configSchema).type){var n=r.configSchema?r.configSchema.name:"UNKNOWN";throw new Error("".concat(n," is not explicitlyTyped"))}return r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(l.default);t.default=f},92413:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e){return function(e){if(Array.isArray(e))return i(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{},o=e.pluggableConfigSchemaType("display"),i=(0,l.resolveIdentifier)(o,(0,l.getRoot)(t),r),a=e.getDisplayType(i.type);if(!a)throw new Error("unknown display type ".concat(i.type));var c=a.stateModel.create(u(u({},n),{},{type:i.type,configuration:i}));t.displays.push(c)},hideDisplay:function(r){var n=e.pluggableConfigSchemaType("display"),o=(0,l.resolveIdentifier)(n,(0,l.getRoot)(t),r),i=t.displays.filter((function(e){return e.configuration===o}));return(0,c.transaction)((function(){return i.forEach((function(e){return t.displays.remove(e)}))})),i.length},replaceDisplay:function(r,n){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t.displays.findIndex((function(e){return e.configuration.displayId===r}));if(-1===i)throw new Error("could not find display id ".concat(r," to replace"));var a=e.pluggableConfigSchemaType("display"),c=(0,l.resolveIdentifier)(a,(0,l.getRoot)(t),n);if(!e.getDisplayType(c.type))throw new Error("unknown display type ".concat(c.type));t.displays.splice(i,1,u(u({},o),{},{type:c.type,configuration:c}))}}})).views((function(t){return{trackMenuItems:function(){var r=t.displays.flatMap((function(e){return e.trackMenuItems()})),n=t.displays[0].configuration.displayId,i=h(t);return[].concat(o(r),o(i.length>1?[{type:"subMenu",label:"Display types",subMenu:i.map((function(r){return{type:"radio",label:e.getDisplayType(r.type).displayName,checked:r.displayId===n,onClick:function(){return t.replaceDisplay(n,r.displayId)}}}))}]:[]))}}}))}},47963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseViewModelWithDisplayedRegions=void 0;var n=r(72731),o=r(20191),i=r(20191),a=n.types.model("BaseView",{id:o.ElementId,displayName:n.types.maybe(n.types.string),minimized:!1}).volatile((function(){return{width:800}})).views((function(){return{menuItems:function(){return[]}}})).actions((function(e){return{setDisplayName:function(t){e.displayName=t},setWidth:function(t){e.width=t},setMinimized:function(t){e.minimized=t}}}));t.default=a,t.BaseViewModelWithDisplayedRegions=a.props({displayedRegions:n.types.array(i.Region)})},6785:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))}}Object.defineProperty(t,"__esModule",{value:!0}),t.InternetAccount=void 0;var s=r(72731),f=r(54133),p=r(87882),d=r(20191),h=r(71827),y="undefined"==typeof sessionStorage;t.InternetAccount=s.types.model("InternetAccount",{id:d.ElementId,type:s.types.string,configuration:(0,f.ConfigurationReference)(h.BaseInternetAccountConfig)}).views((function(e){return{get name(){return(0,f.getConf)(e,"name")},get description(){return(0,f.getConf)(e,"description")},get internetAccountId(){return(0,f.getConf)(e,"internetAccountId")},get authHeader(){return(0,f.getConf)(e,"authHeader")},get tokenType(){return(0,f.getConf)(e,"tokenType")},get domains(){return(0,f.getConf)(e,"domains")},get toggleContents(){return null},get SelectorComponent(){},get selectorLabel(){}}})).views((function(e){return{handlesLocation:function(t){return e.domains.some((function(e){return null==t?void 0:t.uri.includes(e)}))},get tokenKey(){return"".concat(e.internetAccountId,"-token")}}})).actions((function(e){return{getTokenFromUser:function(e,t){throw new Error("getTokenFromUser must be implemented by extending model")},storeToken:function(t){sessionStorage.setItem(e.tokenKey,t)},removeToken:function(){sessionStorage.removeItem(e.tokenKey)},retrieveToken:function(){return sessionStorage.getItem(e.tokenKey)},validateToken:function(e,t){return l(u().mark((function t(){return u().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e);case 1:case"end":return t.stop()}}),t)})))()}}})).actions((function(e){var t=void 0;return{getToken:function(r){return l(u().mark((function n(){var o,i,a;return u().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t){n.next=2;break}return n.abrupt("return",t);case 2:if(!(a=null===(i=null===(o=null==r?void 0:r.internetAccountPreAuthorization)||void 0===o?void 0:o.authInfo)||void 0===i?void 0:i.token)){n.next=6;break}return t=Promise.resolve(a),n.abrupt("return",t);case 6:if(!y){n.next=8;break}throw new Error("Did not get internet account pre-authorization info in worker");case 8:if(!(a=e.retrieveToken())){n.next=12;break}return t=Promise.resolve(a),n.abrupt("return",t);case 12:return t=new Promise((function(t,r){return e.getTokenFromUser((function(r){e.storeToken(r),t(r)}),(function(t){e.removeToken(),r(t)}))})),n.abrupt("return",t);case 14:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){return{addAuthHeaderToInit:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0;return i(i({},t),{},{headers:new Headers(i(i({},t.headers),{},a({},e.authHeader,e.tokenType?"".concat(e.tokenType," ").concat(r):r)))})},getPreAuthorizationInformation:function(t){return l(u().mark((function r(){var n,o;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return n=r.sent,r.prev=3,r.next=6,e.validateToken(n,t);case 6:o=r.sent,r.next=13;break;case 9:throw r.prev=9,r.t0=r.catch(3),e.removeToken(),r.t0;case 13:return r.abrupt("return",{internetAccountType:e.type,authInfo:{token:o,configuration:(0,f.getConf)(e)}});case 14:case"end":return r.stop()}}),r,null,[[3,9]])})))()}}})).actions((function(e){return{getFetcher:function(t){return function(){var r=l(u().mark((function r(n,o){var i,a;return u().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getToken(t);case 2:return i=r.sent,a=e.addAuthHeaderToInit(o,i),r.abrupt("return",fetch(n,a));case 5:case"end":return r.stop()}}),r)})));return function(e,t){return r.apply(this,arguments)}}()}}})).actions((function(e){return{openLocation:function(t){return new p.RemoteFileWithRangeCache(t.uri,{fetch:e.getFetcher(t)})}}}))},70963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(54133).ConfigurationSchema)("BaseConnection",{name:{type:"string",defaultValue:"nameOfConnection",description:"a unique name for this connection"},assemblyNames:{type:"stringArray",defaultValue:[],description:"optional list of names of assemblies in this connection"}},{explicitlyTyped:!0,explicitIdentifier:"connectionId"});t.default=n},71827:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseInternetAccountConfig=void 0;var n=r(54133);t.BaseInternetAccountConfig=(0,n.ConfigurationSchema)("InternetAccount",{name:{description:"descriptive name of the internet account",type:"string",defaultValue:""},description:{description:"a description of the internet account",type:"string",defaultValue:""},authHeader:{description:"request header for credentials",type:"string",defaultValue:"Authorization"},tokenType:{description:"a custom name for a token to include in the header",type:"string",defaultValue:""},domains:{description:"array of valid domains the url can contain to use this account",type:"stringArray",defaultValue:[]}},{explicitIdentifier:"internetAccountId",explicitlyTyped:!0})},9292:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):i(i({},e),{},{features:r,blockKey:"circularChord",reactElement:d.default.createElement(v.default,i(i(i({},t),e),{},{features:r,RenderingComponent:this.ReactComponent}))})}}])&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(y.default);t.default=m},96350:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),u=(0,s.useRef)(null),c=(0,s.useRef)(),l=(0,y.getRoot)(e.displayModel).hydrateFn;return(0,s.useEffect)((function(){var e=(0,p.rIC)((function(){var e;if(u.current){var t=(0,h.createJBrowseTheme)(r);c.current=null!==(e=c.current)&&void 0!==e?e:l(u.current,s.default.createElement(d.ThemeProvider,{theme:t},s.default.createElement(n,a({},i))))}}));return function(){clearTimeout(e);var t=c.current;c.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[t,n,l,r,e,i]),s.default.createElement("g",{ref:u,dangerouslySetInnerHTML:{__html:t}})})),b=(0,f.observer)((function(e){var t=e.html,r=e.RenderingComponent,n=(0,s.useRef)(null);return(0,s.useEffect)((function(){var o=n.current;return o&&t&&(o.innerHTML&&(0,v.unmountComponentAtNode)(o),o.style.outline="none",o.innerHTML=t,(0,p.rIC)((function(){(0,v.hydrate)(s.default.createElement(r,a({},e)),o)}))),function(){o&&(0,v.unmountComponentAtNode)(o)}}),[t,r,e]),s.default.createElement("g",{ref:n})})),g=(0,f.observer)((function(e){return(0,y.getRoot)(e.displayModel).hydrateFn?s.default.createElement(m,a({},e)):s.default.createElement(b,a({},e))}));t.default=g},90838:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["theme","html","RenderingComponent"],i=["theme","html","RenderingComponent"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return s(t,e),t};Object.defineProperty(t,"__esModule",{value:!0});var p=f(r(41486)),d=r(29350),h=r(87931),y=r(46186),v=r(72731),m=r(61418),b=r(57525),g=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,i=c(e,o),a=(0,p.useRef)(null),l=(0,p.useRef)(),s=(0,v.getRoot)(i.displayModel).hydrateFn;return(0,p.useEffect)((function(){var e=(0,b.rIC)((function(){var e;if(a.current){var r=(0,h.createJBrowseTheme)(t);l.current=null!==(e=l.current)&&void 0!==e?e:s(a.current,p.default.createElement(d.ThemeProvider,{theme:r},p.default.createElement(n,u({},i))))}}));return function(){clearTimeout(e);var t=l.current;l.current=void 0,setTimeout((function(){null==t||t.unmount()}))}}),[r,t,i,s,n]),p.default.createElement("div",{ref:a,dangerouslySetInnerHTML:{__html:r}})})),w=(0,y.observer)((function(e){var t=e.theme,r=e.html,n=e.RenderingComponent,o=c(e,i),a=(0,p.useRef)(null),l=(0,h.createJBrowseTheme)(t);return(0,p.useEffect)((function(){var e=a.current;return e&&(e&&(0,m.unmountComponentAtNode)(e),e.innerHTML=r,(0,b.rIC)((function(){(0,m.hydrate)(p.default.createElement(d.ThemeProvider,{theme:l},p.default.createElement(n,u({},o))),e)}))),function(){e&&(0,m.unmountComponentAtNode)(e)}}),[r,l,o,n]),p.default.createElement("div",{ref:a})})),S=(0,y.observer)((function(e){return(0,v.getRoot)(e.displayModel).hydrateFn?p.default.createElement(g,u({},e)):p.default.createElement(w,u({},e))}));t.default=S},39269:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;tSVG export not supported for this track'}):c(c({},e),{},{reactElement:v.default.createElement(O.default,c(c(c({},t),e),{},{RenderingComponent:this.ReactComponent}))})}},{key:"deserializeArgsInWorker",value:function(e){var t=c({},e);return t.config=this.configSchema.create(e.config||{},{pluginManager:this.pluginManager}),t.filters=new S.default({filters:e.filters}),t}},{key:"serializeResultsInWorker",value:function(e,t){var r=(0,b.renderToString)(v.default.createElement(m.ThemeProvider,{theme:(0,A.createJBrowseTheme)(t.theme)},e.reactElement));return delete e.reactElement,c(c({},e),{},{html:r})}},{key:"renderInClient",value:(s=a(o().mark((function e(t,r){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.call(r.sessionId,"CoreRender",r);case 2:if(!("canvasRecordedData"in(n=e.sent))){e.next=8;break}return e.next=6,(0,w.getSerializedSvg)(n);case 6:n.html=e.sent,delete n.reactElement;case 8:return e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),function(e,t){return s.apply(this,arguments)})},{key:"renderInWorker",value:(u=a(o().mark((function e(t){var r,n,i,a,u,c=this;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.signal,n=t.statusCallback,i=void 0===n?function(){}:n,a=this.deserializeArgsInWorker(t),e.next=4,(0,w.updateStatus)("Rendering plot",i,(function(){return c.render(a)}));case 4:return u=e.sent,(0,w.checkAbortSignal)(r),e.abrupt("return",(0,w.updateStatus)("Serializing results",i,(function(){return c.serializeResultsInWorker(u,a)})));case 7:case"end":return e.stop()}}),e,this)}))),function(e){return u.apply(this,arguments)})},{key:"freeResourcesInClient",value:(i=a(o().mark((function e(t,r){var n,i,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.serializeArgsInClient(r),i=this.freeResources(),e.next=4,t.call(r.sessionId,"CoreFreeResources",n);case 4:return a=e.sent,e.abrupt("return",i+a);case 6:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})}],n&&l(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(x.default);t.default=E},47920:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ServerSideRendererType=t.ServerSideRenderedContent=t.FeatureRendererType=t.RendererType=t.CircularChordRendererType=t.ComparativeServerSideRendererType=t.BoxRendererType=void 0;var o=r(64986);Object.defineProperty(t,"BoxRendererType",{enumerable:!0,get:function(){return n(o).default}});var i=r(96350);Object.defineProperty(t,"ComparativeServerSideRendererType",{enumerable:!0,get:function(){return n(i).default}});var a=r(55570);Object.defineProperty(t,"CircularChordRendererType",{enumerable:!0,get:function(){return n(a).default}});var u=r(10465);Object.defineProperty(t,"RendererType",{enumerable:!0,get:function(){return n(u).default}});var c=r(80857);Object.defineProperty(t,"FeatureRendererType",{enumerable:!0,get:function(){return n(c).default}});var l=r(90838);Object.defineProperty(t,"ServerSideRenderedContent",{enumerable:!0,get:function(){return n(l).default}});var s=r(39269);Object.defineProperty(t,"ServerSideRendererType",{enumerable:!0,get:function(){return n(s).default}})},72603:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.filterChain);try{for(t.s();!(e=t.n()).done;)if(!e.value.expr.evalSync({feature:arguments.length<=0?void 0:arguments[0]}))return!1}catch(e){t.e(e)}finally{t.f()}return!0}},{key:"toJSON",value:function(){return{filters:this.filterChain.map((function(e){return e.string}))}}}],n=[{key:"fromJSON",value:function(t){return new e(t)}}],r&&i(t.prototype,r),n&&i(t,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},76226:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var r=0;r4&&void 0!==g[4]?g[4]:{},r){e.next=3;break}throw new TypeError("sessionId is required");case 3:return c=!1,e.next=6,this.getWorker(r);case 6:return l=e.sent,s=t.evaluateExtensionPoint("Core-extendWorker",l),f=t.getRpcMethodType(n),e.next=11,f.serializeArguments(i,this.name);case 11:return p=e.sent,d=this.filterArgs(p,r),h=s.call(n,d,o({timeout:3e5,statusCallback:i.statusCallback,rpcDriverClassName:this.name},a)).finally((function(){c=!0})),v=new Promise((function(e,t){y=setInterval((function(){"killed"===s.status?t(new Error("operation timed out, worker process stopped responding, ".concat(s.error))):c&&e(!0)}),b.workerCheckFrequency)})).finally((function(){clearInterval(y)})),m=Promise.race([h,v]),e.abrupt("return",f.deserializeReturn(m,i,this.name));case 17:case"end":return e.stop()}}),e,this)}))),function(e,r,n,o){return t.apply(this,arguments)})}]),e}();t.default=A},48530:function(e,t,r){"use strict";function n(e,t,r){return t=i(t),function(e,t){if(t&&("object"===u(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function l(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function s(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,u,"next",e)}function u(e){l(i,n,o,a,u,"throw",e)}a(void 0)}))}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function c(e){for(var t=1;t3&&void 0!==u[3]?u[3]:{},t){e.next=3;break}throw new Error("sessionId is required");case 3:return e.next=5,this.getDriverForCall(t,r,n);case 5:return a=e.sent,e.abrupt("return",a.call(this.pluginManager,t,r,n,i));case 7:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&l(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}());v.configSchema=d.default,t.default=v},37455:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=(0,r(54133).ConfigurationSchema)("BaseRpcDriver",{workerCount:{type:"number",description:"The number of workers to use. If 0 (the default) JBrowse will decide how many workers to use.",defaultValue:0}},{explicitlyTyped:!0});t.default=n},88415:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(72731),i=r(54133),a=n(r(66047)),u=n(r(56970));t.default=(0,i.ConfigurationSchema)("RpcOptions",{defaultDriver:{type:"string",description:"the RPC driver to use for tracks and tasks that are not configured to use a specific RPC backend",defaultValue:"MainThreadRpcDriver"},drivers:o.types.optional(o.types.map(o.types.union(u.default,a.default)),{MainThreadRpcDriver:{type:"MainThreadRpcDriver"},WebWorkerRpcDriver:{type:"WebWorkerRpcDriver"}})},{actions:function(e){return{addDriverConfig:function(t,r){e.drivers.set(t,r)}}}})},65706:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.CoreGetFeatureDensityStats=t.CoreFreeResources=t.CoreRender=t.CoreGetFeatures=t.CoreGetFileInfo=t.CoreGetMetadata=t.CoreGetFeatureDetails=t.CoreGetRefNames=void 0;var o=r(43175);Object.defineProperty(t,"CoreGetRefNames",{enumerable:!0,get:function(){return n(o).default}});var i=r(6368);Object.defineProperty(t,"CoreGetFeatureDetails",{enumerable:!0,get:function(){return n(i).default}});var a=r(87629);Object.defineProperty(t,"CoreGetMetadata",{enumerable:!0,get:function(){return n(a).default}});var u=r(27154);Object.defineProperty(t,"CoreGetFileInfo",{enumerable:!0,get:function(){return n(u).default}});var c=r(38615);Object.defineProperty(t,"CoreGetFeatures",{enumerable:!0,get:function(){return n(c).default}});var l=r(28342);Object.defineProperty(t,"CoreRender",{enumerable:!0,get:function(){return n(l).default}});var s=r(85131);Object.defineProperty(t,"CoreFreeResources",{enumerable:!0,get:function(){return n(s).default}});var f=r(23995);Object.defineProperty(t,"CoreGetFeatureDensityStats",{enumerable:!0,get:function(){return n(f).default}})},56970:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(54133),i=n(r(54138)),a=(0,o.ConfigurationSchema)("MainThreadRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},85131:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){for(var r=0;r=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}function u(e,t){for(var r=0;r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.remoteAbortRpcHandler=t.remoteAbort=t.deserializeAbortSignal=t.isRemoteAbortSignal=t.serializeAbortSignal=void 0;var n=0,o=new WeakMap;t.serializeAbortSignal=function(e,t){var r=o.get(e);return r||(n+=1,o.set(e,n),r=n,e.addEventListener("abort",(function(){var r=o.get(e);void 0!==r&&t("signalAbort",r)}))),{abortSignalId:r}},t.isRemoteAbortSignal=function(e){return"object"===r(e)&&null!==e&&"abortSignalId"in e&&"number"==typeof e.abortSignalId};var i=new Map;function a(e){var t=e.signalId,r=i.get(t);r&&r.abort()}t.deserializeAbortSignal=function(e){var t=e.abortSignalId,r=i.get(t);return r||(r=new AbortController,i.set(t,r)),r.signal},t.remoteAbort=a,t.remoteAbortRpcHandler=function(){return{signalAbort:a}}},66047:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=r(54133),i=n(r(54138)),a=(0,o.ConfigurationSchema)("WebWorkerRpcDriver",{},{baseConfiguration:i.default,explicitlyTyped:!0});t.default=a},10994:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e,t,r){var o;return o=function(e,t){if("object"!=n(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t),(t="symbol"==n(o)?o:String(o))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var d=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),h=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),y=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&d(t,e,r);return h(t,e),t},v=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var m=y(r(41486)),b=r(31050),g=r(57372),w=r(25043),S=v(r(4310)),A=v(r(87645)),x=m.default.createContext({parentPopupState:null,rootPopupState:null});function O(e){var t=e.onClick,r=e.closeAfterItemClick,n=p(e,o),i=(0,m.useContext)(x).rootPopupState;if(!i)throw new Error("must be used inside a CascadingMenu");return m.default.createElement(b.MenuItem,f(f({},n),{},{onClick:function(e){r&&i.close(),null==t||t(e)}}))}function E(e){var t=e.title,r=e.Icon,n=e.inset,o=e.popupId,a=p(e,i),u=(0,m.useContext)(x).parentPopupState,c=(0,w.usePopupState)({popupId:o,variant:"popover",parentPopupState:u});return m.default.createElement(m.default.Fragment,null,m.default.createElement(b.MenuItem,f(f({},(0,w.bindHover)(c)),(0,w.bindFocus)(c)),r?m.default.createElement(b.ListItemIcon,null,m.default.createElement(r,null)):null,m.default.createElement(b.ListItemText,{primary:t,inset:n}),m.default.createElement(A.default,null)),m.default.createElement(j,f(f({},a),{},{anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"left"},popupState:c})))}function j(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,e.classes,p(e,a)),n=(0,m.useContext)(x).rootPopupState,o=(0,m.useMemo)((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return m.default.createElement(x.Provider,{value:o},m.default.createElement(S.default,f(f({},r),(0,w.bindMenu)(t))))}function P(e){var t=e.popupState,r=(e.onMenuItemClick,e.menuItems,p(e,u)),n=(0,m.useContext)(x).rootPopupState,o=(0,m.useMemo)((function(){return{rootPopupState:n||t,parentPopupState:t}}),[n,t]);return m.default.createElement(x.Provider,{value:o},m.default.createElement(b.Menu,f(f({},r),(0,w.bindMenu)(t))))}function k(e){var t=e.item;return"subMenu"in t?m.default.createElement(g.MenuItemEndDecoration,{type:"subMenu"}):"checkbox"===t.type||"radio"===t.type?m.default.createElement(g.MenuItemEndDecoration,{type:t.type,checked:t.checked,disabled:t.disabled}):null}function C(e){var t=e.onMenuItemClick,r=e.closeAfterItemClick,n=e.menuItems,o=p(e,c),i=n.some((function(e){return"icon"in e&&e.icon}));return m.default.createElement(m.default.Fragment,null,n.map((function(e,n){return"subMenu"in e?m.default.createElement(E,{key:"subMenu-".concat(e.label,"-").concat(n),popupId:"subMenu-".concat(e.label),title:e.label,Icon:e.icon,inset:i&&!e.icon,onMenuItemClick:t,menuItems:e.subMenu},m.default.createElement(C,f(f({},o),{},{closeAfterItemClick:r,onMenuItemClick:t,menuItems:e.subMenu}))):"divider"===e.type?m.default.createElement(b.Divider,{key:"divider-".concat(n),component:"li"}):"subHeader"===e.type?m.default.createElement(b.ListSubheader,{key:"subHeader-".concat(e.label,"-").concat(n)},e.label):m.default.createElement(O,{key:"".concat(e.label,"-").concat(n),closeAfterItemClick:r,onClick:"onClick"in e?(a=e.onClick,function(e){t(e,a)}):void 0,disabled:Boolean(e.disabled)},e.icon?m.default.createElement(b.ListItemIcon,null,m.default.createElement(e.icon,null)):null," ",m.default.createElement(b.ListItemText,{primary:e.label,secondary:e.subLabel,inset:i&&!e.icon}),m.default.createElement("div",{style:{flexGrow:1,minWidth:10}}),m.default.createElement(k,{item:e}));var a})))}t.default=function(e){var t=e.closeAfterItemClick,r=void 0===t||t,n=p(e,l);return m.default.createElement(P,f({},n),m.default.createElement(C,f(f({},n),{},{closeAfterItemClick:r})))}},51957:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["children","menuItems","closeAfterItemClick","stopPropagation","setOpen","onClick"],i=["onClick","onTouchStart"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),s=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),f=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&l(t,e,r);return s(t,e),t},p=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var d=f(r(41486)),h=p(r(21461)),y=r(31050),v=r(46186),m=r(25043),b=(0,v.observer)((function(e){var t=e.children,r=e.menuItems,n=e.closeAfterItemClick,a=void 0===n||n,l=e.stopPropagation,s=e.setOpen,f=e.onClick,p=c(e,o),v=(0,m.usePopupState)({popupId:"viewMenu",variant:"popover"}),b=(0,m.bindTrigger)(v),g=b.onClick,w=b.onTouchStart,S=c(b,i),A=v.isOpen;return(0,d.useEffect)((function(){null==s||s(A)}),[A,s]),d.default.createElement(d.default.Fragment,null,d.default.createElement(y.IconButton,u(u(u({onClick:function(e){l&&e.stopPropagation(),g(e),null==f||f()},onTouchStart:function(e){l&&e.stopPropagation(),w(e),null==f||f()}},S),p),{},{disabled:0===r.length}),t),d.default.createElement(h.default,u(u({},(0,m.bindPopover)(v)),{},{onMenuItemClick:function(e,t){return t()},menuItems:r,closeAfterItemClick:a,popupState:v})))}));t.default=b},53486:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),l=u((0,v.default)(),2),s=l[0],f=l[1].width,p=u((0,d.useState)(),2),y=p[0],b=p[1],g=u((0,d.useState)(null),2),w=g[0],S=g[1],A=u((0,d.useState)(!1),2),x=A[0],O=A[1];(0,d.useEffect)((function(){x&&(null==w||w.blur(),O(!1))}),[x,w]);var E=m(e,{props:e}).classes,j=(0,h.useTheme)(),P=void 0===y?r:y;return d.default.createElement("div",a(a({},c),{},{ref:t}),d.default.createElement("div",{style:{position:"relative"}},d.default.createElement(h.Typography,{ref:s,component:"span",variant:i,className:E.typography},P)),d.default.createElement(h.InputBase,{inputRef:function(e){return S(e)},className:E.inputBase,inputProps:{style:a({width:f},i&&"inherit"!==i?j.typography[i]:{})},classes:{input:E.input,root:E.inputRoot,focused:E.inputFocused},value:P,onChange:function(e){return b(e.target.value)},onKeyDown:function(e){"Enter"===e.key?null==w||w.blur():"Escape"===e.key&&(b(void 0),O(!0))},onBlur:function(){n(y||r||""),b(void 0)}}))}));t.default=b},15390:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function i(){i=function(){return t};var e,t={},r=Object.prototype,o=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&o.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1e4?S.slice(0,1e4)+"...":S,o||"No stack trace available",window.JBrowseSession?"JBrowse ".concat(window.JBrowseSession.version):""].join("\n"),E=encodeURIComponent("I got this error from JBrowse, here is the stack trace:\n\n```\n"+x+"\n```\n"),j="https://github.com/GMOD/jbrowse-components/issues/new?labels=bug&title=JBrowse+issue&body=".concat(E),P="mailto:jbrowse2dev@gmail.com?subject=JBrowse%202%20error&body=".concat(E);return y.default.createElement(g.default,{open:!0,onClose:r,title:"Stack trace",maxWidth:"xl"},y.default.createElement(v.DialogContent,null,void 0===o?y.default.createElement(w.default,{variant:"h6"}):y.default.createElement(y.default.Fragment,null,y.default.createElement(v.Typography,null,"Post a new issue at"," ",y.default.createElement(v.Link,{href:j,target:"_blank"},"GitHub")," ","or send an email to"," ",y.default.createElement(v.Link,{href:P,target:"_blank"},"jbrowse2dev@gmail.com")," "),y.default.createElement("pre",{style:{background:"lightgrey",border:"1px solid black",overflow:"auto",margin:20,maxHeight:300}},x))),y.default.createElement(v.DialogActions,null,y.default.createElement(v.Button,{variant:"contained",color:"secondary",onClick:function(){(0,b.default)(x),h(!0),setTimeout((function(){return h(!1)}),1e3)}},d?"Copied!":"Copy stack trace to clipboard"),y.default.createElement(v.Button,{variant:"contained",color:"primary",onClick:r},"Close")))}},47246:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(31050),a=n(r(57991));t.default=function(e){var t=e.onClose,r=e.open,n=e.onFactoryReset;function u(e){"reset"===e&&n(),t()}return o.default.createElement(a.default,{title:"Reset",onClose:function(){return u()},open:r},o.default.createElement(i.DialogContent,null,o.default.createElement(i.DialogContentText,null,"Are you sure you want to reset? This will restore the default configuration.")),o.default.createElement(i.DialogActions,null,o.default.createElement(i.Button,{onClick:function(){return u()},color:"primary"},"Cancel"),o.default.createElement(i.Button,{onClick:function(){return u("reset")},color:"primary",variant:"contained"},"OK")))}},86051:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return y.default.createElement(m.Tooltip,{title:t||""},y.default.createElement(m.ToggleButton,s({},n),r))}function O(e,t){return"string"==typeof e&&e.length>t?"".concat(e.slice(0,Math.max(0,t)),"…"):e}var E=(0,v.observer)((function(e){var t=e.location,r=e.name,n=e.description,o=e.rootModel,u=e.setLocation,c=!t||(0,b.isUriLocation)(t)?"url":"file",l=a((0,y.useState)(t&&"internetAccountId"in t&&t.internetAccountId?t.internetAccountId:c),2),f=l[0],p=l[1],d=(0,b.isAppRootModel)(o)?o.internetAccounts.filter((function(e){return"HTTPBasicInternetAccount"!==e.type})):[],h=a((0,S.useLocalStorage)("fileSelector-recentlyUsedInternetAccounts",[]),2),v=h[0],E=h[1],j=Object.fromEntries(d.map((function(e){return[e.internetAccountId,e]}))),P=i(new Set(d.map((function(e){return e.internetAccountId})))).sort((function(e,t){return v.indexOf(e)-v.indexOf(t)})),k=P.slice(0,2),C=P.slice(2),_=a((0,y.useState)(null),2),L=_[0],T=_[1],I=j[f],M=(0,y.useCallback)((function(e){u(s(s({},e),(0,b.isUriLocation)(e)?{internetAccountId:null==I?void 0:I.internetAccountId}:{}))}),[u,I]);(0,y.useEffect)((function(){I&&(0,b.isUriLocation)(t)&&t.internetAccountId!==I.internetAccountId&&M(t)}),[t,I,M]);var R=y.default.createElement(w.default,s(s({},e),{},{setLocation:M,label:null==I?void 0:I.selectorLabel}));if("file"===f&&(R=y.default.createElement(g.default,s({},e))),null==I?void 0:I.SelectorComponent){var N=I.SelectorComponent;R=y.default.createElement(N,s(s({},e),{},{setLocation:M}))}return y.default.createElement(y.default.Fragment,null,y.default.createElement(m.Box,{display:"flex"},y.default.createElement(m.InputLabel,{shrink:!0},r)),y.default.createElement(m.Box,{display:"flex",flexDirection:"row"},y.default.createElement(m.Box,null,y.default.createElement(m.ToggleButtonGroup,{value:f,exclusive:!0,onChange:function(e,r){E(i(new Set([r].concat(i(v)).filter(S.notEmpty)))),r&&p(r),(0,b.isUriLocation)(t)&&M(t)},"aria-label":"file, url, or account picker"},new URLSearchParams(window.location.search).get("adminKey")?null:y.default.createElement(m.ToggleButton,{value:"file","aria-label":"local file"},"File"),y.default.createElement(m.ToggleButton,{value:"url","aria-label":"url"},"URL"),k.map((function(e){var t=j[e],r=t.internetAccountId,n=t.name,o=t.toggleContents;return y.default.createElement(x,{key:e,value:r,title:n},"string"==typeof o?O(o,5):o||O(n,5))})),C.length>0?y.default.createElement(m.ToggleButton,{onClick:function(e){return T(e.target)},selected:!1},"More",y.default.createElement(A.default,null)):null),y.default.createElement(m.Menu,{open:Boolean(L),anchorEl:L,onClose:function(){return T(null)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},null==C?void 0:C.map((function(e){var t=j[e],r=t.internetAccountId,n=t.name;return y.default.createElement(m.MenuItem,{key:e,value:r,onClick:function(){E(i(new Set([r].concat(i(v)).filter(S.notEmpty)))),p(r),T(null)}},n)}))))),R,y.default.createElement(m.FormHelperText,null,n))}));t.default=E},18597:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(31050),a=r(3024),u=r(57525),c=r(6197);function l(e){return"blobId"in e}var s=(0,a.makeStyles)()((function(e){return{filename:{marginLeft:e.spacing(1)}}}));t.default=function(e){var t=e.location,r=e.setLocation,n=s().classes,a=t&&(l(t)&&t.name||function(e){return"localPath"in e}(t)&&t.localPath),f=t&&l(t)&&!(0,c.getBlob)(t.blobId);return o.default.createElement(i.Box,{display:"flex",flexDirection:"row",alignItems:"center"},o.default.createElement(i.Box,null,o.default.createElement(i.FormControl,{fullWidth:!0},o.default.createElement(i.Button,{variant:"outlined",component:"label"},"Choose File",o.default.createElement("input",{type:"file",hidden:!0,onChange:function(e){var t,n=e.target,o=null===(t=null==n?void 0:n.files)||void 0===t?void 0:t[0];o&&(u.isElectron?r({localPath:o.path,locationType:"LocalPathLocation"}):r((0,c.storeBlobLocation)({blob:o})))}})))),o.default.createElement(i.Box,null,o.default.createElement(i.Typography,{component:"span",className:n.filename,color:a?"initial":"textSecondary"},a||"No file chosen"),f?o.default.createElement(i.Typography,{color:"error"},"(need to reload)"):null))}},37945:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var o=n(r(41486)),i=r(31050),a=r(46186),u=r(35795),c=(0,a.observer)((function(e){var t=e.location,r=e.setLocation,n=e.label;return o.default.createElement(i.TextField,{fullWidth:!0,variant:"outlined",inputProps:{"data-testid":"urlInput"},defaultValue:t&&(0,u.isUriLocation)(t)?t.uri:"",label:n||"Enter URL",onChange:function(e){r({uri:e.target.value.trim(),locationType:"UriLocation"})}})}));t.default=c},68343:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(70876);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n(o).default}})},41169:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,i),a=y().classes;return f.default.createElement(p.Typography,u(u({className:a.dots},o),{},{variant:n}),"".concat(t||"Loading"))}},87196:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.LogoFull=t.Logomark=void 0;var o=n(r(41486));function i(e){return"black"===e?{midnight:"#808080",forrest:"#666666",grape:"#4d4d4d",mandarin:"#333333",gray:"#1a1a1a"}:"white"===e?{midnight:"#ffffff",forrest:"#e6e6e6",grape:"#cccccc",mandarin:"#b3b3b3",gray:"#999999"}:{midnight:"#0d233f",forrest:"#135560",grape:"#721e63",mandarin:"#ffb11d",gray:"#dadada"}}function a(e){var t=i(e.variant);return o.default.createElement(o.default.Fragment,null,o.default.createElement("path",{style:{fill:t.midnight},d:"M120.5,57.5c.168,0,.333.012.5.013V40.506c-.167,0-.333-.006-.5-.006a98.325,98.325,0,0,0-77.4,37.565q-2.664,3.378-5.023,6.994l14.206,9.327Q54.043,91.709,56,89.179A81.363,81.363,0,0,1,120.5,57.5Z"}),o.default.createElement("path",{style:{fill:t.forrest},d:"M148.668,86.223c.308.133.6.283.908.42l6.746-15.618c-.153-.067-.3-.143-.454-.21a81.36,81.36,0,0,0-71.777,3.5q-2.8,1.544-5.469,3.309l9.249,14.054A63.93,63.93,0,0,1,148.668,86.223Z"}),o.default.createElement("path",{style:{fill:t.grape},d:"M170.894,109.37A63.929,63.929,0,0,0,113.4,88.861l2.336,15.474a48.456,48.456,0,0,1,44.322,15.42c.111.125.214.255.324.381l11.16-10C171.323,109.879,171.118,109.62,170.894,109.37Z"}),o.default.createElement("path",{style:{fill:t.mandarin},d:"M150.921,150.314c.04.163.07.326.107.489l16.509-4.058c-.039-.163-.067-.326-.107-.489A48.457,48.457,0,0,0,135.575,111.8l-5.515,15.591A32.466,32.466,0,0,1,150.921,150.314Z"}),o.default.createElement("path",{style:{fill:t.gray},d:"M134.1,138.129l-9.779,13.213a32.486,32.486,0,0,1,7.823,14.463l15.147.852c.012-.166.032-.331.041-.5A32.464,32.464,0,0,0,134.1,138.129Z"}))}function u(e){var t=i(e.variant);return o.default.createElement("g",{"aria-label":"JBrowse",transform:"translate(213.084 144.241)",style:{fill:t.midnight}},o.default.createElement("path",{d:"m 26.355,-71.505 v 54.075 2.835 q 0,6.825 -0.42,10.185 -0.735,5.67 -2.835,9.135 -3.255,5.355 -8.505,8.4 -4.83,2.73 -11.55,3.57 L 1.47,11.76 Q 7.35,10.185 9.24,4.2 10.605,-0.105 10.605,-9.975 v -5.565 -55.965 q 1.785,0 4.62,0.315 2.835,0.21 3.255,0.21 1.785,0 2.94,-0.105 4.515,-0.42 4.935,-0.42 z"}),o.default.createElement("path",{d:"m 60.68836,-65.415 v 24.78 h 3.255 q 2.94,0 4.935,-0.525 2.1,-0.525 3.885,-2.1 2.31,-1.995 3.36,-4.83 1.155,-2.835 1.155,-6.09 0,-5.565 -2.94,-8.61 -2.94,-3.045 -8.295,-3.045 -2.52,0 -5.355,0.42 z m 0,30.87 V -6.09 h 5.25 q 4.725,0 8.505,-3.675 3.885,-3.78 3.885,-10.08 0,-8.19 -4.62,-11.655 -4.095,-3.045 -13.02,-3.045 z M 44.93836,0 v -71.505 h 27.09 q 9.135,0 14.385,3.255 6.51,3.99 6.51,12.6 0,7.035 -5.25,11.655 -4.62,4.095 -11.97,5.145 v 0.945 q 7.56,0.735 12.285,3.99 6.615,4.62 6.615,13.335 0,10.185 -7.98,15.75 -6.93,4.83 -17.43,4.83 z"}),o.default.createElement("path",{d:"M 109.44281,0.525 V -50.4 q 1.785,0.21 3.99,0.42 2.31,0.105 3.255,0.105 2.31,0 4.2,-0.21 1.89,-0.21 3.045,-0.315 v 13.02 q 1.89,-6.51 5.46,-9.87 4.41,-4.095 11.655,-4.095 -0.315,2.73 -0.42,6.825 -0.105,3.99 -0.105,7.455 l -0.945,0.84 q -0.945,-0.735 -2.415,-1.05 -1.47,-0.315 -2.94,-0.315 -3.57,0 -6.195,1.89 -2.52,1.785 -3.465,5.04 -0.42,1.155 -0.525,3.15 -0.105,1.89 -0.105,4.515 v 4.515 19.005 q -1.785,-0.21 -2.625,-0.21 -3.675,-0.315 -4.62,-0.315 -2.31,0 -4.2,0.21 -1.89,0.21 -3.045,0.315 z"}),o.default.createElement("path",{d:"m 173.77337,1.47 q -11.655,0 -18.585,-6.825 -6.93,-6.825 -6.93,-18.48 0,-12.6 6.72,-20.055 6.825,-7.455 18.9,-7.455 11.97,0 18.9,6.72 6.93,6.72 6.93,18.48 0,12.285 -6.72,19.74 -7.14,7.875 -19.215,7.875 z m 0.735,-48.09 q -5.88,0 -8.505,6.51 -2.205,5.565 -2.205,15.96 0,8.19 1.47,12.915 2.415,7.98 8.505,7.98 5.565,0 8.19,-7.875 2.205,-6.51 2.205,-16.695 0,-8.505 -2.1,-13.23 -2.52,-5.565 -7.56,-5.565 z"}),o.default.createElement("path",{d:"m 222.03563,-50.4 10.5,36.015 q 3.675,-11.235 5.67,-17.85 2.415,-8.085 5.04,-18.165 1.05,0.105 3.045,0.315 2.1,0.21 2.835,0.21 1.995,0 3.15,-0.105 1.26,-0.21 2.73,-0.42 l 10.71,36.015 q 5.88,-17.43 10.71,-36.015 l 4.2,0.315 4.095,-0.315 q -5.145,13.125 -9.135,24.57 -5.04,14.28 -8.505,26.355 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.205,-0.105 -1.89,0 -3.36,0.21 -1.365,0.21 -2.31,0.315 l -10.605,-34.755 q -4.41,13.65 -6.72,21.105 -2.31,7.35 -4.095,13.65 -1.89,-0.21 -3.36,-0.42 -1.365,-0.105 -2.31,-0.105 -1.995,0 -3.465,0.21 -1.365,0.21 -2.31,0.315 -3.78,-12.81 -5.04,-17.01 -2.205,-7.245 -5.46,-17.01 -2.835,-8.4 -5.88,-16.905 1.575,0 4.305,0.315 2.73,0.21 3.36,0.21 1.47,0 4.305,-0.21 2.835,-0.315 3.465,-0.315 z"}),o.default.createElement("path",{d:"m 292.84172,-12.81 h 2.625 q 1.47,4.095 4.62,6.51 3.15,2.415 7.35,2.415 2.94,0 5.46,-1.785 2.625,-1.89 2.625,-4.62 0,-3.885 -6.195,-6.615 -10.395,-4.62 -11.655,-5.46 -6.405,-4.515 -6.405,-12.285 0,-7.77 5.25,-12.18 5.25,-4.515 12.81,-4.515 3.99,0 8.085,1.365 4.095,1.26 7.14,3.57 l -2.52,9.24 h -2.94 q -0.63,-3.57 -3.57,-6.195 -2.835,-2.625 -6.405,-2.625 -3.15,0 -5.46,1.575 -2.31,1.47 -2.31,4.515 0,3.885 6.405,6.51 10.185,4.095 11.865,5.25 6.405,4.41 6.405,12.81 0,7.455 -5.46,12.18 -5.355,4.62 -14.805,4.62 -8.19,0 -14.49,-4.305 z"}),o.default.createElement("path",{d:"m 349.61228,-29.925 h 15.54 q 0,-6.51 -1.05,-10.395 -1.68,-6.3 -5.88,-6.3 -5.04,0 -7.14,6.195 -1.47,4.305 -1.47,10.5 z m 30.03,5.04 h -30.03 q 0,9.135 3.045,13.86 3.57,5.67 11.55,5.67 3.255,0 6.405,-1.26 3.15,-1.26 5.88,-3.465 l 1.26,0.945 -2.31,5.88 q -6.72,4.725 -15.015,4.725 -12.915,0 -19.635,-7.245 -6.72,-7.245 -6.72,-20.37 0,-11.235 6.405,-18.165 6.51,-7.035 17.64,-7.035 11.655,0 16.905,7.56 4.62,6.615 4.62,18.9 z"}))}t.Logomark=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 175 175"},o.default.createElement(a,{variant:t}))},t.LogoFull=function(e){var t=e.variant;return o.default.createElement("svg",{viewBox:"0 0 641 175"},o.default.createElement(u,{variant:t}),o.default.createElement(a,{variant:t}))}},57372:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=["open","onClose","menuItems","onMenuItemClick"];function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o);return d.default.createElement(h.Popover,a({open:t,onClose:r,BackdropProps:{invisible:!0},anchorOrigin:a({vertical:"bottom",horizontal:"right"},u.anchorOrigin),transformOrigin:a({vertical:"top",horizontal:"left"},u.transformOrigin)},u),d.default.createElement(E,{open:t,onClose:r,menuItems:n,onMenuItemClick:i,top:!0}))}},70611:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,o),b=(r=(0,f.useState)(!1),n=2,function(e){if(Array.isArray(e))return e}(r)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),g=b[0],w=b[1],S=(0,f.useRef)(0),A=(0,f.useRef)(0),x=p(),O=x.classes,E=x.cx;return(0,f.useEffect)((function(){function e(e){e.preventDefault();var t=s?e.clientX:e.clientY,r=S.current-t,n=t-A.current;A.current=t,c(n,r)}function t(){w(!1)}return g?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",t,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",t,!0)}):function(){}}),[g,c,s]),t=h?s?O.flexbox_verticalHandle:O.flexbox_horizontalHandle:s?O.verticalHandle:O.horizontalHandle,f.default.createElement("div",function(e){for(var t=1;t]*>")})).join("|"),"i");t.default=function(e){var t,r=e.html,n=e.className,s=(0,u.linkify)(r),f=(t=s,l.test(t)?s:(0,i.default)(s));return c||(c=!0,a.default.addHook("afterSanitizeAttributes",(function(e){"A"===e.tagName&&(e.setAttribute("rel","noopener noreferrer"),e.setAttribute("target","_blank"))}))),o.default.createElement("span",{className:n,dangerouslySetInnerHTML:{__html:a.default.sanitize(f)}})}},15199:(e,t,r)=>{"use strict";var n=r(77090);t.A=function(e){return e.extend((function(){return e=n.observable.array(),{views:{get snackbarMessages(){return e}},actions:{notify:function(e,t,r){var n=this;this.pushSnackbarMessage(e,t,r),"info"!==t&&"success"!==t||setTimeout((function(){n.removeSnackbarMessage(e)}),5e3)},pushSnackbarMessage:function(t,r,n){return e.push({message:t,level:r,action:n})},popSnackbarMessage:function(){return e.pop()},removeSnackbarMessage:function(t){var r=e.find((function(e){return e.message===t}));r&&e.remove(r)}}};var e}))}},26472:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ggplot2Colors3=t.ggplot2Colors4=t.ggplot2Colors5=t.ggplot2Colors6=t.category10=t.dark2=t.tableau10=t.set2=t.set1=void 0,t.category10=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],t.dark2=["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],t.set1=["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],t.set2=["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],t.tableau10=["#4e79a7","#f28e2c","#e15759","#76b7b2","#59a14f","#edc949","#af7aa1","#ff9da7","#9c755f","#bab0ab"],t.ggplot2Colors6=["#F8766D","#B79F00","#00BA38","#00BFC4","#619CFF","#F564E3"],t.ggplot2Colors5=["#F8766D","#A3A500","#00BF7D","#00B0F6","#E76BF3"],t.ggplot2Colors4=["#F8766D","#7CAE00","#00BFC4","#C77CFF"],t.ggplot2Colors3=["#F8766D","#00BA38","#619CFF"]},87931:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SanitizedHTML=t.ResizeHandle=t.ReturnToImportFormDialog=t.Tooltip=t.PrerenderedCanvas=t.Menu=t.LoadingEllipses=t.FileSelector=t.FatalErrorDialog=t.FactoryResetDialog=t.ErrorMessage=t.EditableTypography=t.Dialog=t.CascadingMenu=t.AssemblySelector=t.Logomark=t.LogoFull=void 0,o(r(87926),t);var a=r(87196);Object.defineProperty(t,"LogoFull",{enumerable:!0,get:function(){return a.LogoFull}}),Object.defineProperty(t,"Logomark",{enumerable:!0,get:function(){return a.Logomark}});var u=r(10994);Object.defineProperty(t,"AssemblySelector",{enumerable:!0,get:function(){return i(u).default}});var c=r(21461);Object.defineProperty(t,"CascadingMenu",{enumerable:!0,get:function(){return i(c).default}});var l=r(57991);Object.defineProperty(t,"Dialog",{enumerable:!0,get:function(){return i(l).default}});var s=r(81082);Object.defineProperty(t,"EditableTypography",{enumerable:!0,get:function(){return i(s).default}});var f=r(15390);Object.defineProperty(t,"ErrorMessage",{enumerable:!0,get:function(){return i(f).default}});var p=r(47246);Object.defineProperty(t,"FactoryResetDialog",{enumerable:!0,get:function(){return i(p).default}});var d=r(86051);Object.defineProperty(t,"FatalErrorDialog",{enumerable:!0,get:function(){return i(d).default}});var h=r(68343);Object.defineProperty(t,"FileSelector",{enumerable:!0,get:function(){return i(h).default}});var y=r(11728);Object.defineProperty(t,"LoadingEllipses",{enumerable:!0,get:function(){return i(y).default}});var v=r(57372);Object.defineProperty(t,"Menu",{enumerable:!0,get:function(){return i(v).default}});var m=r(70611);Object.defineProperty(t,"PrerenderedCanvas",{enumerable:!0,get:function(){return i(m).default}});var b=r(26472);Object.defineProperty(t,"Tooltip",{enumerable:!0,get:function(){return i(b).default}});var g=r(40467);Object.defineProperty(t,"ReturnToImportFormDialog",{enumerable:!0,get:function(){return i(g).default}});var w=r(84545);Object.defineProperty(t,"ResizeHandle",{enumerable:!0,get:function(){return i(w).default}});var S=r(94107);Object.defineProperty(t,"SanitizedHTML",{enumerable:!0,get:function(){return i(S).default}}),o(r(57372),t)},21011:function(e,t,r){"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}function f(e){var t=(0,c.useRef)(e),r=(0,c.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return e>r?r:e0:e.buttons>0)&&i.current?a(y(i.current,e,p.current)):r(!1)},t=function(){return r(!1)};function r(r){var n=m.current,o=h(i.current),a=r?o.addEventListener:o.removeEventListener;a(n?"touchmove":"mousemove",e),a(n?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,n=i.current;if(n&&(v(t),!function(e,t){return t&&!d(e)}(t,m.current)&&n)){if(d(t)){m.current=!0;var o=t.changedTouches||[];o.length&&(p.current=o[0].identifier)}n.focus(),a(y(n,t,p.current)),r(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),u({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},r]}),[u,a]),g=n(b,3),w=g[0],S=g[1],A=g[2];return(0,c.useEffect)((function(){return A}),[A]),c.default.createElement("div",l({},o,{onTouchStart:w,onMouseDown:w,className:"react-colorful__interactive",ref:i,onKeyDown:S,tabIndex:0,role:"slider"}))})),b=function(e){return e.filter(Boolean).join(" ")},g=function(e){var t=e.className,r=e.color,n=e.left,o=e.top,i=void 0===o?.5:o,a=b(["react-colorful__pointer",t]);return c.default.createElement("div",{className:a,style:{top:100*i+"%",left:100*n+"%"}},c.default.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:r}}))},w=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Math.pow(10,t);return Math.round(r*e)/r},S={grad:.9,turn:360,rad:360/(2*Math.PI)},A=function(e){return"#"===e[0]&&(e=e.substr(1)),e.length<6?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:1}:{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:1}},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"deg";return Number(e)*(S[t]||1)},O=function(e){var t=/hsla?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?j({h:x(t[1],t[2]),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},E=O,j=function(e){var t=e.h,r=e.s,n=e.l;return{h:t,s:(r*=(n<50?n:100-n)/100)>0?2*r/(n+r)*100:0,v:n+r,a:e.a}},P=function(e){var t=e.h,r=e.s,n=e.v,o=e.a,i=(200-r)*n/100;return{h:w(t),s:w(i>0&&i<200?r*n/100/(i<=100?i:200-i)*100:0),l:w(i/2),a:w(o,2)}},k=function(e){var t=P(e),r=t.h,n=t.s,o=t.l;return"hsl(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},C=function(e){var t=P(e),r=t.h,n=t.s,o=t.l,i=t.a;return"hsla(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},_=function(e){var t=e.h,r=e.s,n=e.v,o=e.a;t=t/360*6,r/=100,n/=100;var i=Math.floor(t),a=n*(1-r),u=n*(1-(t-i)*r),c=n*(1-(1-t+i)*r),l=i%6;return{r:w(255*[n,u,a,a,c,n][l]),g:w(255*[c,n,n,u,a,a][l]),b:w(255*[a,a,c,n,n,u][l]),a:w(o,2)}},L=function(e){var t=/hsva?\(?\s*(-?\d*\.?\d+)(deg|rad|grad|turn)?[,\s]+(-?\d*\.?\d+)%?[,\s]+(-?\d*\.?\d+)%?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?F({h:x(t[1],t[2]),s:Number(t[3]),v:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)}):{h:0,s:0,v:0,a:1}},T=L,I=function(e){var t=/rgba?\(?\s*(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?[,\s]+(-?\d*\.?\d+)(%)?,?\s*[/\s]*(-?\d*\.?\d+)?(%)?\s*\)?/i.exec(e);return t?N({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):{h:0,s:0,v:0,a:1}},M=I,R=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},N=function(e){var t=e.r,r=e.g,n=e.b,o=e.a,i=Math.max(t,r,n),a=i-Math.min(t,r,n),u=a?i===t?(r-n)/a:i===r?2+(n-t)/a:4+(t-r)/a:0;return{h:w(60*(u<0?u+6:u)),s:w(i?a/i*100:0),v:w(i/255*100),a:o}},F=function(e){return{h:w(e.h),s:w(e.s),v:w(e.v),a:w(e.a,2)}},D=c.default.memo((function(e){var t=e.className,r=e.hue,n=e.onChange,o=b(["react-colorful__hue",t]);return c.default.createElement("div",{className:o},c.default.createElement(m,{onMove:function(e){n({h:360*e.left})},onKey:function(e){n({h:p(r+360*e.left,0,360)})},"aria-label":"Hue","aria-valuetext":w(r)},c.default.createElement(g,{className:"react-colorful__hue-pointer",left:r/360,color:k({h:r,s:100,v:100,a:1})})))})),B=c.default.memo((function(e){var t=e.hsva,r=e.onChange,n={backgroundColor:k({h:t.h,s:100,v:100,a:1})};return c.default.createElement("div",{className:"react-colorful__saturation",style:n},c.default.createElement(m,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:p(t.s+100*e.left,0,100),v:p(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation ".concat(w(t.s),"%, Brightness ").concat(w(t.v),"%")},c.default.createElement(g,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:k(t)})))})),z=function(e,t){if(e===t)return!0;for(var r in e)if(e[r]!==t[r])return!1;return!0},G=function(e,t){return e.replace(/\s/g,"")===t.replace(/\s/g,"")};function U(e,t,r){var o=f(r),i=n((0,c.useState)((function(){return e.toHsva(t)})),2),a=i[0],u=i[1],l=(0,c.useRef)({color:t,hsva:a});(0,c.useEffect)((function(){if(!e.equal(t,l.current.color)){var r=e.toHsva(t);l.current={hsva:r,color:t},u(r)}}),[t,e]),(0,c.useEffect)((function(){var t;z(a,l.current.hsva)||e.equal(t=e.fromHsva(a),l.current.color)||(l.current={hsva:a,color:t},o(t))}),[a,e,o]);var s=(0,c.useCallback)((function(e){u((function(t){return Object.assign({},t,e)}))}),[]);return[a,s]}var H,V="undefined"!=typeof window?c.useLayoutEffect:c.useEffect,W=new Map,q=function(e){V((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!W.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',W.set(t,n);var o=H||r.nc;o&&n.setAttribute("nonce",o),t.head.appendChild(n)}}),[])},Q=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);q(f);var p=n(U(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(B,{hsva:d,onChange:h}),c.default.createElement(D,{hue:d.h,onChange:h,className:"react-colorful__last-control"}))},$={defaultColor:"000",toHsva:function(e){return N(A(e))},fromHsva:function(e){return function(e){var t=e.r,r=e.g,n=e.b;return"#"+R(t)+R(r)+R(n)}(_(e))},equal:function(e,t){return e.toLowerCase()===t.toLowerCase()||z(A(e),A(t))}},Y=function(e){var t=e.className,r=e.hsva,n=e.onChange,o={backgroundImage:"linear-gradient(90deg, ".concat(C(Object.assign({},r,{a:0})),", ").concat(C(Object.assign({},r,{a:1})),")")},i=b(["react-colorful__alpha",t]);return c.default.createElement("div",{className:i},c.default.createElement("div",{className:"react-colorful__alpha-gradient",style:o}),c.default.createElement(m,{onMove:function(e){n({a:e.left})},onKey:function(e){n({a:p(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":"".concat(w(100*r.a),"%")},c.default.createElement(g,{className:"react-colorful__alpha-pointer",left:r.a,color:C(r)})))},K=function(e){var t=e.className,r=e.colorModel,o=e.color,i=void 0===o?r.defaultColor:o,a=e.onChange,u=s(e,["className","colorModel","color","onChange"]),f=(0,c.useRef)(null);q(f);var p=n(U(r,i,a),2),d=p[0],h=p[1],y=b(["react-colorful",t]);return c.default.createElement("div",l({},u,{ref:f,className:y}),c.default.createElement(B,{hsva:d,onChange:h}),c.default.createElement(D,{hue:d.h,onChange:h}),c.default.createElement(Y,{hsva:d,onChange:h,className:"react-colorful__last-control"}))},J={defaultColor:{h:0,s:0,l:0,a:1},toHsva:j,fromHsva:P,equal:z},X={defaultColor:"hsla(0, 0%, 0%, 1)",toHsva:O,fromHsva:C,equal:G},Z={defaultColor:{h:0,s:0,l:0},toHsva:function(e){var t=e.h,r=e.s,n=e.l;return j({h:t,s:r,l:n,a:1})},fromHsva:function(e){return{h:(t=P(e)).h,s:t.s,l:t.l};var t},equal:z},ee={defaultColor:"hsl(0, 0%, 0%)",toHsva:E,fromHsva:k,equal:G},te={defaultColor:{h:0,s:0,v:0,a:1},toHsva:function(e){return e},fromHsva:F,equal:z},re={defaultColor:"hsva(0, 0%, 0%, 1)",toHsva:L,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v,i=t.a;return"hsva(".concat(r,", ").concat(n,"%, ").concat(o,"%, ").concat(i,")")},equal:G},ne={defaultColor:{h:0,s:0,v:0},toHsva:function(e){return{h:e.h,s:e.s,v:e.v,a:1}},fromHsva:function(e){var t=F(e);return{h:t.h,s:t.s,v:t.v}},equal:z},oe={defaultColor:"hsv(0, 0%, 0%)",toHsva:T,fromHsva:function(e){var t=F(e),r=t.h,n=t.s,o=t.v;return"hsv(".concat(r,", ").concat(n,"%, ").concat(o,"%)")},equal:G},ie={defaultColor:{r:0,g:0,b:0,a:1},toHsva:N,fromHsva:_,equal:z},ae={defaultColor:"rgba(0, 0, 0, 1)",toHsva:I,fromHsva:function(e){var t=_(e),r=t.r,n=t.g,o=t.b,i=t.a;return"rgba(".concat(r,", ").concat(n,", ").concat(o,", ").concat(i,")")},equal:G},ue={defaultColor:{r:0,g:0,b:0},toHsva:function(e){var t=e.r,r=e.g,n=e.b;return N({r:t,g:r,b:n,a:1})},fromHsva:function(e){return{r:(t=_(e)).r,g:t.g,b:t.b};var t},equal:z},ce={defaultColor:"rgb(0, 0, 0)",toHsva:M,fromHsva:function(e){var t=_(e),r=t.r,n=t.g,o=t.b;return"rgb(".concat(r,", ").concat(n,", ").concat(o,")")},equal:G},le=/^#?([0-9A-F]{3,8})$/i,se=function(e){var t=e.color,r=void 0===t?"":t,o=e.onChange,i=e.onBlur,a=e.escape,u=e.validate,p=e.format,d=e.process,h=s(e,["color","onChange","onBlur","escape","validate","format","process"]),y=n((0,c.useState)((function(){return a(r)})),2),v=y[0],m=y[1],b=f(o),g=f(i),w=(0,c.useCallback)((function(e){var t=a(e.target.value);m(t),u(t)&&b(d?d(t):t)}),[a,d,u,b]),S=(0,c.useCallback)((function(e){u(e.target.value)||m(a(r)),g(e)}),[r,a,u,g]);return(0,c.useEffect)((function(){m(a(r))}),[r,a]),c.default.createElement("input",l({},h,{value:p?p(v):v,spellCheck:"false",onChange:w,onBlur:S}))},fe=function(e){return"#"+e};t.setNonce=function(e){H=e},t.HexColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:$}))},t.HslaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:J}))},t.HslaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:X}))},t.HslColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:Z}))},t.HslStringColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:ee}))},t.HsvaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:te}))},t.HsvaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:re}))},t.HsvColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:ne}))},t.HsvStringColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:oe}))},t.RgbaColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:ie}))},t.RgbaStringColorPicker=function(e){return c.default.createElement(K,l({},e,{colorModel:ae}))},t.RgbColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:ue}))},t.RgbStringColorPicker=function(e){return c.default.createElement(Q,l({},e,{colorModel:ce}))},t.HexColorInput=function(e){var t=e.prefixed,r=e.alpha,n=s(e,["prefixed","alpha"]),o=(0,c.useCallback)((function(e){return e.replace(/([^0-9A-F]+)/gi,"").substr(0,r?8:6)}),[r]),i=(0,c.useCallback)((function(e){return function(e,t){var r=le.exec(e),n=r?r[1].length:0;return 3===n||6===n||!!t&&4===n||!!t&&8===n}(e,r)}),[r]);return c.default.createElement(se,l({},n,{escape:o,format:t?fe:void 0,process:fe,validate:i}))}},87926:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==r?void 0:r.palette)||void 0===e?void 0:e.tertiary)&&(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor("color"in r.palette.tertiary?r.palette.tertiary:{color:r.palette.tertiary})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.quaternary)&&(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor("color"in r.palette.quaternary?r.palette.quaternary:{color:r.palette.quaternary})}})),r}t.defaultThemes={default:i({name:"Default (from config)"},y()),lightStock:i({name:"Light (stock)"},y()),lightMinimal:{name:"Light (minimal)",palette:{primary:{main:u.grey[900]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkMinimal:{name:"Dark (minimal)",palette:{mode:"dark",primary:{main:u.grey[700]},secondary:{main:u.grey[800]},tertiary:h.palette.augmentColor({color:{main:u.grey[900]}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}}},darkStock:{name:"Dark (stock)",palette:{mode:"dark",primary:{main:s},secondary:{main:f},tertiary:h.palette.augmentColor({color:{main:p}}),quaternary:h.palette.augmentColor({color:{main:d}}),stopCodon:"#e22",startCodon:"#3e3",bases:{A:h.palette.augmentColor({color:u.green}),C:h.palette.augmentColor({color:u.blue}),G:h.palette.augmentColor({color:u.orange}),T:h.palette.augmentColor({color:u.red})}},components:{MuiAppBar:{defaultProps:{enableColorOnDark:!0},styleOverrides:{primary:function(e){return e.theme.palette.primary.main}}}}}},t.createJBrowseBaseTheme=v,t.createJBrowseTheme=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaultThemes,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"default";return(0,c.createTheme)(v("default"===n?(0,l.default)(r.default,m(e)):function(){var e,t,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(null===(e=null==(r=m(r))?void 0:r.palette)||void 0===e?void 0:e.quaternary)||(r=(0,l.default)(r,{palette:{quaternary:h.palette.augmentColor({color:{main:"#aaa"}})}})),(null===(t=null==r?void 0:r.palette)||void 0===t?void 0:t.tertiary)||(r=(0,l.default)(r,{palette:{tertiary:h.palette.augmentColor({color:{main:"#aaa"}})}})),r}(r[n])||r.default))}},44563:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=2)for(var a=t.index+1;au&&l++}var p=c/(n-o*l),d=e.zoomTo(p),h=0;pp&&n<=p)return i(i({},(0,a.getSnapshot)(m)),{},{oob:!1,offset:g,coord:u(m,g),index:v});(null===(r=f[y])||void 0===r?void 0:r.regionNumber)===v?(n+=b+h,y++):n+=b}if(p>=n&&l.length>0){var w=l.at(-1),S=p-n+(w.end-w.start);return i(i({},(0,a.getSnapshot)(w)),{},{oob:!0,offset:S,coord:u(w,S),index:l.length-1})}return{coord:0,index:0,refName:"",oob:!0,assemblyName:"",offset:0,start:0,end:0,reversed:!1}},t.bpToPx=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(!o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}if(l[d])return{index:d,offsetPx:Math.round(a/c)}},t.bpToPxMap=function(e){for(var t,r=e.refName,n=e.coord,o=e.regionNumber,i=e.self,a=0,u=i.interRegionPaddingWidth,c=i.bpPerPx,l=i.displayedRegions,s=i.staticBlocks.contentBlocks,f=u*c,p=0,d=0;d=h.start&&n<=h.end&&(void 0===o||o===d)){a+=h.reversed?h.end-n:n-h.start;break}(null===(t=s[p])||void 0===t?void 0:t.regionNumber)===d?(a+=y+f,p++):a+=y}return l[d]?{index:d,offsetPx:Math.round(a/c)}:{}}},94707:function(e,t,r){"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:e.width/2,n=(0,a.clamp)(t,"minBpPerPx"in e?e.minBpPerPx:0,"maxBpPerPx"in e?e.maxBpPerPx:1/0),o=e.bpPerPx;return Math.abs(o-n)<1e-6?o:(e.bpPerPx=n,e.offsetPx=(0,a.clamp)(Math.round((e.offsetPx+r)*o/n-r),e.minOffset,e.maxOffset),e.bpPerPx)},scrollTo:function(t){var r=(0,a.clamp)(t,e.minOffset,e.maxOffset);return e.offsetPx=r,r},centerAt:function(t,r,n){if(r){var o=e.bpToPx({refName:r,coord:t,regionNumber:n});o&&this.scrollTo(Math.round(o-e.width/2))}},scroll:function(t){var r=e.offsetPx,n=(0,a.clamp)(e.offsetPx+t,e.minOffset,e.maxOffset);return e.offsetPx=n,n-r}}})).actions((function(e){return{moveTo:function(t,r){(0,s.moveTo)(e,t,r)}}}));t.default=f},30673:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(){o=function(){return t};var e,t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==n&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||u(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=u(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),t=this,n=h(n=c),e=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(t,p()?Reflect.construct(n,o||[],h(t).constructor):n.apply(t,o)),!(i.maxSize&&i.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");if("number"==typeof i.maxAge&&0===i.maxAge)throw new TypeError("`maxAge` must be a number greater than 0");return e.maxSize=i.maxSize,e.maxAge=i.maxAge||Number.POSITIVE_INFINITY,e.onEviction=i.onEviction,e.cache=new Map,e.oldCache=new Map,e._size=0,e}var s,f;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}(c,e),s=c,f=[{key:"_emitEvictions",value:function(e){if("function"==typeof this.onEviction){var t,r=a(e);try{for(r.s();!(t=r.n()).done;){var n=i(t.value,2),o=n[0],u=n[1];this.onEviction(o,u.value)}}catch(e){r.e(e)}finally{r.f()}}}},{key:"_deleteIfExpired",value:function(e,t){return"number"==typeof t.expiry&&t.expiry<=Date.now()&&("function"==typeof this.onEviction&&this.onEviction(e,t.value),this.delete(e))}},{key:"_getOrDeleteIfExpired",value:function(e,t){if(!1===this._deleteIfExpired(e,t))return t.value}},{key:"_getItemValue",value:function(e,t){return t.expiry?this._getOrDeleteIfExpired(e,t):t.value}},{key:"_peek",value:function(e,t){var r=t.get(e);return this._getItemValue(e,r)}},{key:"_set",value:function(e,t){this.cache.set(e,t),this._size++,this._size>=this.maxSize&&(this._size=0,this._emitEvictions(this.oldCache),this.oldCache=this.cache,this.cache=new Map)}},{key:"_moveToRecent",value:function(e,t){this.oldCache.delete(e),this._set(e,t)}},{key:"_entriesAscending",value:o().mark((function e(){var t,r,n,u,c,l,s,f,p,d,h,y;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this.oldCache),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=13;break}if(n=r.value,u=i(n,2),c=u[0],l=u[1],this.cache.has(c)){e.next=11;break}if(!1!==this._deleteIfExpired(c,l)){e.next=11;break}return e.next=11,n;case 11:e.next=3;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(1),t.e(e.t0);case 18:return e.prev=18,t.f(),e.finish(18);case 21:s=a(this.cache),e.prev=22,s.s();case 24:if((f=s.n()).done){e.next=33;break}if(p=f.value,d=i(p,2),h=d[0],y=d[1],!1!==this._deleteIfExpired(h,y)){e.next=31;break}return e.next=31,p;case 31:e.next=24;break;case 33:e.next=38;break;case 35:e.prev=35,e.t1=e.catch(22),s.e(e.t1);case 38:return e.prev=38,s.f(),e.finish(38);case 41:case"end":return e.stop()}}),e,this,[[1,15,18,21],[22,35,38,41]])}))},{key:"get",value:function(e){if(this.cache.has(e)){var t=this.cache.get(e);return this._getItemValue(e,t)}if(this.oldCache.has(e)){var r=this.oldCache.get(e);if(!1===this._deleteIfExpired(e,r))return this._moveToRecent(e,r),r.value}}},{key:"set",value:function(e,t){var r=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).maxAge,n=void 0===r?this.maxAge:r,o="number"==typeof n&&n!==Number.POSITIVE_INFINITY?Date.now()+n:void 0;this.cache.has(e)?this.cache.set(e,{value:t,expiry:o}):this._set(e,{value:t,expiry:o})}},{key:"has",value:function(e){return this.cache.has(e)?!this._deleteIfExpired(e,this.cache.get(e)):!!this.oldCache.has(e)&&!this._deleteIfExpired(e,this.oldCache.get(e))}},{key:"peek",value:function(e){return this.cache.has(e)?this._peek(e,this.cache):this.oldCache.has(e)?this._peek(e,this.oldCache):void 0}},{key:"delete",value:function(e){var t=this.cache.delete(e);return t&&this._size--,this.oldCache.delete(e)||t}},{key:"clear",value:function(){this.cache.clear(),this.oldCache.clear(),this._size=0}},{key:"resize",value:function(e){if(!(e&&e>0))throw new TypeError("`maxSize` must be a number greater than 0");var t=n(this._entriesAscending()),r=t.length-e;r<0?(this.cache=new Map(t),this.oldCache=new Map,this._size=t.length):(r>0&&this._emitEvictions(t.slice(0,r)),this.oldCache=new Map(t.slice(r)),this.cache=new Map,this._size=0),this.maxSize=e}},{key:"keys",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,1),u=n[0],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"values",value:o().mark((function e(){var t,r,n,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[1],e.next=7,u;case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:t,value:o().mark((function(){var e,t,r,n,u,c,l,s,f,p,d,h;return o().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:e=a(this.cache),o.prev=1,e.s();case 3:if((t=e.n()).done){o.next=12;break}if(r=t.value,n=i(r,2),u=n[0],c=n[1],!1!==this._deleteIfExpired(u,c)){o.next=10;break}return o.next=10,[u,c.value];case 10:o.next=3;break;case 12:o.next=17;break;case 14:o.prev=14,o.t0=o.catch(1),e.e(o.t0);case 17:return o.prev=17,e.f(),o.finish(17);case 20:l=a(this.oldCache),o.prev=21,l.s();case 23:if((s=l.n()).done){o.next=33;break}if(f=s.value,p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){o.next=31;break}if(!1!==this._deleteIfExpired(d,h)){o.next=31;break}return o.next=31,[d,h.value];case 31:o.next=23;break;case 33:o.next=38;break;case 35:o.prev=35,o.t1=o.catch(21),l.e(o.t1);case 38:return o.prev=38,l.f(),o.finish(38);case 41:case"end":return o.stop()}}),c,this,[[1,14,17,20],[21,35,38,41]])}))},{key:"entriesDescending",value:o().mark((function e(){var t,r,a,u,c,l,s,f,p,d,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=n(this.cache),r=t.length-1;case 2:if(!(r>=0)){e.next=12;break}if(a=t[r],u=i(a,2),c=u[0],l=u[1],!1!==this._deleteIfExpired(c,l)){e.next=9;break}return e.next=9,[c,l.value];case 9:--r,e.next=2;break;case 12:t=n(this.oldCache),s=t.length-1;case 14:if(!(s>=0)){e.next=25;break}if(f=t[s],p=i(f,2),d=p[0],h=p[1],this.cache.has(d)){e.next=22;break}if(!1!==this._deleteIfExpired(d,h)){e.next=22;break}return e.next=22,[d,h.value];case 22:--s,e.next=14;break;case 25:case"end":return e.stop()}}),e,this)}))},{key:"entriesAscending",value:o().mark((function e(){var t,r,n,u,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=a(this._entriesAscending()),e.prev=1,t.s();case 3:if((r=t.n()).done){e.next=9;break}return n=i(r.value,2),u=n[0],c=n[1],e.next=7,[u,c.value];case 7:e.next=3;break;case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),t.e(e.t0);case 14:return e.prev=14,t.f(),e.finish(14);case 17:case"end":return e.stop()}}),e,this,[[1,11,14,17]])}))},{key:"size",get:function(){if(!this._size)return this.oldCache.size;var e,t=0,r=a(this.oldCache.keys());try{for(r.s();!(e=r.n()).done;){var n=e.value;this.cache.has(n)||t++}}catch(e){r.e(e)}finally{r.f()}return Math.min(this._size+t,this.maxSize)}},{key:"entries",value:function(){return this.entriesAscending()}},{key:"forEach",value:function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this,n=a(this.entriesAscending());try{for(n.s();!(t=n.n()).done;){var o=i(t.value,2),u=o[0],c=o[1];e.call(r,c,u,this)}}catch(e){n.e(e)}finally{n.f()}}},{key:u,get:function(){return JSON.stringify(n(this.entriesAscending()))}}],f&&l(s.prototype,f),Object.defineProperty(s,"prototype",{writable:!1}),c}(f(Map),Symbol.iterator,Symbol.toStringTag);t.default=y},21295:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(u())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&c(o,r.prototype),o}(e,arguments,l(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),c(r,e)},a(e)}function u(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(u=function(){return!!e})()}function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.isAbortException=t.observeAbortSignal=t.makeAbortError=t.abortBreakPoint=t.checkAbortSignal=void 0;var s=r(16733),f=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,o=arguments,r=l(r=t),function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,u()?Reflect.construct(r,o||[],l(e).constructor):r.apply(e,o));var e,r,o}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&c(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(a(Error));function p(e){if(e){if(!(e instanceof AbortSignal))throw new TypeError("must pass an AbortSignal");if(e.aborted)throw y()}}function d(e){return new Promise((function(t){return setTimeout(t,e)}))}function h(){var e;return e=o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d(1);case 2:p(t);case 3:case"end":return e.stop()}}),e)})),h=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},h.apply(this,arguments)}function y(){if("undefined"!=typeof DOMException)return new DOMException("aborted","AbortError");var e=new f("aborted");return e.code="ERR_ABORTED",e}t.checkAbortSignal=p,t.abortBreakPoint=function(e){return h.apply(this,arguments)},t.makeAbortError=y,t.observeAbortSignal=function(e){return e?(0,s.fromEvent)(e,"abort"):s.Observable.create()},t.isAbortException=function(e){return e instanceof Error&&("AbortError"===e.name||"ERR_ABORTED"===e.code||!!/\b(aborted|aborterror)\b/i.test(e.message))}},92398:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.blobToDataURL=void 0,t.blobToDataURL=function(e){var t=new FileReader;return new Promise((function(r,n){t.onload=function(e){e.target?r(e.target.result):n(new Error("unknown result reading blob from canvas"))},t.readAsDataURL(e)}))}},91455:(e,t,r)=>{"use strict";function n(e,t,r){return t=i(t),function(e,t){if(t&&("object"===c(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,o()?Reflect.construct(t,r||[],i(e).constructor):t.apply(e,r))}function o(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(o=function(){return!!e})()}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&u(e,t)}function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:[];l(this,e),this.blocks=t}return f(e,[{key:"push",value:function(e){if(e instanceof m&&this.blocks.length>0){var t=this.blocks.at(-1);if(t instanceof m)return void t.push(e)}this.blocks.push(e)}},{key:"getBlocks",value:function(){return this.blocks}},{key:"getRegions",value:function(){return this.blocks.map((function(e){return e.toRegion()}))}},{key:"map",value:function(e,t){return this.blocks.map(e,t)}},{key:"forEach",value:function(e,t){return this.blocks.forEach(e,t)}},{key:"length",get:function(){return this.blocks.length}},{key:"totalWidthPx",get:function(){return this.blocks.length>0?(0,d.sum)(this.blocks.map((function(e){return e.widthPx}))):0}},{key:"totalWidthPxWithoutBorders",get:function(){return this.blocks.length>0?(0,d.sum)(this.blocks.filter((function(e){return"boundary"!==e.variant})).map((function(e){return e.widthPx}))):0}},{key:"offsetPx",get:function(){return this.blocks.length>0?this.blocks[0].offsetPx:0}},{key:"contentBlocks",get:function(){return this.blocks.filter((function(e){return e instanceof v}))}},{key:"totalBp",get:function(){return(0,d.sum)(this.contentBlocks.map((function(e){return e.end-e.start})))}}]),e}();t.BlockSet=h;var y=function(){function e(t){l(this,e),this.widthPx=0,Object.assign(this,t),this.assemblyName=t.assemblyName,this.refName=t.refName,this.start=t.start,this.end=t.end,this.key=t.key,this.offsetPx=t.offsetPx}return f(e,[{key:"toRegion",value:function(){return{refName:this.refName,start:this.start,end:this.end,assemblyName:this.assemblyName,reversed:this.reversed}}}]),e}();t.BaseBlock=y;var v=function(e){function t(){return l(this,t),n(this,t,arguments)}return a(t,e),f(t)}(y);t.ContentBlock=v;var m=function(e){function t(e){var r;return l(this,t),(r=n(this,t,[e])).elidedBlockCount=0,r.widthPx=e.widthPx,r}return a(t,e),f(t,[{key:"push",value:function(e){this.elidedBlockCount+=1,e&&(this.refName="",this.start=0,this.end=0,this.widthPx+=e.widthPx)}}]),t}(y);t.ElidedBlock=m;var b=function(e){function t(){return l(this,t),n(this,t,arguments)}return a(t,e),f(t)}(y);t.InterRegionPaddingBlock=b},96206:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1])||arguments[1],l=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],s=e.offsetPx,f=e.displayedRegions,p=e.bpPerPx,d=e.width,h=e.minimumBlockWidth,y=e.interRegionPaddingWidth;if(!d)throw new Error("view has no width, cannot calculate displayed blocks");for(var v=new u.BlockSet,m=0,b=s,g=b+d,w=0;wb){var _=(t=(0,i.intersection2)(b,g,m,P),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),L=_[0],T=_[1],I=void 0,M=void 0,R=void 0,N=void 0,F=void 0;j?(R=(M=E-(L-m)*p)===E,N=(I=Math.max(O,E-(T-m)*p))===O,F=m+(E-M)/p):(R=(I=(L-m)*p+O)===O,N=(M=Math.min(E,(T-m)*p+O))===E,F=m+(I-O)/p);var D={assemblyName:A,refName:x,start:I,end:M,reversed:j,offsetPx:F,parentRegion:C,regionNumber:w,widthPx:(M-I)/p,isLeftEndOfDisplayedRegion:R,isRightEndOfDisplayedRegion:N,key:""};D.key="".concat((0,a.assembleLocStringFast)(D),"-").concat(w).concat(j?"-reversed":""),c&&0===v.length&&R&&v.push(new u.InterRegionPaddingBlock({key:"".concat(D.key,"-beforeFirstRegion"),widthPx:-s,offsetPx:D.offsetPx+s,variant:"boundary"})),l&&k=h&&D.isRightEndOfDisplayedRegion&&w{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(72731),o=r(57525),i=r(91455);t.default=function(e){for(var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:800,c=e.offsetPx,l=e.displayedRegions,s=e.bpPerPx,f=e.minimumBlockWidth,p=e.interRegionPaddingWidth,d=c*s,h=(c+e.width)*s,y=u,v=Math.ceil(y*s),m=0,b=new i.BlockSet,g=0;g=j&&(k=j-1);var C=Math.floor((d-m)/v)-a;C<0&&(C=0);for(var _=(O-x)/s,L=C;L<=k;L+=1){var T=void 0,I=void 0,M=void 0,R=void 0;E?(M=(I=O-L*v)===O,R=(T=Math.max(x,O-(L+1)*v))===x):(M=(T=x+L*v)===x,R=(I=Math.min(O,x+(L+1)*v))===O);var N={assemblyName:S,refName:A,start:T,end:I,reversed:E,offsetPx:(m+L*v)/s,parentRegion:P,regionNumber:g,widthPx:(I-T)/s,isLeftEndOfDisplayedRegion:M,isRightEndOfDisplayedRegion:R,key:""};N.key="".concat((0,o.assembleLocStringFast)(N),"-").concat(g).concat(E?"-reversed":""),t&&0===g&&0===L&&b.push(new i.InterRegionPaddingBlock({key:"".concat(N.key,"-beforeFirstRegion"),widthPx:u,offsetPx:N.offsetPx-u,variant:"boundary"})),r&&_=f&&N.isRightEndOfDisplayedRegion&&g{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNamedColor=t.namedColorToHex=void 0;var r={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgreen:"#006400",darkgrey:"#A9A9A9",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",green:"#008000",greenyellow:"#ADFF2F",grey:"#808080",honeydew:"#F0FFF0",hotpink:"#FF69B4",indianred:"#CD5C5C",indigo:"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgreen:"#90EE90",lightgrey:"#D3D3D3",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};t.namedColorToHex=function(e){return r[e]},t.isNamedColor=function(e){return!!r[e]}},38377:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.namedColorToHex=t.isNamedColor=t.makeContrasting=t.emphasize=t.contrastingTextColor=void 0;var n=r(29350),o=r(54176);function i(e){var t=(0,o.namedColorToHex)(e);return(0,n.getLuminance)(t||e)}t.contrastingTextColor=function(e){return i(e)>.5?"black":"white"},t.emphasize=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15,r=(0,o.namedColorToHex)(e);return(0,n.emphasize)(r||e,t)},t.makeContrasting=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"white",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:3,a=(0,o.namedColorToHex)(e)||e,u=(0,o.namedColorToHex)(t)||t,c=i(u),l=(0,n.getContrastRatio)(a,u),s=a,f=.05;l.5?(0,n.darken)(s,f):(0,n.lighten)(s,f),f+=.05,l=(0,n.getContrastRatio)(a,u);return a};var a=r(54176);Object.defineProperty(t,"isNamedColor",{enumerable:!0,get:function(){return a.isNamedColor}}),Object.defineProperty(t,"namedColorToHex",{enumerable:!0,get:function(){return a.namedColorToHex}})},11164:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.colord=t.Colord=void 0;var o=r(66667),i=n(r(17122)),a=n(r(45908));(0,o.extend)([i.default,a.default]);var u=r(66667);Object.defineProperty(t,"Colord",{enumerable:!0,get:function(){return u.Colord}}),Object.defineProperty(t,"colord",{enumerable:!0,get:function(){return u.colord}})},89450:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(){n=function(){return t};var e,t={},o=Object.prototype,i=o.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==o&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function n(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==r(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,u,c)}),(function(e){n("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return n("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:JSON.stringify,o=[],i=new Set,a=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==n.return||n.return()}finally{if(c)throw a}}}}(e);try{for(a.s();!(t=a.n()).done;){var u=t.value,c=n(u);i.has(c)||(o.push(u),i.add(c))}}catch(e){a.e(e)}finally{a.f()}return o}},47327:(e,t)=>{"use strict";t.UU=void 0,t.UU=function(e){return e.map((function(e){return">".concat(e.header,"\n").concat(e.seq.replaceAll(/(.{1,80})/g,"$1\n").trimEnd())})).join("\n")}},94962:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}Object.defineProperty(t,"__esModule",{value:!0});var o=r(57525);t.default=function e(t){for(var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",i=0,a=Object.keys(t);i5e3)break;r+="object"===n(t[u])&&t[u]?e(t[u],r):"".concat(u,"-").concat(t[u],";")}return(0,o.hashCode)(r)}},57525:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||p(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:function(e){return e},o=e.assemblyName,i=e.refName,a=e.start,u=e.end,c=e.reversed,l=o?"{".concat(o,"}"):"";t=void 0!==a?":".concat(n(a+1)):void 0!==u?":1":"",r=void 0!==u?void 0!==a&&a+1===u?"":"..".concat(n(u)):void 0!==a?"..":"";var s="";return c&&(s="[rev]"),"".concat(l).concat(i).concat(t).concat(r).concat(s)}function L(e,t){if(!e)throw new Error("no location string provided, could not parse");var r=!1;e.endsWith("[rev]")&&(r=!0,e=e.replace(/\[rev]$/,""));var n=(e=e.replace(/\s/,"")).match(/({(.+)})?(.+)/);if(!n)throw new Error('invalid location string: "'.concat(e,'"'));var o=f(n,4),i=o[2],a=o[3];if(!i&&a.startsWith("{}"))throw new Error('no assembly name was provided in location "'.concat(a,'"'));var u=a.lastIndexOf(":");if(-1===u){if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('Unknown reference sequence "'.concat(a,'"'))}var c=a.slice(0,u),l=a.slice(u+1);if(t(c,i)&&t(a,i))throw new Error('ambiguous location string: "'.concat(e,'"'));if(t(c,i)){if(!l)return{assemblyName:i,refName:c,reversed:r};var s=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)(-?(\d+|\d{1,3}(,\d{3})*))$/),p=l.match(/^(-?(\d+|\d{1,3}(,\d{3})*))(\.\.|-)?$/);if(s){var d=f(s,6),h=d[1],y=d[5];if(void 0!==h&&void 0!==y)return{assemblyName:i,refName:c,start:+h.replaceAll(",",""),end:+y.replaceAll(",",""),reversed:r}}else{if(!p)throw new Error('could not parse range "'.concat(l,'" on location "').concat(e,'"'));var v=f(p,5),m=v[1],b=v[4];if(void 0!==m)return b?{assemblyName:i,refName:c,start:+m.replaceAll(",",""),reversed:r}:{assemblyName:i,refName:c,start:+m.replaceAll(",",""),end:+m.replaceAll(",",""),reversed:r}}}else if(t(a,i))return{assemblyName:i,refName:a,reversed:r};throw new Error('unknown reference sequence name in location "'.concat(e,'"'))}function T(e,t){var r=L(e,t);return"number"==typeof r.start&&(r.start-=1),r}function I(e,t){var r=e.assemblyName||t.assemblyName?(e.assemblyName||"").localeCompare(t.assemblyName||""):0;if(r)return r;var n=e.refName||t.refName?(e.refName||"").localeCompare(t.refName||""):0;if(n)return n;if(void 0!==e.start&&void 0!==t.start){var o=e.start-t.start;if(o)return o}if(void 0!==e.end&&void 0!==t.end){var i=e.end-t.end;if(i)return i}return 0}function M(e,t,r){var n,o=t.reversed,i=t.end,a=void 0===i?0:i,u=t.start;return n=(o?a-e:e-(void 0===u?0:u))/r,Math.round(10*n)/10}y(r(35795),t),y(r(21295),t),y(r(90369),t),y(r(98976),t),y(r(47254),t),y(r(95561),t),y(r(42731),t),t.useDebounce=function(e,t){var r=f((0,m.useState)(e),2),n=r[0],o=r[1];return(0,m.useEffect)((function(){var r=setTimeout((function(){o(e)}),t);return function(){clearTimeout(r)}}),[e,t]),n},t.useWidthSetter=function(e,t){var r=f((0,O.default)(),2),n=r[0],o=r[1].width;return(0,m.useEffect)((function(){o&&(0,g.isAlive)(e)&&requestAnimationFrame((function(){return e.setWidth(o-2*Number.parseInt(t,10))}))}),[t,e,o]),n},t.useDebouncedCallback=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:400,r=(0,m.useRef)(),n=(0,m.useRef)();function o(){n.current&&clearTimeout(n.current)}return(0,m.useEffect)((function(){return o}),[]),function(){for(var i=arguments.length,a=new Array(i),u=0;u3&&void 0!==arguments[3]?arguments[3]:function(){},i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:170,u=arguments.length>6&&void 0!==arguments[6]?arguments[6]:26;function c(e){var l=Date.now(),s=e.lastPosition,f=e.lastTime||l,p=e.lastVelocity||0;l>f+64&&(f=l);for(var d=Math.floor(l-f),h=0;hr?r:e},t.bpToPx=M;var R,N,F=180/Math.PI,D=Math.PI/180;function B(e,t,r,n){var o=M(e,r,n),i=M(t,r,n);return r.reversed?[i,o]:[o,i]}function z(e,t){if((0,g.isStateTreeNode)(t)&&!(0,g.isAlive)(t))return t;if(t&&(null==e?void 0:e[t.refName])){var r=e[(t=(0,g.isStateTreeNode)(t)?i({},(0,g.getSnapshot)(t)):i({},t)).refName];if(r)return i(i({},t),{},{refName:r,originalRefName:t.refName})}return t}function G(){return G=c(a().mark((function e(t,r){var n,o,u,l,f;return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=r.regions,o=void 0===n?[]:n,u=r.adapterConfig,r.sessionId){e.next=3;break}throw new Error("sessionId is required");case 3:return l=o.map((function(e){return e.assemblyName})),e.t0=Object,e.next=7,Promise.all(s(new Set(l)).map(function(){var e=c(a().mark((function e(n){return a().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.t0=n,e.next=3,t.getRefNameMapForAdapter(u,n,r);case 3:return e.t1=e.sent,e.abrupt("return",[e.t0,e.t1]);case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()));case 7:return e.t1=e.sent,f=e.t0.fromEntries.call(e.t0,e.t1),e.abrupt("return",i(i({},r),{},{regions:o.map((function(e,t){return z(f[l[t]],e)}))}));case 10:case"end":return e.stop()}}),e)}))),G.apply(this,arguments)}function U(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:70,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:30;return e.length>t?e.slice(0,r)+"..."+e.slice(-r):e}function H(e){return e.split("").reverse().join("")}t.radToDeg=function(e){return e*F%360},t.degToRad=function(e){return e*D%(2*Math.PI)},t.polarToCartesian=function(e,t){return[e*Math.cos(t),e*Math.sin(t)]},t.cartesianToPolar=function(e,t){return[Math.sqrt(e*e+t*t),Math.atan(t/e)]},t.featureSpanPx=function(e,t,r){return B(e.get("start"),e.get("end"),t,r)},t.bpSpanPx=B,t.iterMap=function(e,t,r){var n,o=Array.from({length:r||0}),i=0,a=l(e);try{for(a.s();!(n=a.n()).done;){var u=n.value;o[i]=t(u),i+=1}}catch(e){a.e(e)}finally{a.f()}return o},t.findLastIndex=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return r;return-1},t.findLast=function(e,t){for(var r=e.length;r--;)if(t(e[r],r,e))return e[r]},t.makeAbortableReaction=function(e,t,r,n,o,i,u){var l;function s(t){(0,A.isAbortException)(t)||((0,g.isAlive)(e)?u(t):console.error(t))}(0,g.addDisposer)(e,(0,w.reaction)((function(){try{return t(e)}catch(e){return void s(e)}}),function(){var t=c(a().mark((function t(n,u){var c,f;return a().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l&&!l.signal.aborted&&l.abort(),(0,g.isAlive)(e)){t.next=3;break}return t.abrupt("return");case 3:return l=new AbortController,o(c=l),t.prev=6,t.next=9,r(n,c.signal,e,u);case 9:f=t.sent,(0,A.checkAbortSignal)(c.signal),(0,g.isAlive)(e)&&i(f),t.next=18;break;case 14:t.prev=14,t.t0=t.catch(6),c&&!c.signal.aborted&&c.abort(),s(t.t0);case 18:case"end":return t.stop()}}),t,null,[[6,14]])})));return function(e,r){return t.apply(this,arguments)}}(),n)),(0,g.addDisposer)(e,(function(){l&&!l.signal.aborted&&l.abort()}))},t.renameRegionIfNeeded=z,t.renameRegionsIfNeeded=function(e,t){return G.apply(this,arguments)},t.minmax=function(e,t){return[Math.min(e,t),Math.max(e,t)]},t.shorten=U,t.stringify=function(e,t){var r=e.refName,n=e.coord,o=e.assemblyName,i=e.oob;return[o&&t?"{".concat(o,"}"):"",r?"".concat(U(r),":").concat(Y(n)).concat(i?" (out of bounds)":""):""].join("")},t.isElectron=/electron/i.test("undefined"!=typeof navigator?navigator.userAgent:""),t.revcom=function(e){return H((0,t.complement)(e))},t.reverse=H,t.complement=(R=/[ACGT]/gi,N={S:"S",w:"w",T:"A",r:"y",a:"t",N:"N",K:"M",x:"x",d:"h",Y:"R",V:"B",y:"r",M:"K",h:"d",k:"m",C:"G",g:"c",t:"a",A:"T",n:"n",W:"W",X:"X",m:"k",v:"b",B:"V",s:"s",H:"D",c:"g",D:"H",b:"v",R:"Y",G:"C"},function(e){return e.replaceAll(R,(function(e){return N[e]||""}))}),t.rIC="undefined"==typeof jest?"undefined"!=typeof window&&window.requestIdleCallback?window.requestIdleCallback:function(e){return setTimeout((function(){return e()}),1)}:function(e){return e()};var V=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.2796875,.2765625,.3546875,.5546875,.5546875,.8890625,.665625,.190625,.3328125,.3328125,.3890625,.5828125,.2765625,.3328125,.2765625,.3015625,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.5546875,.2765625,.2765625,.584375,.5828125,.584375,.5546875,1.0140625,.665625,.665625,.721875,.721875,.665625,.609375,.7765625,.721875,.2765625,.5,.665625,.5546875,.8328125,.721875,.7765625,.665625,.7765625,.721875,.665625,.609375,.721875,.665625,.94375,.665625,.665625,.609375,.2765625,.3546875,.2765625,.4765625,.5546875,.3328125,.5546875,.5546875,.5,.5546875,.5546875,.2765625,.5546875,.5546875,.221875,.240625,.5,.221875,.8328125,.5546875,.5546875,.5546875,.5546875,.3328125,.5,.2765625,.5546875,.5,.721875,.5,.5,.5,.3546875,.259375,.353125,.5890625];function W(e){for(var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=String(e),o=0,i=0;i]+)>)/gi,"")}function Z(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o>r?o:r}}catch(e){n.e(e)}finally{n.f()}return r}function ee(e){var t,r=0,n=l(e);try{for(n.s();!(t=n.n()).done;)r+=t.value}catch(e){n.e(e)}finally{n.f()}return r}function te(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5e3;if(e.length<=1)return e;var r=[],n=null;e=e.sort((function(e,t){return e.start-t.start})),r.push(e[0]);for(var o=1;o0?"".concat(Number.parseFloat((e/1e6).toPrecision(3)),"Mbp"):Math.floor(e/1e3)>0?"".concat(Number.parseFloat((e/1e3).toPrecision(3)),"Kbp"):"".concat(Y(Math.floor(e)),"bp")},t.toLocale=Y,t.getTickDisplayStr=function(e,t){return Math.floor(t/1e3)>0?"".concat(Y(Number.parseFloat((e/1e6).toFixed(2))),"M"):"".concat(Y(Math.floor(e)))},t.getViewParams=function(e,t){var r=C(e),n=r.dynamicBlocks,o=r.staticBlocks,i=r.offsetPx,a=(null==n?void 0:n.contentBlocks[0])||{},u=(null==o?void 0:o.contentBlocks[0])||{},c=(null==o?void 0:o.contentBlocks[1])||{};return{offsetPx:t?0:i-u.offsetPx,offsetPx1:t?0:i-c.offsetPx,start:a.start,end:a.end}},t.getLayoutId=function(e){return e.sessionId+"-"+e.layoutId},t.useLocalStorage=function(e,t){var r=f((0,m.useState)((function(){if("undefined"==typeof window)return t;try{var r=window.localStorage.getItem(e);return r?JSON.parse(r):t}catch(e){return console.error(e),t}})),2),n=r[0],o=r[1];return[n,function(t){try{var r=t instanceof Function?t(n):t;o(r),"undefined"!=typeof window&&window.localStorage.setItem(e,JSON.stringify(r))}catch(e){console.error(e)}}]},t.getUriLink=K,t.getStr=J,t.coarseStripHTML=X,t.linkify=function(e){return e.replaceAll(/(^|[\s\n]|<[A-Za-z]*\/?>)((?:https?|ftp):\/\/[\-A-Z0-9+\u0026\u2019@#\/%?=()~_|!:,.;]*[\-A-Z0-9+\u0026@#\/%=~()_|])/gi,"$1$2")},t.measureGridWidth=function(e,t){var r=t||{},n=r.padding,o=void 0===n?30:n,i=r.minWidth,a=void 0===i?80:i,u=r.fontSize,c=void 0===u?12:u,l=r.maxWidth,s=void 0===l?1e3:l,f=r.stripHTML,p=void 0!==f&&f;return Z(e.map((function(e){return J(e)})).map((function(e){return p?X(e):e})).map((function(e){return W(e,c)})).map((function(e){return Math.min(Math.max(e+o,a),s)})))},t.getEnv=function(e){return(0,g.getEnv)(e)},t.localStorageGetItem=function(e){return"undefined"!=typeof localStorage?localStorage.getItem(e):void 0},t.localStorageSetItem=function(e,t){return"undefined"!=typeof localStorage?localStorage.setItem(e,t):void 0},t.max=Z,t.min=function(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0,n=l(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;r=o{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=o.call(a,"catchLoc"),l=o.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&o.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==arguments[3]?arguments[3]:{},o=x[e];if(!o)throw new Error("fetch not registered for ".concat(e));return o(e,t,r,n)},size:500*Math.pow(1024,2),chunkSize:131072,maxFetchSize:100*Math.pow(1024,2),minimumTTL:864e5});t.clearCache=function(){O.reset()};var E=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),y(this,t,arguments)}var r,n,i,l;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),r=t,n=[{key:"fetch",value:(l=p(u().mark((function e(r,n){var o,i,a,l,s,f,p,d,h,y,v,g;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x[String(r)]||(x[String(r)]=this.fetchBinaryRange.bind(this)),(o=null==n?void 0:n.headers)&&(o instanceof Headers?i=o.get("range"):Array.isArray(o)?(a=o.find((function(e){return"range"===c(e,1)[0]}))||[void 0,void 0],l=c(a,2),i=l[1]):i=o.range),!i){e.next=14;break}if(!(s=/bytes=(\d+)-(\d+)/.exec(i))){e.next=14;break}return f=c(s,3),p=f[1],d=f[2],h=Number.parseInt(p,10),y=Number.parseInt(d,10),e.next=11,O.getRange(r,h,y-h+1,{signal:null==n?void 0:n.signal});case 11:return v=e.sent,g=v.headers,e.abrupt("return",new Response(v.buffer,{status:206,headers:g}));case 14:return e.abrupt("return",m(b(t.prototype),"fetch",this).call(this,r,n));case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return l.apply(this,arguments)})},{key:"fetchBinaryRange",value:(i=p(u().mark((function e(r,n,i){var l,s,f,p,d,h,y,v,g,w,A,x,O,E=arguments;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return l=E.length>3&&void 0!==E[3]?E[3]:{},s=new Date,f=a(a({},l.headers),{},{range:"bytes=".concat(n,"-").concat(i)}),e.next=5,m(b(t.prototype),"fetch",this).call(this,r,a(a({},l),{},{headers:f}));case 5:if(p=e.sent,d=new Date,206===p.status){e.next=11;break}throw h="HTTP ".concat(p.status," (").concat(p.statusText,") when fetching ").concat(r," bytes ").concat(n,"-").concat(i),new Error("".concat(h).concat(200===p.status?" (should be 206 for range requests)":""));case 11:y={},v=o(p.headers.entries());try{for(v.s();!(g=v.n()).done;)w=c(g.value,2),A=w[0],x=w[1],y[A]=x}catch(e){v.e(e)}finally{v.f()}return e.next=16,p.arrayBuffer();case 16:return O=e.sent,e.abrupt("return",{headers:y,requestDate:s,responseDate:d,buffer:S.Buffer.from(O)});case 18:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return i.apply(this,arguments)})}],n&&d(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(A.RemoteFile);t.RemoteFileWithRangeCache=E},87882:function(e,t,r){"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},4305:(e,t)=>{"use strict";function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,i=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw i}}}}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=r&&n>=e}var h=function(){function e(){c(this,e),this.padding=1,this.widthLimit=1e6}return s(e,[{key:"setAllFilled",value:function(e){this.allFilled=e}},{key:"getItemAt",value:function(e){var t;return this.allFilled?this.allFilled:void 0===(null===(t=this.rowState)||void 0===t?void 0:t.min)||e=this.rowState.max?void 0:this.rowState.bits[e-this.rowState.offset]}},{key:"isRangeClear",value:function(e,t){if(this.allFilled)return!1;if(void 0===this.rowState||t<=this.rowState.min||e>=this.rowState.max)return!0;for(var r=this.rowState,n=r.min,o=r.max,i=r.offset,a=r.bits,u=Math.min(o,t)-i,c=!0,l=Math.max(n,e)-i;l=this.rowState.bits.length){var c=a+1;this.rowState.bits.length+c>this.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):c>0&&(this.rowState.bits=[].concat(i(this.rowState.bits),i(Array.from({length:c}))))}if(rthis.widthLimit?(console.warn("Layout width limit exceeded, discarding old layout. Please be more careful about discarding unused blocks."),this.rowState=this.initialize(r,n)):(this.rowState.bits=[].concat(i(Array.from({length:l})),i(this.rowState.bits)),this.rowState.offset-=l)}var s=(a=n-this.rowState.offset)-(o=r-this.rowState.offset);s>2e4&&console.warn("Layout X pitch set too low, feature spans ".concat(s," bits in a single row."),e,t);for(var f=o;fthis.rowState.max&&(this.rowState.max=n)}},{key:"discardRange",value:function(e,t){if(!this.allFilled&&this.rowState&&!(t<=this.rowState.min||e>=this.rowState.max))if(e<=this.rowState.min&&t>=this.rowState.max)this.rowState=void 0;else{if(t>this.rowState.min&&e<=this.rowState.min&&(this.rowState.min=t),e=this.rowState.max&&(this.rowState.max=e),this.rowState.offsetthis.rowState.max+p-this.rowState.offset){var r=this.rowState.min-this.rowState.offset,n=this.rowState.bits.length-1-(this.rowState.max-this.rowState.offset);this.rowState.bits=this.rowState.bits.slice(r,this.rowState.bits.length-n),this.rowState.offset+=r}else if(this.rowState.offsetthis.rowState.max-this.rowState.offset+p){var i=this.rowState.max-this.rowState.offset+1+Math.floor(5e3);this.rowState.bits.length=i}for(var a=Math.max(this.rowState.min,e)-this.rowState.offset,u=Math.min(t,this.rowState.max)-this.rowState.offset,c=a;c>=0&&c0&&void 0!==arguments[0]?arguments[0]:{},r=t.pitchX,n=void 0===r?10:r,o=t.pitchY,i=void 0===o?10:o,a=t.maxHeight,u=void 0===a?1e4:a,l=t.hardRowLimit,s=void 0===l?1e4:l,f=t.displayMode,p=void 0===f?"normal":f;c(this,e),this.pitchX=n,this.pitchY=i,this.hardRowLimit=s,this.maxHeightReached=!1,this.displayMode=p,"compact"===this.displayMode&&(this.pitchY=Math.round(this.pitchY/4)||1,this.pitchX=Math.round(this.pitchX/4)||1),this.bitmap=[],this.rectangles=new Map,this.maxHeight=Math.ceil(u/this.pitchY),this.pTotalHeight=0}return s(e,[{key:"addRect",value:function(e,t,r,n,o){var i=this.rectangles.get(e);if(i)return null===i.top?null:(this.addRectToBitmap(i),i.top*this.pitchY);var a=Math.floor(t/this.pitchX),u=Math.floor(r/this.pitchX),c=Math.ceil(n/this.pitchY),l={id:e,l:a,r:u,top:null,h:c,originalHeight:n,data:o},s=this.maxHeight-c,f=0;if("collapse"!==this.displayMode){for(;f<=s&&this.collides(l,f);f+=1);if(f>s)return l.top=null,this.rectangles.set(e,l),this.maxHeightReached=!0,null}return l.top=f,this.addRectToBitmap(l),this.rectangles.set(e,l),this.pTotalHeight=Math.max(this.pTotalHeight||0,f+c),f*this.pitchY}},{key:"collides",value:function(e,t){for(var r=this.bitmap,n=t+e.h,o=t;othis.hardRowLimit)throw new Error("layout hard limit (".concat(this.hardRowLimit*this.pitchY,"px) exceeded, aborting layout"));r=new h,e[t]=r}return r}},{key:"addRectToBitmap",value:function(e){if(null!==e.top){var t=e.id,r=e.top+e.h;if(e.r-e.l>2e4)for(var n=e.top;n{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:{};!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.SubLayoutClass=t,this.subLayoutConstructorArgs=r,this.subLayouts=new Map}var t,r;return t=e,r=[{key:"getDataByID",value:function(e){var t,r=n(this.subLayouts.values());try{for(r.s();!(t=r.n()).done;){var o=t.value.getDataByID(e);if(o)return o}}catch(e){r.e(e)}finally{r.f()}}},{key:"getSublayout",value:function(e){var t=this.subLayouts.get(e);return void 0===t?(t=new this.SubLayoutClass(this.subLayoutConstructorArgs),this.subLayouts.set(e,t),t):t}},{key:"addRect",value:function(e,t,r,n,o){var i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return this.getSublayout(e).addRect(t,r,n,o,i)}},{key:"discardRange",value:function(e,t,r){var n;return null===(n=this.subLayouts.get(e))||void 0===n?void 0:n.discardRange(t,r)}},{key:"toJSON",value:function(){var e,t,r,i={},a=n(this.subLayouts.entries());try{for(a.s();!(e=a.n()).done;){var u=(t=e.value,r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||o(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),c=u[0],l=u[1];i[c]=l.toJSON()}}catch(e){a.e(e)}finally{a.f()}return i}}],r&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},18609:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ra&&(this.width+=t-a),void 0!==u&&rc&&(this.height+=n-c),this.parent&&this.parent.expand(e,t,r,n),this.absoluteCache.dirty=!0}},{key:"bottom",get:function(){return this.top+this.height}},{key:"right",get:function(){return this.left+this.width}},{key:"walkParents",value:function(e){this.parent&&(e(this.parent),this.parent.walkParents(e))}},{key:"walkChildren",value:function(e){var t,r=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(this.children.values());try{for(r.s();!(t=r.n()).done;){var o=t.value;e(o),o.walkChildren(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"absolute",get:function(){if(this.absoluteCache.dirty){var e=0,t=0;this.walkParents((function(r){e+=r.left,t+=r.top})),this.absoluteCache={dirty:!1,left:this.left+e,right:this.right+e,top:this.top+t,bottom:this.bottom+t,width:this.width,height:this.height}}return this.absoluteCache}},{key:"move",value:function(e,t){this.left+=e,this.top+=t,this.absoluteCache.dirty=!0,this.walkChildren((function(e){e.absoluteCache.dirty=!0}));var r=this.absolute,n=r.left,o=r.right,i=r.top,a=r.bottom;void 0!==n&&void 0!==o&&void 0!==i&&void 0!==a&&this.expand(n,o,i,a)}}])&&o(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=a},2545:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.SceneGraph=t.PrecomputedMultiLayout=t.PrecomputedLayout=t.MultiLayout=t.GranularRectLayout=void 0,o(r(43054),t);var a=r(4305);Object.defineProperty(t,"GranularRectLayout",{enumerable:!0,get:function(){return i(a).default}});var u=r(28874);Object.defineProperty(t,"MultiLayout",{enumerable:!0,get:function(){return i(u).default}});var c=r(18609);Object.defineProperty(t,"PrecomputedLayout",{enumerable:!0,get:function(){return i(c).default}});var l=r(61028);Object.defineProperty(t,"PrecomputedMultiLayout",{enumerable:!0,get:function(){return i(l).default}});var s=r(28925);Object.defineProperty(t,"SceneGraph",{enumerable:!0,get:function(){return i(s).default}})},683:(e,t)=>{"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return"object"===r(e)&&null!==e},o=function(e){return n(e)&&!(e instanceof RegExp)&&!(e instanceof Error)&&!(e instanceof Date)&&!(globalThis.Blob&&e instanceof globalThis.Blob)};t.default=function e(t,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(!i.has(t)){i.add(t);var a=function(t){return t.forEach((function(t){r(t),n(t)&&e(t,r,i)}))};Array.isArray(t)&&a(t);for(var u=0,c=Object.values(t);u{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveLateType=t.getEnumerationValues=t.getDefaultValue=t.getPropertyType=t.getUnionSubTypes=t.getSubType=void 0;var n=r(72731);function o(e){var t;if((0,n.isOptionalType)(e))t=e._subtype||e.type;else{if(!(0,n.isArrayType)(e)&&!(0,n.isMapType)(e)){if("function"==typeof e.getSubType)return e.getSubType();throw new TypeError("unsupported mst type")}t=e._subtype||e._subType||e.subType}if(!t)throw new Error("failed to get subtype");return t}function i(e){if(!(0,n.isUnionType)(e))throw new TypeError("not an MST union type");var t=e._types||e.types||o(e)._types||o(e).types;if(!t)throw new Error("failed to extract subtypes from mst union");return t}t.getSubType=o,t.getUnionSubTypes=i,t.getPropertyType=function(e,t){return e.properties[t]},t.getDefaultValue=function(e){if(!(0,n.isOptionalType)(e))throw new TypeError("type must be an optional type");return e._defaultValue||e.defaultValue},t.getEnumerationValues=function(e){return i(e).map((function(e){return e.value}))},t.resolveLateType=function(e){return(0,n.isUnionType)(e)||(0,n.isArrayType)(e)||!(0,n.isLateType)(e)?e:e.getSubType()}},16342:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nanoid=t.customAlphabet=t.customRandom=t.random=t.urlAlphabet=void 0,t.urlAlphabet="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",t.random=function(e){return crypto.getRandomValues(new Uint8Array(e))},t.customRandom=function(e,t,r){var n=(2<0&&void 0!==arguments[0]?arguments[0]:t,a="";;)for(var u=r(o),c=o;c--;)if((a+=e[u[c]&n]||"").length===i)return a}},t.customAlphabet=function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:21;return(0,t.customRandom)(e,r,t.random)},t.nanoid=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:21;return crypto.getRandomValues(new Uint8Array(e)).reduce((function(e,t){return e+((t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_")}),"")}},95561:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))}}var u=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.drawImageOntoCanvasContext=t.ImageBitmapType=t.createImageBitmap=t.createCanvas=void 0;var c=u(r(87836)),l=r(11135);t.drawImageOntoCanvasContext=function(e,t){e.serializedCommands?new l.CanvasSequence(e.serializedCommands).execute(t):t.drawImage(e,0,0)};var s="function"==typeof OffscreenCanvas,f=c.default;s?(t.createCanvas=function(e,t){return new OffscreenCanvas(e,t)},t.createImageBitmap=window.createImageBitmap||self.createImageBitmap,t.ImageBitmapType=window.ImageBitmap||self.ImageBitmap):f?(t.createCanvas=function(){return nodeCreateCanvas.apply(void 0,arguments)},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r,n,i=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((i.length<=1?0:i.length-1)>0)){e.next=2;break}throw new Error("only one-argument uses of createImageBitmap are supported by the node offscreencanvas ponyfill");case 2:return r=t.toDataURL(),n=new nodeImage,e.abrupt("return",new Promise((function(e,t){n.onload=function(){return e(n)},n.onerror=t,n.src=r})));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):(t.createCanvas=function(e,t){var r=new l.CanvasSequence;return{width:e,height:t,getContext:function(){return r}}},t.createImageBitmap=function(){var e=a(o().mark((function e(t){var r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.getContext("2d"),e.abrupt("return",{height:t.height,width:t.width,serializedCommands:r.toJSON(),containsNoTransferables:!0});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),t.ImageBitmapType=String)},42731:function(e,t,r){"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isContainedWithin=t.doesIntersect2=t.intersection2=void 0,t.intersection2=function(e,t,r,n){return t>r&&er?tr&&e=t}},99376:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObservableCreate=void 0;var n=r(16733),o=r(44059),i=r(57525);t.ObservableCreate=function(e,t){return n.Observable.create((function(t){try{var r=e(t);r&&r.catch&&r.catch((function(e){return t.error(e)}))}catch(e){t.error(e)}})).pipe((0,o.takeUntil)((0,i.observeAbortSignal)(t)))}},77021:(e,t)=>{"use strict";function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function n(e){for(var t=1;t=0))throw new Error("invalid feature data, end less than start. end: ".concat(this.data.end," start: ").concat(this.data.start));this.data.subfeatures&&(this.subfeatures=null===(r=this.data.subfeatures)||void 0===r?void 0:r.map((function(t,r){return"function"!=typeof t.get?new e({id:t.uniqueId||"".concat(i,"-").concat(r),data:n({strand:o.data.strand},t),parent:o}):t})))}var t,r,i;return t=e,i=[{key:"fromJSON",value:function(t){return new e(n({},t))}}],(r=[{key:"get",value:function(e){return"subfeatures"===e?this.subfeatures:"parent"===e?this.parent():this.data[e]}},{key:"set",value:function(e,t){this.data[e]=t}},{key:"tags",value:function(){return Object.keys(this.data)}},{key:"id",value:function(){return this.uniqueId}},{key:"parent",value:function(){return this.parentHandle}},{key:"children",value:function(){return this.get("subfeatures")}},{key:"toJSON",value:function(){var e=n(n({},this.data),{},{uniqueId:this.id()}),t=this.parent();t&&(e.parentId=t.id());var r=this.children();return r&&(e.subfeatures=r.map((function(e){return e.toJSON()}))),e}}])&&o(t.prototype,r),i&&o(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();t.default=c},12590:(e,t,r)=>{"use strict";function n(){n=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(n,a,u,c){var l=d(e[n],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var n;a(this,"_invoke",{value:function(e,o){function i(){return new t((function(t,n){r(e,o,t,n)}))}return n=n?n.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,a=function r(){for(;++n=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;t3&&void 0!==arguments[3]&&arguments[3]?n=t/r-e*e/(r*r):(n=t-e*e/r,r>1&&(n/=r-1)),n<0?0:Math.sqrt(n))}function f(e){return u(u({},e),{},{scoreMean:(e.scoreSum||0)/(e.featureCount||e.basesCovered||1),scoreStdDev:s(e.scoreSum,e.scoreSumSquares,e.featureCount||e.basesCovered),featureDensity:(e.featureCount||1)/e.basesCovered})}function p(){var e;return e=n().mark((function e(t,r){var o,i,a,u,s,p,d,h,y,v;return n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=t.start,i=t.end,a={scoreMin:Number.MAX_VALUE,scoreMax:Number.MIN_VALUE,scoreSum:0,scoreSumSquares:0,featureCount:0},u=!1,e.next=5,(0,c.firstValueFrom)(r.pipe((0,l.reduce)((function(e,t){var r=t.get("score"),n=t.get("summary"),o=e.scoreMax,i=e.scoreMin;return e.scoreMax=Math.max(o,n?t.get("maxScore"):r),e.scoreMin=Math.min(i,n?t.get("minScore"):r),e.scoreSum+=r,e.scoreSumSquares+=r*r,e.featureCount+=1,u=!0,e}),a)));case 5:return s=e.sent,p=s.scoreMin,d=s.scoreMax,h=s.scoreSum,y=s.scoreSumSquares,v=s.featureCount,e.abrupt("return",u?f({scoreMax:d,scoreMin:p,scoreSum:h,scoreSumSquares:y,featureCount:v,basesCovered:i-o+1}):{scoreMin:0,scoreMax:0,scoreMean:0,scoreStdDev:0,scoreSum:0,scoreSumSquares:0,featureCount:0,featureDensity:0,basesCovered:0});case 12:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},p.apply(this,arguments)}t.calcStdFromSums=s,t.rectifyStats=f,t.calcPerBaseStats=function(e,t){for(var r=e.start,n=e.end,o=[],i=t.sort((function(e,t){return e.get("start")-t.get("start")})),a=r,u=0,c=0;a=i[u].get("end");)u+=1;var l=i[u];l&&a>=l.get("start")&&a{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getTrackName=t.generateUnknownTrackConf=t.generateUnsupportedTrackConf=t.guessTrackType=t.guessAdapter=t.getFileName=t.makeIndexType=t.makeIndex=t.storeBlobLocation=t.setBlobMap=t.getBlobMap=t.getBlob=t.UNSUPPORTED=t.UNKNOWN=t.getParentRenderProps=t.getRpcSessionId=t.getTrackAssemblyNames=void 0;var n=r(72731),o=r(57525),i=r(54133);t.getTrackAssemblyNames=function(e){var t=(0,i.getConf)(e,"assemblyNames");if(!t){var r=(0,n.getParent)(e.configuration);if("sequence"in r)return[(0,i.readConfObject)(r,"name")]}return t},t.getRpcSessionId=function(e){for(var t,r=e;!(0,n.isRoot)(r);r=(0,n.getParent)(r))"rpcSessionId"in r&&(t=r.rpcSessionId);if(!t)throw new Error("getRpcSessionId failed, no parent node in the state tree has an `rpcSessionId` attribute");return t},t.getParentRenderProps=function(e){for(var t=(0,n.getParent)(e);!(0,n.isRoot)(t);t=(0,n.getParent)(t))if("renderProps"in t)return t.renderProps();return{}},t.UNKNOWN="UNKNOWN",t.UNSUPPORTED="UNSUPPORTED";var a={};t.getBlob=function(e){return a[e]},t.getBlobMap=function(){return a},t.setBlobMap=function(e){a=e};var u=0;t.storeBlobLocation=function(e){if(e&&"blob"in e){var t="b".concat(+Date.now(),"-").concat(u++);return a[t]=e.blob,{name:null==e?void 0:e.blob.name,blobId:t,locationType:"BlobLocation"}}return e},t.makeIndex=function(e,t){return"uri"in e?{uri:e.uri+t,locationType:"UriLocation"}:"localPath"in e?{localPath:e.localPath+t,locationType:"LocalPathLocation"}:e},t.makeIndexType=function(e,t,r){return(null==e?void 0:e.toUpperCase().endsWith(t))?t:r},t.getFileName=function(e){var t="uri"in e?e.uri:void 0,r="localPath"in e?e.localPath:void 0,n="blobId"in e?e:void 0;return(null==n?void 0:n.name)||(null==t?void 0:t.slice(t.lastIndexOf("/")+1))||(null==r?void 0:r.slice(r.lastIndexOf("/")+1))||""},t.guessAdapter=function(e,r,n,i){if(i){var a=(0,o.getEnv)(i).pluginManager.evaluateExtensionPoint("Core-guessAdapterForLocation",(function(e,t,r){}))(e,r,n);if(a)return a}return{type:t.UNKNOWN}},t.guessTrackType=function(e,t){if(t){var r=(0,o.getSession)(t),n=(0,o.getEnv)(r).pluginManager.evaluateExtensionPoint("Core-guessTrackTypeForLocation",(function(e){}))(e);if(n)return n}return"FeatureTrack"},t.generateUnsupportedTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unsupported)"),description:'Support not yet implemented for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.generateUnknownTrackConf=function(e,t,r){var n={type:"FeatureTrack",name:"".concat(e," (Unknown)"),description:'Could not determine track type for "'.concat(t,'"'),category:r,trackId:""};return n.trackId=(0,o.objectHash)(n),n},t.getTrackName=function(e,t){var r=(0,i.readConfObject)(e,"name");if(!r&&"ReferenceSequenceTrack"===(0,i.readConfObject)(e,"type")){var n=t.assemblies.find((function(t){return t.sequence===e}));return n?"Reference sequence (".concat((0,i.readConfObject)(n,"displayName")||(0,i.readConfObject)(n,"name"),")"):"Reference sequence"}return r}},35795:function(e,t,r){"use strict";function n(e,t){for(var r=0;r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.FileLocation=t.UriLocation=t.UriLocationRaw=t.BlobLocation=t.LocalPathLocation=t.Region=t.NoAssemblyRegion=t.PropTypes=t.ElementId=void 0;var s=r(72731),f=l(r(43979)),p=r(46186),d=r(16342);t.ElementId=s.types.optional(s.types.identifier,(function(){return(0,d.nanoid)()})),t.PropTypes={Region:f.default.shape({refName:f.default.string.isRequired,start:f.default.number.isRequired,end:f.default.number.isRequired}),ConfigSchema:p.PropTypes.objectOrObservableObject,Feature:f.default.shape({get:f.default.func.isRequired,id:f.default.func.isRequired})},t.NoAssemblyRegion=s.types.model("NoAssemblyRegion",{refName:s.types.string,start:s.types.number,end:s.types.number,reversed:s.types.optional(s.types.boolean,!1)}).actions((function(e){return{setRefName:function(t){e.refName=t}}})),t.Region=s.types.compose("Region",t.NoAssemblyRegion,s.types.model({assemblyName:s.types.string})),t.LocalPathLocation=s.types.model("LocalPathLocation",{locationType:s.types.literal("LocalPathLocation"),localPath:s.types.string}),t.BlobLocation=s.types.model("BlobLocation",{locationType:s.types.literal("BlobLocation"),name:s.types.string,blobId:s.types.string}),t.UriLocationRaw=s.types.model("UriLocation",{locationType:s.types.literal("UriLocation"),uri:s.types.string,baseUri:s.types.maybe(s.types.string),internetAccountId:s.types.maybe(s.types.string),internetAccountPreAuthorization:s.types.maybe(s.types.model("InternetAccountPreAuthorization",{internetAccountType:s.types.string,authInfo:s.types.frozen()}))}),t.UriLocation=s.types.snapshotProcessor(t.UriLocationRaw,{postProcessor:function(e){var t=e.baseUri,r=c(e,o);return t?e:r}}),t.FileLocation=s.types.snapshotProcessor(s.types.union(t.LocalPathLocation,t.UriLocation,t.BlobLocation),{preProcessor:function(e){if(e){var t=e.locationType,r=c(e,i);if(!t){var n=r.uri,o=r.localPath,a=r.blob,l="";return void 0!==n?l="UriLocation":void 0!==o?l="LocalPathLocation":void 0!==a&&(l="BlobLocation"),u(u({},r),{},{locationType:l})}return e}}})},6619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},14480:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(){o=function(){return t};var e,t={},r=Object.prototype,i=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&i.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,o){r(e,n,t,o)}))}return o=o?o.then(i,i):i()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--o){var a=this.tryEntries[o],u=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var c=i.call(a,"catchLoc"),l=i.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function i(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}Object.defineProperty(t,"__esModule",{value:!0}),t.whenPresent=t.when=void 0;var a=r(77090),u=r(21295);function c(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.timeout,n=t.signal,o=t.name;return new Promise((function(t,i){var c,l=!1,s=(0,a.when)(e),f=function(){};r&&(c=setTimeout((function(){l||(l=!0,s.cancel(),i(new Error("timed out waiting for ".concat(o||"whenPresent"))))}),r),f=function(){return c&&clearTimeout(c)}),n&&n.addEventListener("abort",(function(){l||(l=!0,s.cancel(),f(),i((0,u.makeAbortError)()))})),s.then((function(){l||(l=!0,f(),t(!0))})).catch((function(e){l||(l=!0,f(),i(e))}))}))}function l(){var e;return e=o().mark((function e(t){var r,n=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=3,c((function(){return null!=t()}),r);case 3:return e.abrupt("return",t());case 4:case"end":return e.stop()}}),e)})),l=function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function u(e){i(a,n,o,u,c,"next",e)}function c(e){i(a,n,o,u,c,"throw",e)}u(void 0)}))},l.apply(this,arguments)}t.when=c,t.whenPresent=function(e){return l.apply(this,arguments)}},481:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(41486),o=r.n(n),i=r(91118),a=r(15542),u=r(56588),c=r(87931),l=(0,r(3024).makeStyles)()({content:{minWidth:800}});function s(e){var t=e.open,r=e.version,n=e.onClose,s=l().classes;return o().createElement(c.Dialog,{open:t,onClose:n,maxWidth:"xl",title:"JBrowse v".concat(r)},o().createElement(i.A,{className:s.content},o().createElement(a.A,null,"JBrowse is a GMOD project © 2019-2021, The Evolutionary Software Foundation"),o().createElement(a.A,null,"Here are some resources and documentation. Please report the version number above when asking questions. Thanks!"),o().createElement("ul",null,o().createElement("li",null,o().createElement(u.A,{href:"https://github.com/GMOD/jbrowse-components/discussions",target:"_blank",rel:"noopener noreferrer"},"Question & answer forum")),o().createElement("li",null,o().createElement(u.A,{href:"https://github.com/GMOD/jbrowse-components/issues/new/choose",target:"_blank",rel:"noopener noreferrer"},"Report a bug")),o().createElement("li",null,o().createElement(u.A,{href:"https://jbrowse.org/jb2/docs/user_guide",target:"_blank",rel:"noopener noreferrer"},"User guide")),o().createElement("li",null,o().createElement(u.A,{href:"https://jbrowse.org/jb2/docs/",target:"_blank",rel:"noopener noreferrer"},"Documentation")))))}},69504:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>he});var n=r(41486),o=r.n(n),i=r(92770),a=r(46186),u=r(42738),c=r.n(u),l=r(52313),s=r(57525);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e,t){return y.apply(this,arguments)}function y(){var e;return e=p().mark((function e(t,r){var n,o;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=(0,s.getSession)(r),o=r.view,e.prev=2,!o){e.next=8;break}return e.next=6,o.navToLocString(t);case 6:e.next=9;break;case 8:throw new Error("No view associated with this view anymore");case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),n.notify("".concat(e.t0));case 15:case"end":return e.stop()}}),e,null,[[2,11]])})),y=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))},y.apply(this,arguments)}var v={AM:"The smallest template-independent mapping quality in the template",AS:"Alignment score generated by aligner",BC:"Barcode sequence identifying the sample",BQ:"Offset to base alignment quality (BAQ)",BZ:"Phred quality of the unique molecular barcode bases in the {OX} tag",CB:"Cell identifier",CC:"Reference name of the next hit",CM:"Edit distance between the color sequence and the color reference (see also {NM})",CO:"Free-text comments",CP:"Leftmost coordinate of the next hit",CQ:"Color read base qualities",CR:"Cellular barcode sequence bases (uncorrected)",CS:"Color read sequence",CT:"Complete read annotation tag, used for consensus annotation dummy features",CY:"Phred quality of the cellular barcode sequence in the {CR} tag",E2:"The 2nd most likely base calls",FI:"The index of segment in the template",FS:"Segment suffix",FZ:"Flow signal intensities",GC:"Reserved for backwards compatibility reasons",GQ:"Reserved for backwards compatibility reasons",GS:"Reserved for backwards compatibility reasons",H0:"Number of perfect hits",H1:"Number of 1-difference hits (see also {NM})",H2:"Number of 2-difference hits",HI:"Query hit index",IH:"Query hit total count",LB:"Library",MC:"CIGAR string for mate/next segment",MD:"String encoding mismatched and deleted reference bases",MF:"Reserved for backwards compatibility reasons",MI:"Molecular identifier; a string that uniquely identifies the molecule from which the record was derived",ML:"Base modification probabilities",MM:"Base modifications / methylation ",MQ:"Mapping quality of the mate/next segment",NH:"Number of reported alignments that contain the query in the current record",NM:"Edit distance to the reference",OA:"Original alignment",OC:"Original CIGAR (deprecated; use {OA} instead)",OP:"Original mapping position (deprecated; use {OA} instead)",OQ:"Original base quality",OX:"Original unique molecular barcode bases",PG:"Program",PQ:"Phred likelihood of the template",PT:"Read annotations for parts of the padded read sequence",PU:"Platform unit",Q2:"Phred quality of the mate/next segment sequence in the {R2} tag",QT:"Phred quality of the sample barcode sequence in the {BC} tag",QX:"Quality score of the unique molecular identifier in the {RX} tag",R2:"Sequence of the mate/next segment in the template",RG:"Read group",RT:"Reserved for backwards compatibility reasons",RX:"Sequence bases of the (possibly corrected) unique molecular identifier",S2:"Reserved for backwards compatibility reasons",SA:"Other canonical alignments in a chimeric alignment",SM:"Template-independent mapping quality",SQ:"Reserved for backwards compatibility reasons",TC:"The number of segments in the template",TS:"Transcript strand",U2:"Phred probability of the 2nd call being wrong conditional on the best being wrong",UQ:"Phred likelihood of the segment, conditional on the mapping being correct"},m=r(15542),b=r(56588),g=r(63801);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=g.prototype=m.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==w(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function A(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function F(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?B(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rBottom panel"},o().createElement(b.A,{href:"#",className:a.cursor,onClick:function(e){e.preventDefault(),u.queueDialog((function(e){return[z,{handleClose:e,f1:c,f2:l,model:t,viewType:i}]}))}},c.refName,":",(0,s.toLocale)(1===c.strand?c.end:c.start)," ->"," ",l.refName,":",(0,s.toLocale)(1===l.strand?l.start:l.end))))})))):null)}function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function V(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function W(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?o().createElement(o().Fragment,null,o().createElement("button",{type:"button",onClick:function(){ae()(s),l(!0),setTimeout((function(){return l(!1)}),700)}},c?"Copied to clipboard":"Copy"),o().createElement("button",{type:"button",onClick:function(){return a((function(e){return!e}))}},i?"Show less":"Show more"),o().createElement("div",null,i?s:"".concat(s.slice(0,100),"..."))):o().createElement("div",null,s)}function se(e){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},se(e)}function fe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pe(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>_});var n=r(41486),o=r.n(n),i=r(46186),a=r(33774),u=r(11898),c=r(91118),l=r(45342),s=r(64568),f=r(3024),p=r(57525),d=r(87931);function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var P=(0,f.makeStyles)()({block:{display:"block"}});function k(e){return e.map((function(e){e.id;var t=e.displays;return E(E({},j(e,g)),{},{displays:t.map((function(e){return e.id,j(e,w)}))})}))}function C(e){var t=e.checked,r=e.label,n=e.onChange,i=P().classes;return o().createElement(a.A,{className:i.block,control:o().createElement(u.A,{checked:t,onChange:n}),label:r})}const _=(0,i.observer)((function(e){var t=e.model,r=e.handleClose,i=e.f1,a=e.f2,u=S((0,n.useState)(!0),2),f=u[0],h=u[1],y=S((0,n.useState)(!0),2),b=y[0],g=y[1];return o().createElement(d.Dialog,{open:!0,onClose:r,title:"Breakpoint split view options"},o().createElement(c.A,null,o().createElement(C,{checked:f,onChange:function(e){return h(e.target.checked)},label:"Copy tracks into the new view"}),o().createElement(C,{checked:b,onChange:function(e){return g(e.target.checked)},label:"Mirror tracks vertically in vertically stacked view"})),o().createElement(l.A,null,o().createElement(s.A,{onClick:function(){var e,n=t.view,o=(0,p.getSession)(t);try{var u=function(e){var t=e.f1,r=e.f2,n=e.view,o=n.displayedRegions[0].assemblyName,i=(0,p.getSession)(n).assemblyManager.get(o);if(!i)throw new Error("assembly ".concat(o," not found"));if(!i.regions)throw new Error("assembly ".concat(o," regions not loaded"));var a=i.regions.find((function(e){return e.refName===t.refName})),u=i.regions.find((function(e){return e.refName===r.refName}));if(!a||!u)throw new Error("unable to find the refName for the top or bottom of the breakpoint view");var c=[v({},a),v({},a)],l=[v({},u),v({},u)],s=1===t.strand?t.end:t.start,f=1===r.strand?r.start:r.end;return c[0].end=s,c[1].start=s+1,l[0].end=f,l[1].start=f+1,{type:"BreakpointSplitView",views:[{type:"LinearGenomeView",displayedRegions:c,hideHeader:!0,bpPerPx:10,offsetPx:(a.start+s)/10},{type:"LinearGenomeView",displayedRegions:l,hideHeader:!0,bpPerPx:10,offsetPx:(u.start+f)/10}],displayName:"breakend split detail"}}({view:n,f1:i,f2:a}),c=S(u.views,2),l=c[0],s=c[1],f=(0,m.getSnapshot)(n.tracks);o.addView("BreakpointSplitView",E(E({},u),{},{views:[E(E({},l),{},{tracks:k(f),offsetPx:l.offsetPx-n.width/2+100}),E(E({},s),{},{tracks:k(b?(e=f,function(e){if(Array.isArray(e))return x(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||A(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reverse():f),offsetPx:s.offsetPx-n.width/2+100})]}))}catch(e){console.error(e),o.notify("".concat(e))}r()},variant:"contained",color:"primary",autoFocus:!0},"OK"),o().createElement(s.A,{onClick:function(){return r()},color:"secondary",variant:"contained"},"Cancel")))}))},35905:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>L});var n=r(62777),o=r(88605),i=r(57525),a=r(87882),u=r(99376),c=r(83809),l=r(69191),s=r(63801);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function A(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function x(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){A(i,n,o,a,u,"next",e)}function u(e){A(i,n,o,a,u,"throw",e)}a(void 0)}))}}function O(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>uo});const n=1,o=2,i=4,a=8,u=1,c=2,l=4,s=8,f=16,p=32,d=64,h=128,y=256,v=512,m=1024,b=2048;function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{var o=function(){var e,n,o=(e=t.value,n=2,function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,n)||A(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),i=o[0],a=o[1];r["is"+a]=function(e){return!!(e&i)},r["set"+a]=function(e){return e|i}};for(n.s();!(t=n.n()).done;)o()}catch(e){n.e(e)}finally{n.f()}return r}var j=E([[1,"Paired"],[2,"ProperlyPaired"],[4,"SegmentUnmapped"],[8,"MateUnmapped"],[16,"ReverseComplemented"],[32,"MateReverseComplemented"],[64,"Read1"],[128,"Read2"],[256,"Secondary"],[512,"FailedQc"],[1024,"Duplicate"],[2048,"Supplementary"]]),P=E([[1,"PreservingQualityScores"],[2,"Detached"],[4,"WithMateDownstream"],[8,"DecodeSequenceAsStar"]]),k=E([[1,"OnNegativeStrand"],[2,"Unmapped"]]),C=function(){function e(t){var r=t.flags,n=t.cramFlags,o=t.readLength,i=t.mappingQuality,a=t.lengthOnRef,u=t.qualityScores,c=t.mateRecordNumber,l=t.readBases,s=t.readFeatures,f=t.mateToUse,p=t.readGroupId,d=t.readName,h=t.sequenceId,y=t.uniqueId,v=t.templateSize,m=t.alignmentStart,b=t.tags;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.flags=r,this.cramFlags=n,this.readLength=o,this.mappingQuality=i,this.lengthOnRef=a,this.qualityScores=u,l&&(this.readBases=l),this.readGroupId=p,this.readName=d,this.sequenceId=h,this.uniqueId=y,this.templateSize=v,this.alignmentStart=m,this.tags=b,s&&(this.readFeatures=s),f&&(this.mate={flags:f.mateFlags,readName:f.mateReadName,sequenceId:f.mateSequenceId,alignmentStart:f.mateAlignmentStart}),c&&(this.mateRecordNumber=c)}var t,r;return t=e,(r=[{key:"isPaired",value:function(){return!!(this.flags&u)}},{key:"isProperlyPaired",value:function(){return!!(this.flags&c)}},{key:"isSegmentUnmapped",value:function(){return!!(this.flags&l)}},{key:"isMateUnmapped",value:function(){return!!(this.flags&s)}},{key:"isReverseComplemented",value:function(){return!!(this.flags&f)}},{key:"isMateReverseComplemented",value:function(){return!!(this.flags&p)}},{key:"isRead1",value:function(){return!!(this.flags&d)}},{key:"isRead2",value:function(){return!!(this.flags&h)}},{key:"isSecondary",value:function(){return!!(this.flags&y)}},{key:"isFailedQc",value:function(){return!!(this.flags&v)}},{key:"isDuplicate",value:function(){return!!(this.flags&m)}},{key:"isSupplementary",value:function(){return!!(this.flags&b)}},{key:"isDetached",value:function(){return!!(this.cramFlags&o)}},{key:"hasMateDownStream",value:function(){return!!(this.cramFlags&i)}},{key:"isPreservingQualityScores",value:function(){return!!(this.cramFlags&n)}},{key:"isUnknownBases",value:function(){return!!(this.cramFlags&a)}},{key:"getReadBases",value:function(){if(!this.readBases&&this._refRegion){var e=function(e,t){if(!e.lengthOnRef&&!e.readLength)return null;if(e.isUnknownBases())return null;var r=e.alignmentStart-t.start;if(!e.readFeatures)return t.seq.slice(r,r+(e.lengthOnRef||0)).toUpperCase();for(var n="",o=r,i=0;n.lengththis.mate.alignmentStart&&i>0&&(i=-i),i>0?(o[0]=e,o[1]=r,o[2]=t,o[3]=n):(o[2]=e,o[3]=r,o[0]=t,o[1]=n),o.join("")}return null}},{key:"addReferenceSequence",value:function(e,t){this.readFeatures&&this.readFeatures.forEach((function(r){"X"===r.code&&function(e,t,r,n){if(t){var o=n.refPos-t.start,i=t.seq.charAt(o);i&&(n.ref=i);var a=O[i];void 0===a&&(a=4);var u=r.substitutionMatrix[a][n.data];u&&(n.sub=u)}}(0,e,t,r)})),!this.readBases&&e.start<=this.alignmentStart&&e.end>=this.alignmentStart+(this.lengthOnRef||this.readLength)-1&&(this._refRegion=e)}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){r.startsWith("_")||(t[r]=e[r])})),t.readBases=this.getReadBases(),t}}])&&w(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),_=r(159),L=r(85832).Buffer;function T(e){return L.from((0,_.inflate)(e))}var I=r(76548),M=r(84137),R=r.n(M),N=r(98905),F=r.n(N),D=r(16970),B=r.n(D),z=r(2068);function G(e){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},G(e)}function U(e,t){for(var r=0;r>n)+(e&(1<>o)+(e&(1<1&&void 0!==arguments[1]?arguments[1]:0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._buffer=t,this._position=r,this.length=t.length}var t,r;return t=e,(r=[{key:"get",value:function(){var e=this._buffer[this._position];return this._position+=1,e}},{key:"getByte",value:function(){return this.get()}},{key:"getByteAt",value:function(e){return this._buffer[e]}},{key:"position",value:function(){return this._position}},{key:"put",value:function(e){return this._buffer[this._position]=e,this._position+=1,e}},{key:"putAt",value:function(e,t){return this._buffer[e]=t,t}},{key:"setPosition",value:function(e){return this._position=e,e}},{key:"getInt",value:function(){var e=this._buffer.readInt32LE(this._position);return this._position+=4,e}},{key:"remaining",value:function(){return this._buffer.length-this._position}}])&&be(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Se(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;if(0===e.length)return t.fill(0),t;var n=new we(e,r),o=n.get();if(0!==o&&1!==o)throw new ee("Invalid rANS order ".concat(o));if(n.getInt()!==n.remaining()-4)throw new ee("Incorrect input length.");var i=n.getInt(),a=new we(t||ve.allocUnsafe(i));if(a.length=128&&(t.fc[i].F&=-129,t.fc[i].F=(127&t.fc[i].F)<<8|255&e.get()),t.fc[i].C=o,he.symbolInit(r[i],t.fc[i].C,t.fc[i].F),t.R||(t.R=new Array(oe)),t.R.fill(i,o,o+t.fc[i].F),o+=t.fc[i].F,0===n&&i+1===(255&e.getByteAt(e.position()))?(i=255&e.get(),n=255&e.get()):0!==n?(n-=1,i+=1):i=255&e.get()}while(0!==i);ye(o=128&&(t[o].fc[u].F&=-129,t[o].fc[u].F=(127&t[o].fc[u].F)<<8|255&e.get()),t[o].fc[u].C=a,0===t[o].fc[u].F&&(t[o].fc[u].F=oe),null==r[o][u]&&(r[o][u]=new he.RansDecSymbol),he.symbolInit(r[o][u],t[o].fc[u].C,t[o].fc[u].F),null==t[o].R&&(t[o].R=new Array(oe)),t[o].R.fill(u,a,a+t[o].fc[u].F),ye((a+=t[o].fc[u].F)<=oe),0===i&&u+1===(255&e.getByteAt(e.position()))?(u=255&e.get(),i=255&e.get()):0!==i?(i-=1,u+=1):u=255&e.get()}while(0!==u);0===n&&o+1===(255&e.getByteAt(e.position()))?(o=255&e.get(),n=255&e.get()):0!==n?(n-=1,o+=1):o=255&e.get()}while(0!==o)}(e,r,o),function(e,t,r,n){for(var o=t.remaining(),i=e.getInt(),a=e.getInt(),u=e.getInt(),c=e.getInt(),l=o>>2,s=0,f=l,p=2*l,d=3*l,h=0,y=0,v=0,m=0;se.length)&&(t=e.length);for(var r=0,n=new Array(t);ro&&n.push(t(o,r)),n}}),Ce=(new Ae.i).uint8(null,{formatter:function(e){return!!e}}),_e=(new Ae.i).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Ae.i).string("key",{length:2,stripNull:!1}).choice("value",{tag:"key",choices:{MI:Ce,UI:Ce,PI:Ce,RN:Ce,AP:Ce,RR:Ce,SM:(new Ae.i).array(null,{type:"uint8",length:5}),TD:(new Ae.i).nest(null,{type:ke,formatter:function(e){return e.ents}})}})});function Le(e){var t,r={},n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return xe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?xe(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.ents);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.key,a=o.value;r[i]&&console.warn("duplicate key ".concat(i," in map")),r[i]=a}}catch(e){n.e(e)}finally{n.f()}return r}var Te={cramFileDefinition:Ee,cramBlockHeader:je,cramBlockCrc32:Pe};function Ie(e){return"number"==typeof e.refSeqId}var Me={cramUnmappedSliceHeader:function(e){var t=0,r=(new Ae.i).itf8("numRecords");return t+=5,e>=3?(r=r.ltf8("recordCounter"),t+=9):2===e&&(r=r.itf8("recordCounter"),t+=5),r=r.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:Oe,length:"numContentIds"}),t+=10,e>=2&&(r=r.array("md5",{type:"uint8",length:16}),t+=16),{parser:r,maxLength:function(e){return t+5*e}}},cramMappedSliceHeader:function(e){var t=(new Ae.i).itf8("refSeqId").itf8("refSeqStart").itf8("refSeqSpan").itf8("numRecords"),r=20;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),t=t.itf8("numBlocks").itf8("numContentIds").array("contentIds",{type:Oe,length:"numContentIds"}).itf8("refBaseBlockId"),r+=15,e>=2&&(t=t.array("md5",{type:"uint8",length:16}),r+=16),{parser:t,maxLength:function(e){return r+5*e}}},cramEncoding:function(e){return{parser:(new Ae.i).namely("cramEncoding").itf8("codecId").itf8("parametersBytes").choice("parameters",{tag:"codecId",choices:{0:new Ae.i,1:(new Ae.i).itf8("blockContentId"),2:(new Ae.i).itf8("offset").itf8("M"),3:Ae.i.start().itf8("numCodes").array("symbols",{length:"numCodes",type:Oe}).itf8("numLengths").array("bitLengths",{length:"numLengths",type:Oe}),4:Ae.i.start().nest("lengthsEncoding",{type:"cramEncoding"}).nest("valuesEncoding",{type:"cramEncoding"}),5:(new Ae.i).uint8("stopByte").itf8("blockContentId"),6:(new Ae.i).itf8("offset").itf8("length"),7:(new Ae.i).itf8("offset").itf8("K"),8:(new Ae.i).itf8("offset").itf8("log2m"),9:(new Ae.i).itf8("offset")}})}},cramDataSeriesEncodingMap:function(e){return(new Ae.i).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Ae.i).string("key",{length:2,stripNull:!1}).nest("value",{type:this.cramEncoding(e).parser})})},cramTagEncodingMap:function(e){return(new Ae.i).itf8("mapSize").itf8("mapCount").array("ents",{length:"mapCount",type:(new Ae.i).itf8("key",{formatter:function(e){return String.fromCharCode(e>>16&255)+String.fromCharCode(e>>8&255)+String.fromCharCode(255&e)}}).nest("value",{type:this.cramEncoding(e).parser})})},cramCompressionHeader:function(e){var t=new Ae.i;return{parser:t=t.nest("preservation",{type:_e,formatter:Le}).nest("dataSeriesEncoding",{type:this.cramDataSeriesEncodingMap(e),formatter:Le}).nest("tagEncoding",{type:this.cramTagEncodingMap(e),formatter:Le})}},cramContainerHeader1:function(e){var t=(new Ae.i).int32("length").itf8("refSeqId").itf8("refSeqStart").itf8("alignmentSpan").itf8("numRecords"),r=24;return e>=3?(t=t.ltf8("recordCounter"),r+=9):2===e&&(t=t.itf8("recordCounter"),r+=5),e>1&&(t=t.ltf8("numBases"),r+=9),{parser:t=t.itf8("numBlocks").itf8("numLandmarks"),maxLength:r+=10}},cramContainerHeader2:function(e){var t=(new Ae.i).itf8("numLandmarks").array("landmarks",{type:(new Ae.i).itf8(),length:"numLandmarks"}),r=0;return e>=3&&(t=t.uint32("crc32"),r=4),{parser:t,maxLength:function(e){return 5+5*e+r}}}};function Re(e){var t=Object.assign({},Te);return Object.keys(Me).forEach((function(r){t[r]=Me[r](e)})),t}var Ne=r(94542),Fe=r.n(Ne);function De(e){return De="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},De(e)}function Be(e){var t="function"==typeof Map?new Map:void 0;return Be=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(ze())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&Ge(o,r.prototype),o}(e,arguments,Ue(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ge(r,e)},Be(e)}function ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ze=function(){return!!e})()}function Ge(e,t){return Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ge(e,t)}function Ue(e){return Ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ue(e)}var He=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=arguments,r=Ue(r=t),function(e,t){if(t&&("object"===De(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,ze()?Reflect.construct(r,n||[],Ue(e).constructor):r.apply(e,n));var e,r,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ge(e,t)}(t,e),r=t,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(Be(Error));function Ve(e,t,r){var n=0;if(t.bytePosition+(7-t.bitPosition+r)/8>e.length)throw new He("read error during decoding. the file seems to be truncated.");for(var o=r;o;o--)n<<=1,n|=e[t.bytePosition]>>t.bitPosition&1,t.bitPosition-=1,t.bitPosition<0&&(t.bytePosition+=1),t.bitPosition&=7;return n}function We(e){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},We(e)}function qe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=t.parse(e),i=o.offset;return Qe(Qe({},o.result),{},{_endPosition:i+n,_size:i-r})}function Ye(e,t){var r=e.prototype[t],n="_memo_".concat(t);e.prototype[t]=function(){var e=this;if(!(n in this)){var t=r.call(this);this[n]=t,Promise.resolve(t).catch((function(){delete e[n]}))}return this[n]}}function Ke(e){return Fe()(e.toUpperCase().replaceAll(/[^\u0021-\u007e]/g,""))}var Je=r(12899),Xe=r.n(Je);function Ze(e,t){if(e){if("string"==typeof e)return et(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?et(e,t):void 0}}function et(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&-2===n.parsedContent.refSeqId?t("RI"):n.parsedContent.refSeqId,p=t("RL"),d=t("AP");r.APdelta&&(d+=a.lastAlignmentStart),a.lastAlignmentStart=d;var h,y,v,m,b=t("RG");if(r.readNamesIncluded&&(h=tt(t("RN"))),P.isDetached(s)){var g,w=t("MF");r.readNamesIncluded||(h=g=tt(t("RN")));var S=t("NS"),A=t("NP");(w||S>-1)&&(y={mateFlags:w,mateSequenceId:S,mateAlignmentStart:A,mateReadName:g}),v=t("TS"),k.isUnmapped(w)&&(l=j.setMateUnmapped(l)),k.isOnNegativeStrand(w)&&(l=j.setMateReverseComplemented(l))}else P.isWithMateDownstream(s)&&(m=t("NF")+c+1);var x=t("TL");if(x<0)throw new ee("invalid TL index");for(var O,E,C,_,L={},T=r.getTagNames(x),I=T.length,M=0;M1?"SC":"IN"],X:["number","BS"],D:["number","DL"],I:["string","IN"],i:["character","BA"],b:["string","BB"],q:["numArray","QQ"],Q:["number","QS"],H:["number","HC"],P:["number","PD"],N:["number","RS"]}[s];if(!p)throw new ee('invalid read feature code "'.concat(s,'"'));var d=c(p),h={B:["number","QS"]}[s];h&&(d=[d,c(h)]);var y=i+=f,v=a+=f;"D"===s||"N"===s?a+=d:"I"===s||"S"===s?a-=d.length:"i"===s&&(a-=1),u[l]={code:s,pos:y,refPos:v,data:d}}return u}(d,V,t,0,u)),E=p,O){var W,q=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Ze(e))){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(O);try{for(q.s();!(W=q.n()).done;){var Q=W.value,$=Q.code,Y=Q.data;"D"===$||"N"===$?E+=Y:"I"===$||"S"===$?E-=Y.length:"i"===$&&(E-=1)}}catch(e){q.e(e)}finally{q.f()}}if(Number.isNaN(E)&&(console.warn("".concat(h||"".concat(f,":").concat(d)," record has invalid read features")),E=p),C=t("MQ"),P.isPreservingQualityScores(s)){_=new Array(p);for(var K=0;K<_.length;K++)_[K]=t("QS")}}return{readLength:p,sequenceId:f,cramFlags:s,flags:l,alignmentStart:d,readGroupId:b,readName:h,mateToUse:y,templateSize:v,mateRecordNumber:m,readFeatures:O,lengthOnRef:E,mappingQuality:C,qualityScores:_,readBases:z,tags:L}}function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}function it(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=ht(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function at(){at=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==ot(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ut(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ct(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0){var o=e[r.mateRecordNumber];if(!o)throw new ee("intra-slice mate record not found, this file seems malformed");n.push.apply(n,dt(t(o)))}return n}(r),o=n.map((function(e){return e.alignmentStart})),i=n.map((function(e){return e.alignmentStart+e.readLength-1})),a=Math.max.apply(Math,dt(i))-Math.min.apply(Math,dt(o))+1;a>=0&&n.forEach((function(e){if(void 0!==e.templateLength)throw new ee("mate pair group has some members that have template lengths already, this file seems malformed");e.templateLength=a}))}(e,0,r):function(e,t){var r=Math.min(e.alignmentStart,t.alignmentStart),n=Math.max(e.alignmentStart+e.readLength-1,t.alignmentStart+t.readLength-1)-r+1;e.templateLength=n,t.templateLength=n}(r,n)),delete r.mateRecordNumber}var mt=function(){function e(t,r,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.container=t,this.containerPosition=r,this.file=t.file}var t,r,n,o,i,a,u,c,l,s;return t=e,r=[{key:"getHeader",value:(s=st(at().mark((function e(){var t,r,n,o,i;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getSectionParsers();case 2:return t=e.sent,e.next=5,this.container.getHeader();case 5:return r=e.sent,e.next=8,this.file.readBlock(r._endPosition+this.containerPosition);case 8:if(void 0!==(n=e.sent)){e.next=11;break}throw new Error("block header undefined");case 11:if("MAPPED_SLICE_HEADER"!==n.contentType){e.next=16;break}return o=$e(n.content,t.cramMappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",ct(ct({},n),{},{parsedContent:o}));case 16:if("UNMAPPED_SLICE_HEADER"!==n.contentType){e.next=21;break}return i=$e(n.content,t.cramUnmappedSliceHeader.parser,0,r._endPosition),e.abrupt("return",ct(ct({},n),{},{parsedContent:i}));case 21:throw new ee("error reading slice header block, invalid content type ".concat(n.contentType));case 22:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getBlocks",value:(l=st(at().mark((function e(){var t,r,n,o,i;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:t=e.sent,r=t._endPosition,n=new Array(t.parsedContent.numBlocks),o=0;case 6:if(!(o=0)){e.next=19;break}return e.next=15,this.getBlockByContentId(t.refBaseBlockId);case 15:if(n=e.sent){e.next=18;break}throw new ee("embedded reference specified, but reference block does not exist");case 18:return e.abrupt("return",{seq:n.data.toString("utf8"),start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 19:if(!r.referenceRequired&&!this.file.fetchReferenceSequenceCallback){e.next=28;break}if(this.file.fetchReferenceSequenceCallback){e.next=22;break}throw new Error("reference sequence not embedded, and seqFetch callback not provided, cannot fetch reference sequence");case 22:return e.next=24,this.file.fetchReferenceSequenceCallback(t.refSeqId,t.refSeqStart,t.refSeqStart+t.refSeqSpan-1);case 24:if((o=e.sent).length===t.refSeqSpan){e.next=27;break}throw new re("seqFetch callback returned a reference sequence of the wrong length");case 27:return e.abrupt("return",{seq:o,start:t.refSeqStart,end:t.refSeqStart+t.refSeqSpan-1,span:t.refSeqSpan});case 28:return e.abrupt("return",void 0);case 29:case"end":return e.stop()}}),e,this)}))),function(){return i.apply(this,arguments)})},{key:"getAllRecords",value:function(){return this.getRecords((function(){return!0}))}},{key:"_fetchRecords",value:(o=st(at().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.file.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.next=6,this.container.getCompressionScheme();case 6:if(void 0!==(n=e.sent)){e.next=9;break}throw new Error("compression scheme undefined");case 9:return e.next=11,this.getHeader();case 11:if(void 0!==(o=e.sent)){e.next=14;break}throw new Error("slice header undefined");case 14:return e.next=16,this._getBlocksContentIdIndex();case 16:if(i=e.sent,!(r>1&&this.file.options.checkSequenceMD5&&Ie(o.parsedContent)&&o.parsedContent.refSeqId>=0&&"0000000000000000"!==o.parsedContent.md5.join(""))){e.next=27;break}return e.next=20,this.getReferenceRegion();case 20:if(!(a=e.sent)){e.next=27;break}if(u=a.seq,c=a.start,l=a.end,s=Ke(u),f=o.parsedContent.md5.map((function(e){return(e<16?"0":"")+e.toString(16)})).join(""),s===f){e.next=27;break}throw new ee("MD5 checksum reference mismatch for ref ".concat(o.parsedContent.refSeqId," pos ").concat(c,"..").concat(l,". recorded MD5: ").concat(f,", calculated MD5: ").concat(s));case 27:return e.next=29,this.getCoreDataBlock();case 29:p=e.sent,d={lastAlignmentStart:Ie(o.parsedContent)?o.parsedContent.refSeqStart:0,coreBlock:{bitPosition:7,bytePosition:0},externalBlocks:{map:new Map,getCursor:function(e){var t=this.map.get(e);return void 0===t&&(t={bitPosition:7,bytePosition:0},this.map.set(e,t)),t}}},h=function(e){var t=n.getCodecForDataSeries(e);if(!t)throw new ee("no codec defined for ".concat(e," data series"));return t.decode(w,p,i,d)},y=new Array(o.parsedContent.numRecords),v=0;case 34:if(!(v=0&&vt(y,b,y[b],y[g]);return e.abrupt("return",y);case 54:case"end":return e.stop()}}),e,this,[[35,40]])}))),function(){return o.apply(this,arguments)})},{key:"getRecords",value:(n=st(at().mark((function e(t){var r,n,o,i,a,u,c,l,s,f,p,d,h,y,v,m,b,g,w,S,A=this;return at().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.container.filePosition+this.containerPosition,(n=this.file.featureCache.get(r.toString()))||(n=this._fetchRecords(),this.file.featureCache.set(r.toString(),n)),e.next=5,n;case 5:if(o=e.sent,!(i=o.filter(t)).length||!this.file.fetchReferenceSequenceCallback){e.next=25;break}return e.next=10,this.getHeader();case 10:if(!Ie((a=e.sent).parsedContent)||!(a.parsedContent.refSeqId>=0||-2===a.parsedContent.refSeqId)){e.next=25;break}return u=a.parsedContent.refSeqId>=0?a.parsedContent.refSeqId:void 0,e.next=15,this.container.getCompressionScheme();case 15:if(void 0!==(c=e.sent)){e.next=18;break}throw new Error("compression scheme undefined");case 18:l={},s=it(i);try{for(s.s();!(f=s.n()).done;)p=f.value,d=void 0!==u?u:p.sequenceId,(h=l[d])||(h={id:d,start:p.alignmentStart,end:-1/0,seq:null},l[d]=h),(y=p.alignmentStart+(p.lengthOnRef||p.readLength)-1)>h.end&&(h.end=y),p.alignmentStarte.length)&&(t=e.length);for(var r=0,n=new Array(t);r>1)&1431655765))+(a>>2&858993459))+(a>>4)&252645135)>>24>l)throw new ee("Symbol out of range");e.codes[n]=o}))}))}},{key:"buildCaches",value:function(){this.sortedCodes=Object.values(this.codes).sort((function(e,t){return e.bitLength-t.bitLength||e.bitCode-t.bitCode})),this.sortedValuesByBitCode=this.sortedCodes.map((function(e){return e.value})),this.sortedBitCodes=this.sortedCodes.map((function(e){return e.bitCode})),this.sortedBitLengthsByBitCode=this.sortedCodes.map((function(e){return e.bitLength}));var e,t=Math.max.apply(Math,function(e){if(Array.isArray(e))return Et(e)}(e=this.sortedBitCodes)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ot(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());this.bitCodeToValue=new Array(t+1).fill(-1);for(var r=0;r-1&&this.sortedBitLengthsByBitCode[c]===u)return this.sortedValuesByBitCode[c];for(var l=a;this.sortedCodes[l+1].bitLength===u&&le.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)throw new He("Attempted to read beyond end of buffer; this file seems truncated.");return[r,n-t]}(e.content,t.bytePosition),i=(n=2,function(e){if(Array.isArray(e))return e}(r=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||function(e,t){if(e){if("string"==typeof e)return Mt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mt(e,t):void 0}}(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1];return t.bytePosition=t.bytePosition+u,a}},{key:"_decodeByte",value:function(e,t){if(t.bytePosition>=e.content.length)throw new He("attempted to read beyond end of block. this file seems truncated.");return e.content[t.bytePosition++]}}])&&Rt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(At);function Ut(e){return Ut="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ut(e)}function Ht(e,t){for(var r=0;r>6&3]="C",t[0][e[0]>>4&3]="G",t[0][e[0]>>2&3]="T",t[0][e[0]>>0&3]="N",t[1][e[1]>>6&3]="A",t[1][e[1]>>4&3]="G",t[1][e[1]>>2&3]="T",t[1][e[1]>>0&3]="N",t[2][e[2]>>6&3]="A",t[2][e[2]>>4&3]="C",t[2][e[2]>>2&3]="T",t[2][e[2]>>0&3]="N",t[3][e[3]>>6&3]="A",t[3][e[3]>>4&3]="C",t[3][e[3]>>2&3]="G",t[3][e[3]>>0&3]="N",t[4][e[4]>>6&3]="A",t[4][e[4]>>4&3]="C",t[4][e[4]>>2&3]="G",t[4][e[4]>>0&3]="T",t}(t.preservation.SM),this.dataSeriesEncoding=t.dataSeriesEncoding,this.tagEncoding=t.tagEncoding,this.preservation=t.preservation,this._size=t._size,this._endPosition=t._endPosition}var t,r;return t=e,(r=[{key:"getCodecForTag",value:function(e){if(!this.tagCodecCache[e]){var t=this.tagEncoding[e];t&&(this.tagCodecCache[e]=kr(t,"byteArray"))}return this.tagCodecCache[e]}},{key:"getTagNames",value:function(e){return this.tagIdsDictionary[e]}},{key:"getCodecForDataSeries",value:function(e){var t=this.dataSeriesCodecCache[e];if(void 0===t){var r=this.dataSeriesEncoding[e];if(r){var n=Tr[e];if(!n)throw new ee("data series name ".concat(e," not defined in file compression header"));t=kr(r,n),this.dataSeriesCodecCache[e]=t}}return t}},{key:"toJSON",value:function(){var e=this,t={};return Object.keys(this).forEach((function(r){r.endsWith("Cache")||(t[r]=e[r])})),t}}])&&_r(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Mr=r(85832).Buffer;function Rr(e){return Rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Rr(e)}function Nr(){Nr=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Rr(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Fr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Dr(e){for(var t=1;t=a)){e.next=10;break}return e.abrupt("return",void 0);case 10:return u=Mr.allocUnsafe(n.maxLength),e.next=13,this.file.read(u,0,n.maxLength,t);case 13:if(d=(c=$e(u,n.parser)).numLandmarks,l=-128&d?-16384&d?-2097152&d?-268435456&d?5:4:3:2:1,!(t+c.length>=a)){e.next=18;break}return console.warn("".concat(this.file,": container header at ").concat(t," indicates that the container has length ").concat(c.length,", which extends beyond the length of the file. Skipping this container.")),e.abrupt("return",void 0);case 18:return s=Mr.allocUnsafe(o.maxLength(c.numLandmarks)),e.next=21,this.file.read(s,0,o.maxLength(c.numLandmarks),t+c._size-l);case 21:if(f=$e(s,o.parser),!this.file.validateChecksums||void 0===f.crc32){e.next=25;break}return e.next=25,this.file.checkCrc32(t,c._size+f._size-l-4,f.crc32,"container header beginning at position ".concat(t));case 25:return p=Object.assign(c,f,{_size:c._size+f._size-l,_endPosition:c._size+f._size-l+t}),e.abrupt("return",p);case 27:case"end":return e.stop()}var d}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&Gr(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getHeader getCompressionHeaderBlock getCompressionScheme".split(" ").forEach((function(e){return Ye(Hr,e)}));var Vr=r(23842),Wr=r(39962);function qr(e,t,r){if(r)return r;if(e)return n=e,o=Vr.parse(n),i=o.protocol,a=o.pathname,"file:"===i?new Wr.LocalFile(unescape(function(e){if(null==e)throw new Error("Value must not be nullish.");return e}(a))):new Wr.RemoteFile(n);var n,o,i,a;if(t)return new Wr.LocalFile(t);throw new Error("no url, path, or filehandle provided, cannot open")}function Qr(e,t){if(e){if("string"==typeof e)return $r(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$r(e,t):void 0}}function $r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.split(/\r?\n/));try{for(o.s();!(t=o.n()).done;){var i=function(e){if(Array.isArray(e))return e}(r=t.value.split(/\t/))||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||Qr(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=i[0],u=i.slice(1);a&&n.push({tag:a.slice(1),data:u.map((function(e){var t=e.indexOf(":");return-1!==t?{tag:e.slice(0,t),value:e.slice(t+1)}:{tag:e,value:""}}))})}}catch(e){o.e(e)}finally{o.f()}return n}var Kr=r(85832).Buffer;function Jr(e){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Jr(e)}function Xr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Zr(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function tn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function rn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){tn(i,n,o,a,u,"next",e)}function u(e){tn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function nn(e,t){for(var r=0;r0)throw new Error("Detected big-endian machine, may be unable to run")}var t,r,n,o,i,a,u,c,l,s,f,p,d;return t=e,r=[{key:"read",value:function(e,t,r,n){return this.file.read(e,t,r,n)}},{key:"stat",value:function(){return this.file.stat()}},{key:"getDefinition",value:(d=rn(en().mark((function e(){var t,r;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Kr.allocUnsafe(Ee.maxLength),e.next=3,this.file.read(t,0,Ee.maxLength,0);case 3:if(2===(r=Ee.parser.parse(t).result).majorVersion||3===r.majorVersion){e.next=6;break}throw new Z("CRAM version ".concat(r.majorVersion," not supported"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getSamHeader",value:(p=rn(en().mark((function e(){var t,r,n,o,i;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getContainerById(0);case 2:if(t=e.sent){e.next=5;break}throw new ee("file contains no containers");case 5:return e.next=7,t.getFirstBlock();case 7:if(void 0!==(r=e.sent)){e.next=10;break}return e.abrupt("return",Yr(""));case 10:return n=r.content,o=n.readInt32LE(0),i=n.toString("utf8",4,4+o),this.header=i,e.abrupt("return",Yr(i));case 16:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getHeaderText",value:(f=rn(en().mark((function e(){return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSamHeader();case 2:return e.abrupt("return",this.header);case 3:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"getSectionParsers",value:(s=rn(en().mark((function e(){var t,r;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDefinition();case 2:return t=e.sent,r=t.majorVersion,e.abrupt("return",Re(r));case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getContainerById",value:(l=rn(en().mark((function e(t){var r,n,o,i,a,u,c,l,s,f;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getSectionParsers();case 2:return r=e.sent,n=r.cramFileDefinition.maxLength,e.next=6,this.file.stat();case 6:o=e.sent,i=o.size,a=r.cramContainerHeader1,c=0;case 10:if(!(c<=t)){e.next=38;break}if(!(n+a.maxLength+8>=i)){e.next=13;break}return e.abrupt("return",void 0);case 13:return u=this.getContainerAtPosition(n),e.next=16,u.getHeader();case 16:if(l=e.sent){e.next=19;break}throw new ee("container ".concat(t," not found in file"));case 19:if(0!==c){e.next=34;break}n=l._endPosition,s=0;case 22:if(!(s=i)){e.next=10;break}return e.abrupt("return",void 0);case 10:return a=Kr.allocUnsafe(n.maxLength),e.next=13,this.file.read(a,0,n.maxLength,t);case 13:return e.abrupt("return",$e(a,n.parser,0,t));case 14:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"_parseSection",value:(i=rn(en().mark((function e(t,r){var n,o,i,a,u,c,l=arguments;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=l.length>2&&void 0!==l[2]?l[2]:t.maxLength,!(o=l.length>3&&void 0!==l[3]?l[3]:void 0)){e.next=6;break}i=o,e.next=15;break;case 6:return e.next=8,this.file.stat();case 8:if(a=e.sent,u=a.size,!(r+n>=u)){e.next=12;break}return e.abrupt("return",void 0);case 12:return i=Kr.allocUnsafe(n),e.next=15,this.file.read(i,0,n,r);case 15:if((c=$e(i,t.parser,0,r))._size===n){e.next=18;break}throw new ee("section read error: requested size ".concat(n," does not equal parsed size ").concat(c._size));case 18:return e.abrupt("return",c);case 19:case"end":return e.stop()}}),e,this)}))),function(e,t){return i.apply(this,arguments)})},{key:"_uncompress",value:(o=rn(en().mark((function e(t,r,n){var o,i,a,u,c;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("gzip"!==t){e.next=5;break}T(r).copy(n),e.next=43;break;case 5:if("bzip2"!==t){e.next=12;break}o=B().array(r),i=B().header(o),a=0;do{-1!=(u=B().decompress(o,i))&&(Kr.from(u).copy(n,a),a+=u.length,i-=u.length)}while(-1!=u);e.next=43;break;case 12:if("lzma"!==t){e.next=22;break}return c=new Response(new z.XzReadableStream(an(r))),e.t0=Kr,e.next=17,c.arrayBuffer();case 17:e.t1=e.sent,e.t0.from.call(e.t0,e.t1).copy(n),e.next=43;break;case 22:if("rans"!==t){e.next=26;break}Se(r,n),e.next=43;break;case 26:if("rans4x16"!==t){e.next=30;break}F().r4x16_uncompress(r,n),e.next=43;break;case 30:if("arith"!==t){e.next=34;break}F().arith_uncompress(r,n),e.next=43;break;case 34:if("fqzcomp"!==t){e.next=38;break}F().fqzcomp_uncompress(r,n),e.next=43;break;case 38:if("tok3"!==t){e.next=42;break}F().tok3_uncompress(r,n),e.next=43;break;case 42:throw new Z("".concat(t," decompression not yet implemented"));case 43:case"end":return e.stop()}}),e)}))),function(e,t,r){return o.apply(this,arguments)})},{key:"readBlock",value:(n=rn(en().mark((function e(t){var r,n,o,i,a,u,c,l,s;return en().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getDefinition();case 2:return r=e.sent,n=r.majorVersion,e.next=6,this.getSectionParsers();case 6:return o=e.sent,e.next=9,this.readBlockHeader(t);case 9:if(void 0!==(i=e.sent)){e.next=12;break}return e.abrupt("return",void 0);case 12:if(a=i._endPosition,u=Kr.allocUnsafe(i.uncompressedSize),c=Zr(Zr({},i),{},{_endPosition:a,contentPosition:a,content:u}),"raw"===i.compressionMethod){e.next=23;break}return l=Kr.allocUnsafe(i.compressedSize),e.next=19,this.read(l,0,i.compressedSize,a);case 19:return e.next=21,this._uncompress(i.compressionMethod,l,u);case 21:e.next=25;break;case 23:return e.next=25,this.read(u,0,i.uncompressedSize,a);case 25:if(!(n>=3)){e.next=39;break}return e.next=28,this._parseSection(o.cramBlockCrc32,a+i.compressedSize);case 28:if(void 0!==(s=e.sent)){e.next=31;break}return e.abrupt("return",void 0);case 31:if(c.crc32=s.crc32,!this.validateChecksums){e.next=35;break}return e.next=35,this.checkCrc32(t,i._size+i.compressedSize,s.crc32,"block data");case 35:c._endPosition=s._endPosition,c._size=c.compressedSize+o.cramBlockCrc32.maxLength,e.next=41;break;case 39:c._endPosition=a+c.compressedSize,c._size=c.compressedSize;case 41:return e.abrupt("return",c);case 42:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})}],r&&nn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();"getDefinition getSectionParsers getSamHeader".split(" ").forEach((function(e){return Ye(un,e)}));var cn=r(87791),ln=r.n(cn);function sn(e){return sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},sn(e)}function fn(){fn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==sn(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function pn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function dn(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){pn(i,n,o,a,u,"next",e)}function u(e){pn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function hn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=bn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function yn(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r4&&21578050===t.readUInt32LE(0))throw new ee("invalid .crai index file. note: file appears to be a .bai index. this is technically legal but please open a github issue if you need support");var r,n=[],o="",i=hn(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;if(a>=48&&a<=57||!o&&45===a)o+=String.fromCharCode(a);else if(9===a)n.push(Number.parseInt(o,10)),o="";else if(10===a)n.push(Number.parseInt(o,10)),o="",wn(e,n),n=[];else if(13!==a&&32!==a)throw new ee("invalid .crai index file")}}catch(e){i.e(e)}finally{i.f()}return o&&n.push(Number.parseInt(o,10)),6===n.length&&wn(e,n),Object.entries(e).forEach((function(t){var r=mn(t,2),n=r[0],o=r[1];e[n]=o.sort((function(e,t){return e.start-t.start||e.span-t.span}))})),e}))}},{key:"getIndex",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._parseCache.get("index",null,e.signal)}},{key:"hasDataForReferenceSequence",value:(o=dn(fn().mark((function e(t){return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return e.t0=t,e.abrupt("return",!!e.sent[e.t0]);case 4:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"getEntriesForRange",value:(n=dn(fn().mark((function e(t,r,n){var o,i,a,u,c,l;return fn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:if(e.t0=t,o=e.sent[e.t0]){e.next=6;break}return e.abrupt("return",[]);case 6:i=function(e){var t=e.start,o=e.start+e.span;return t>n?-1:o<=r?1:0},a=[],u=hn(o);try{for(u.s();!(c=u.n()).done;)l=c.value,0===i(l)&&a.push(l)}catch(e){u.e(e)}finally{u.f()}return e.abrupt("return",a);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t,r){return n.apply(this,arguments)})}],r&&yn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function An(e){return An="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},An(e)}function xn(){xn=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==An(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function On(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=jn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function En(e){return function(e){if(Array.isArray(e))return Pn(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jn(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function jn(e,t){if(e){if("string"==typeof e)return Pn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Pn(e,t):void 0}}function Pn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r3&&void 0!==D[3]?D[3]:{}).viewAsPairs=i.viewAsPairs||!1,i.pairAcrossChr=i.pairAcrossChr||!1,i.maxInsertSize=i.maxInsertSize||2e5,"string"!=typeof t){e.next=6;break}throw new Z("string sequence names not yet supported");case 6:return a=t,e.next=9,this.index.getEntriesForRange(a,r,n);case 9:if(u=e.sent,!((c=u.map((function(e){return e.sliceBytes})).reduce((function(e,t){return e+t}),0))>this.fetchSizeLimit)){e.next=13;break}throw new te("data size of ".concat(c.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 13:return l=function(e){return e.sequenceId===t&&e.alignmentStart<=n&&void 0!==e.lengthOnRef&&e.alignmentStart+e.lengthOnRef-1>=r},e.next=16,Promise.all(u.map((function(e){return F.getRecordsInSlice(e,l)})));case 16:if(s=e.sent,f=(o=Array.prototype).concat.apply(o,En(s)),!i.viewAsPairs){e.next=82;break}p={},d={},h=On(f),e.prev=22,h.s();case 24:if((y=h.n()).done){e.next=35;break}if(v=y.value,void 0!==(m=v.readName)){e.next=29;break}throw new Error("readName undefined");case 29:b=v.uniqueId,p[m]||(p[m]=0),p[m]+=1,d[b]=1;case 33:e.next=24;break;case 35:e.next=40;break;case 37:e.prev=37,e.t0=e.catch(22),h.e(e.t0);case 40:return e.prev=40,h.f(),e.finish(40);case 43:g={},Object.entries(p).forEach((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||jn(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0];1===n[1]&&(g[o]=!0)})),w=[],S=On(f),e.prev=47,S.s();case 49:if((A=S.n()).done){e.next=57;break}if(x=A.value,void 0!==(O=x.readName)){e.next=54;break}throw new Error("readName undefined");case 54:g[O]&&x.mate&&(x.mate.sequenceId===a||i.pairAcrossChr)&&Math.abs(x.alignmentStart-x.mate.alignmentStart)this.fetchSizeLimit)){e.next=77;break}throw new Error("mate data size of ".concat(M.toLocaleString()," bytes exceeded fetch size limit of ").concat(this.fetchSizeLimit.toLocaleString()," bytes"));case 77:return P.forEach((function(e){var t=F.cram.featureCache.get(e.toString());t||(t=F.getRecordsInSlice(e,(function(){return!0})),F.cram.featureCache.set(e.toString(),t)),T.push(t);var r=t.then((function(e){var t,r=[],n=On(e);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(void 0===o.readName)throw new Error("readName undefined");g[o.readName]&&!d[o.uniqueId]&&r.push(o)}}catch(e){n.e(e)}finally{n.f()}return r}));I.push(r)})),e.next=80,Promise.all(I);case 80:(R=e.sent).length&&(N=R.reduce((function(e,t){return e.concat(t)})),f=f.concat(N));case 82:return e.abrupt("return",f);case 83:case"end":return e.stop()}}),e,this,[[22,37,40,43],[47,59,62,65]])})),o=function(){var e=this,t=arguments;return new Promise((function(r,o){var i=n.apply(e,t);function a(e){kn(i,r,o,a,u,"next",e)}function u(e){kn(i,r,o,a,u,"throw",e)}a(void 0)}))},function(e,t,r){return o.apply(this,arguments)})},{key:"getRecordsInSlice",value:function(e,t){var r=e.containerStart,n=e.sliceStart,o=e.sliceBytes;return this.cram.getContainerAtPosition(r).getSlice(n,o).getRecords(t)}},{key:"hasDataForReferenceSequence",value:function(e){return this.index.hasDataForReferenceSequence(e)}}],r&&Cn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}(),Tn=r(88605),In=r(57525),Mn=r(87882),Rn=r(99376),Nn=r(83809),Fn=r(69191);function Dn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Bn(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Bn(e,t){if(e){if("string"==typeof e)return zn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?zn(e,t):void 0}}function zn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&p&&(i+="".concat(d,"I"),d=0),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),p&&(a="M",u+=p),"b"===m){var S=w.split(","),A=String.fromCharCode.apply(String,function(e){if(Array.isArray(e))return zn(e)}(c=S)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(c)||Bn(c)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}());o+=A,f+=A.length,u+=A.length}else"B"===m||"X"===m?(o+=g,f++,u++):"D"===m||"N"===m?(f+=w,u&&(i+="".concat(u).concat(a)),i+=w+m,u=0):"I"===m||"S"===m?(o+=w,u&&(i+="".concat(u).concat(a)),i+=w.length+m,u=0):"i"===m?(u&&(i+="".concat(u).concat(a)),d++,o+=w,u=0):"P"===m?(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"P")):"H"===m&&(u&&(i+="".concat(u).concat(a)),i+="".concat(w,"H"),u=0)}}catch(e){y.e(e)}finally{y.f()}}else p=r-o.length;return o.length!==r&&(p=r-o.length,o+=l.slice(f-s,f-s+p),u&&"M"!==a&&(i+="".concat(u).concat(a),u=0),a="M",u+=p),p&&d>0&&(i+="".concat(d,"I")),u&&(i+="".concat(u).concat(a)),i}(this.record.readFeatures,this.record.alignmentStart,this.record.readLength,this.record._refRegion)}},{key:"tags",value:function(){return Object.getOwnPropertyNames(e.prototype).filter((function(e){return e.startsWith("_get_")&&"_get_mismatches"!==e&&"_get_cram_read_features"!==e})).map((function(e){return e.replace("_get_","")}))}},{key:"id",value:function(){return"".concat(this._store.id,"-").concat(this.record.uniqueId)}},{key:"get",value:function(e){var t="_get_".concat(e);if(this[t])return this[t]()}},{key:"parent",value:function(){}},{key:"children",value:function(){}},{key:"set",value:function(){}},{key:"pairedFeature",value:function(){return!1}},{key:"_get_clipPos",value:function(){var e=this.get("mismatches");if(e.length){var t=-1===this.get("strand")?e.at(-1):e[0],r=t.type,n=t.cliplen;if("softclip"===r||"hardclip"===r)return n}return 0}},{key:"toJSON",value:function(){var e=this;return Hn(Hn({},Object.fromEntries(this.tags().map((function(t){return[t,e.get(t)]})).filter((function(e){return void 0!==e[1]})))),{},{uniqueId:this.id()})}},{key:"_get_mismatches",value:function(){var e=this.record.readFeatures,t=this.qualRaw();return function(e,t,r){if(!e)return[];var n,o=new Array(e.length),i=0,a=0,u=0,c=0,l=t,s=Dn(e);try{for(s.s();!(n=s.n()).done;){var f=n.value,p=f.refPos,d=f.code,h=f.pos,y=f.data,v=f.sub,m=f.ref;if(c=u-l,l=u,c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),u=p-1-t,"X"===d)o[i++]={start:u,length:1,base:v,qual:null==r?void 0:r[h-1],altbase:null==m?void 0:m.toUpperCase(),type:"mismatch"};else if("I"===d)o[i++]={start:u,type:"insertion",base:"".concat(y.length),length:0};else if("N"===d)o[i++]={type:"skip",length:y,start:u,base:"N"};else if("S"===d){var b=y.length;o[i++]={start:u,type:"softclip",base:"S".concat(b),cliplen:b,length:1}}else if("P"===d);else if("H"===d){var g=y;o[i++]={start:u,type:"hardclip",base:"H".concat(g),cliplen:g,length:1}}else"D"===d?o[i++]={type:"deletion",length:y,start:u,base:"*"}:"b"===d||"q"===d||"B"===d||"i"===d&&a++}}catch(e){s.e(e)}finally{s.f()}return c&&a>0&&(o[i++]={start:u,type:"insertion",base:"".concat(a),length:0},a=0),o.slice(0,i)}(e,this.get("start"),t)}}])&&Vn(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function Qn(e){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Qn(e)}function $n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Yn(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yn(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Yn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Zn(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function eo(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Zn(i,n,o,a,u,"next",e)}function u(e){Zn(i,n,o,a,u,"throw",e)}a(void 0)}))}}function to(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(62777);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function u(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(37956),l=r(45342),s=r(64568),f=r(87931);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(22970),l=r(45342),s=r(64568),f=r(87931);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(22970),l=r(33774),s=r(11898),f=r(45342),p=r(64568),d=r(87931);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(22970),l=r(45342),s=r(64568),f=r(87931);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(22970),l=r(45342),s=r(64568),f=r(87931);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{drawFeats:()=>f});var n=r(57525),o=r(96596),i=r(63801),a=r(83435);function u(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){c=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(c)throw i}}}}(S);try{for(P.s();!(j=P.n()).done;){var k=j.value;if(1===k.length&&v){var C=k[0];if(!x||8&C.flags)for(var _=[C].concat((p=(0,i.Cu)(C.SA,C.id,C.strand,C.name),function(e){if(Array.isArray(e))return c(e)}(p)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(p)||u(p)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())).sort((function(e,t){return e.clipPos-t.clipPos})),L=0;L<_.length-1;L++)M(_[L],_[L+1],O,!0);else M(C,{refName:C.next_ref||"",start:C.next_pos||0,end:C.next_pos||0,strand:C.strand},O,!0)}else for(var T=x?k.filter((function(e){return!(2048&e.flags||8&e.flags)})):k.sort((function(e,t){return e.clipPos-t.clipPos})).filter((function(e){return!(256&e.flags)})),I=0;I1e4;i&&L?(t.moveTo(C,0),t.beginPath()):(t.beginPath(),t.moveTo(C,0)),i&&L?t.strokeStyle="red":x?"insertSizeAndOrientation"===E?t.strokeStyle=(0,o.sY)(e,r,A)[0]:"orientation"===E?t.strokeStyle=(0,o.DW)(e)[0]:"insertSize"===E?t.strokeStyle=(null===(c=(0,o.L9)(e,r,A))||void 0===c?void 0:c[0])||"grey":"gradient"===E&&(t.strokeStyle="hsl(".concat(10*Math.log10(k),",50%,50%)")):"orientation"===E||"insertSizeAndOrientation"===E?t.strokeStyle=-1===p&&1===d?"navy":1===p&&-1===d?"green":"grey":"gradient"===E&&(t.strokeStyle="hsl(".concat(10*Math.log10(k),",50%,50%)"));var T=C+2*P,I=Math.min(f+l(b),k);i?k>1e5?(s(t,C+l(b),f,"red"),s(t,_+l(b),f,"red")):L?(t.arc(C+P+l(b),0,k,0,Math.PI),t.stroke()):(t.bezierCurveTo(C+l(b),I,T,I,T+l(b),0),t.stroke()):(t.bezierCurveTo(C+l(b),I,T,I,T+l(b),0),t.stroke())}else O&&y&&s(t,O-g.offsetPx,f,"purple")}}},87944:(e,t,r)=>{"use strict";r.r(t),r.d(t,{drawFeats:()=>h});var n=r(57525),o=r(83435),i=r(54133);function a(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.fillStyle=i),o.fillRect(e,t,r,n)}function u(e,t,r,n,o,i){r<0&&(e+=r,r=-r),n<0&&(t+=n,n=-n),i&&(o.strokeStyle=i),o.strokeRect(e,t,r,n)}var c=r(96596);function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(E);try{for(P.s();!(h=P.n()).done;){var k=h.value;if(k.length>1){var C=k[0],_=k[1],L=S.getCanonicalRefName(C.refName)||C.refName,T=S.getCanonicalRefName(_.refName)||_.refName,I=null===(r=w.bpToPx({refName:L,coord:C.start}))||void 0===r?void 0:r.offsetPx,M=null===(o=w.bpToPx({refName:L,coord:C.end}))||void 0===o?void 0:o.offsetPx,R=null===(c=w.bpToPx({refName:T,coord:_.start}))||void 0===c?void 0:c.offsetPx,N=null===(s=w.bpToPx({refName:T,coord:_.end}))||void 0===s?void 0:s.offsetPx,F=0;if(void 0!==I&&void 0!==M&&void 0!==R&&void 0!==N){if(C.refName===_.refName){var D=Math.min(C.start,_.start),B=Math.max(C.end,_.end);F=Math.abs(B-D)}A.push({r1s:I,r1e:M,r2s:R,r2e:N,v0:C,v1:_,distance:F})}}else if(b.drawSingletons){var z=k[0],G=S.getCanonicalRefName(z.refName)||z.refName,U=null===(p=w.bpToPx({refName:G,coord:z.start}))||void 0===p?void 0:p.offsetPx,H=null===(d=w.bpToPx({refName:G,coord:z.end}))||void 0===d?void 0:d.offsetPx;if(void 0!==U&&void 0!==H){var V=Math.max(H-U,2);a(U-w.offsetPx,0,V,x,m,"#f00"),u(U-w.offsetPx,0,V,x,m,"#a00")}}}}catch(e){P.e(e)}finally{P.f()}for(var W=Math.log((0,n.max)(A.map((function(e){return e.distance})))),q=Math.max(Math.log((0,n.min)(A.map((function(e){return e.distance}))))-1,0),Q=(b.height-20)/(W-q),$=0,Y=A;${"use strict";r.d(t,{Cu:()=>C,DQ:()=>w,Gl:()=>P,NI:()=>k,PC:()=>j,Ps:()=>x,eL:()=>g,hn:()=>S,qy:()=>E,wg:()=>A,xA:()=>O});var n=r(57525),o=r(55713);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e,t){return c(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||p(e,t)||u()}function u(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function c(e){if(Array.isArray(e))return e}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},u=a.iterator||"@@iterator",c=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,u,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,u)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[u];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}var s=l().mark(S);function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=p(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:"").split(v).slice(0,-1)}function w(e,t,r,n,o){var i=[],a=g(e);return e&&(i=i.concat(function(e,t,r,n){for(var o=0,i=0,a=[],u=r&&t,c=0;c=w.start))break;i.start+=w.length,l++}var S=d(i.start);i.base=n[S]||"X",i.qual=null==o?void 0:o[S],i.altbase=m,s.push(i),i={start:i.start+i.length,length:0,base:"",type:"mismatch"}}else i.start+=b}}catch(e){v.e(e)}finally{v.f()}return s}(t,a,i,r,o))),i}function S(e,t){var r,n,o,i,a,u,c,f;return l().wrap((function(l){for(;;)switch(l.prev=l.next){case 0:r=0,n=0,o=0,i=0;case 4:if(!(i=0&&E=0&&P{"use strict";r.r(t),r.d(t,{makeImageData:()=>R});var n=r(54133),o=r(87931),i=r(57525);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ri||(a&&(e.fillStyle=a),e.fillRect(t,r,n,o))}function c(e){var t=e.palette.bases;return{A:t.A.main,C:t.C.main,G:t.G.main,T:t.T.main,deletion:"#808080"}}function l(){return{charWidth:(0,i.measureText)("A"),charHeight:(0,i.measureText)("M")-2}}var s=r(96596),f=r(55713);function p(e){var t=e.colorType,r=e.tag,o=e.feature,i=e.config,a=e.defaultColor,u=e.colorTagMap;switch(t){case"insertSize":return function(e){return e.get("is_paired")&&e.get("refName")!==e.get("next_ref")?"#555":"hsl(".concat(Math.abs(e.get("template_length"))/10,",50%,50%)")}(o);case"strand":return function(e){return-1===e.get("strand")?"#8F8FD8":"#EC8B8B"}(o);case"mappingQuality":return function(e){return"hsl(".concat(e.get("score"),",50%,50%)")}(o);case"pairOrientation":return function(e,t){return s.pf[function(e,t){var r=(0,n.readConfObject)(t,"orientationType");return{LR:"color_pair_lr",RR:"color_pair_rr",RL:"color_pair_rl",LL:"color_pair_ll"}[f.il[r][e.get("pair_orientation")]]}(e,t)||"color_nostrand"]}(o,i);case"stranded":return function(e){return s.pf[function(e){var t=e.get("flags"),r=e.get("strand");if(1&t){var n=64&t?-1:1;return 2&t?r*n==1?"color_rev_strand":"color_fwd_strand":8&t?r*n==1?"color_rev_missing_mate":"color_fwd_missing_mate":e.get("refName")===e.get("next_ref")?r*n==1?"color_rev_strand_not_proper":"color_fwd_strand_not_proper":1===r?"color_fwd_diff_chr":"color_rev_diff_chr"}return"color_unknown"}(e)]}(o);case"xs":case"tag":var c=o.get("tags"),l=c?c[r]:o.get(r);return"XS"===r||"TS"===r?s.pf[{"-":"color_rev_strand","+":"color_fwd_strand"}[l]||"color_nostrand"]:"ts"===r?s.pf[{"-":-1===o.get("strand")?"color_fwd_strand":"color_rev_strand","+":-1===o.get("strand")?"color_rev_strand":"color_fwd_strand"}[l]||"color_nostrand"]:u[l]||s.pf.color_nostrand;case"insertSizeAndPairOrientation":break;case"modifications":case"methylation":return 16&o.get("flags")?"#c8dcc8":"#c8c8c8";default:return a?"lightgrey":(0,n.readConfObject)(i,"color",{feature:o})}}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function w(e,t){if(e){if("string"==typeof e)return S(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?S(e,t):void 0}}function S(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r5?-1===b?(t.beginPath(),t.moveTo(y-5,c+u/2),t.lineTo(y,c+u),t.lineTo(v,c+u),t.lineTo(v,c),t.lineTo(y,c),t.closePath(),t.fill()):(t.beginPath(),t.moveTo(y,c),t.lineTo(y,c+u),t.lineTo(v,c+u),t.lineTo(v+5,c+u/2),t.lineTo(v,c),t.closePath(),t.fill()):t.fillRect(y,c,v-y,u)}({ctx:t,feat:r,renderArgs:n}),L){case"perBaseQuality":!function(e){for(var t=e.ctx,r=e.feat,n=e.region,o=e.bpPerPx,a=e.canvasWidth,c=r.feature,l=r.topPx,s=r.heightPx,f=(c.get("qual")||"").split(" ").map((function(e){return+e})),p=(0,y.eL)(c.get("CIGAR")),d=1/o,h=c.get("start"),v=0,m=0,b=0;b=l&&h>=f&&(t.fillStyle=c[P],t.fillText(P,C+(g-l)/2+1,d+h))}S+=O,A+=O}}}({ctx:t,feat:r,region:I,bpPerPx:S,colorForBase:o,contrastForBase:a,charWidth:c,charHeight:l,canvasWidth:h});break;case"modifications":!function(e){var t,r,n=e.ctx,o=e.feat,a=e.region,c=e.bpPerPx,l=e.renderArgs,s=e.canvasWidth,p=o.feature,d=o.topPx,h=o.heightPx,v=l.modificationTagMap,m=void 0===v?{}:v,S=p.get("seq");if(S){var A,x=(0,f.c$)(p,"MM","Mm")||"",O=p.get("CIGAR"),E=p.get("start"),j=p.get("strand"),P=(0,y.eL)(O),k=(0,y.wg)(p),C=0,_=g((0,y.xA)(x,S,j));try{for(_.s();!(A=_.n()).done;){var L,T=A.value,I=T.type,M=T.positions,R=m[I]||"black",N=(0,b.colord)(R),F=g((0,y.hn)(P,M));try{for(F.s();!(L=F.n()).done;){var D=E+L.value,B=(t=(0,i.bpSpanPx)(D,D+1,a,c),r=2,function(e){if(Array.isArray(e))return e}(t)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||w(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),z=B[0],G=B[1],U=(null==k?void 0:k[C])||0;u(n,z,d,G-z+.5,h,s,1!==U?N.alpha(U+.1).toHslString():R),C++}}catch(e){F.e(e)}finally{F.f()}}}catch(e){_.e(e)}finally{_.f()}}}({ctx:t,feat:r,region:I,bpPerPx:S,renderArgs:n,canvasWidth:h});break;case"methylation":!function(e){var t,r,n=e.ctx,o=e.feat,a=e.region,c=e.bpPerPx,l=e.canvasWidth,s=e.renderArgs.regionSequence,f=o.feature,p=o.topPx,d=o.heightPx;if(!s)throw new Error("region sequence required for methylation");if(f.get("seq"))for(var h=f.get("start"),v=f.get("end"),m=(0,y.Ps)(f),g=m.methBins,w=m.methProbs,S=0;S2){var j=A((0,i.bpSpanPx)(x,x+2,a,c),2),P=j[0];u(n,P,p,j[1]-P+.5,d,l,T(S)||T(S+1)||"blue")}else{var k=A((0,i.bpSpanPx)(x,x+1,a,c),2),C=k[0];u(n,C,p,k[1]-C+.5,d,l,T(S)||"blue");var _=A((0,i.bpSpanPx)(x+1,x+2,a,c),2),L=_[0];u(n,L,p,_[1]-L+.5,d,l,T(S+1)||"blue")}}function T(e){if(g[e]){var t=w[e]||0;return(t>.5?(0,b.colord)("red").alpha(2*(t-.5)):(0,b.colord)("blue").alpha(1-2*t)).toHslString()}}}({ctx:t,feat:r,region:I,bpPerPx:S,renderArgs:n,canvasWidth:h})}}function E(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=P(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||P(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){if(e){if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?k(e,t):void 0}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=l&&w>=C){var H=h?"black":p[I.base]||"black";t.fillStyle=c?void 0===I.qual?H:(0,b.colord)(H).alpha(Math.min(1,I.qual/50)).toHslString():H,t.fillText(N,D+(z-l)/2+1,S+w)}}else if("deletion"===I.type&&v){u(t,D,S,Math.abs(D-B),w,d,f.deletion);var V="".concat(I.length),W=(0,i.measureText)(V,10);z>=W&&w>=C&&(t.fillStyle=p.deletion,t.fillText(V,(D+B)/2-W/2,S+w))}else if("insertion"===I.type&&v){t.fillStyle="purple";var q=D+_,Q=+I.base||I.length,$=Math.max(0,Math.min(1.2,1/m));if(Q<10&&(u(t,q,S,$,w,d,"purple"),1/m>=l&&w>=C)){var Y=q-$;u(t,Y,S,3*$,1,d),u(t,Y,S+w-1,3*$,1,d),t.fillText("(".concat(I.base,")"),q+3,S+w)}}else if("hardclip"===I.type||"softclip"===I.type){var K=D+_,J="hardclip"===I.type?"red":"blue",X=Math.max(o,P);if(u(t,K,S,X,w,d,J),1/m>=l&&w>=C){var Z=K-X;u(t,Z,S,3*X,1,d),u(t,Z,S+w-1,3*X,1,d),t.fillText("(".concat(I.base,")"),K+3,S+w)}}else if("skip"===I.type&&D+z>0){var ee=z-(m>10?1.5:0);t.clearRect(D,S,ee,w),u(t,Math.max(0,D),S+w/2-1,ee+(D<0?D:0),2,d,"#333")}}}catch(e){T.e(e)}finally{T.f()}if(v){var te,re=E(k);try{for(re.s();!(te=re.n()).done;){var ne=te.value,oe=O+ne.start,ie=ne.length,ae=j((0,i.bpSpanPx)(oe,oe+ie,x,m),1)[0],ue=+ne.base||ne.length,ce="".concat(ue);if("insertion"===ne.type&&ue>=10)if(m>a)u(t,ae-1,S,2,w,d,"purple");else if(w>s){var le=(0,i.measureText)(ce);u(t,ae-le/2-5,S,le+10,w,d,"purple"),t.fillStyle="white",t.fillText(ce,ae-le/2,S+w)}else u(t,ae-2,S,4,w,d,"purple")}}catch(e){re.e(e)}finally{re.f()}}}}function _(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(g);try{for(j.s();!(O=j.n()).done;){var P=O.value;if("softclip"===P.type)for(var k=P.cliplen||0,C=p.get("start"),T=0===P.start?C-k:C+P.start,I=0;I=A&&h>=E&&(t.fillStyle=c.palette.getContrastText(z),t.fillText(M,F+(B-A)/2+1,d+h))}}}catch(e){j.e(e)}finally{j.f()}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(r);try{for(k.s();!(A=k.n()).done;){var _=A.value;O({ctx:t,feat:_,renderArgs:u,defaultColor:m,colorForBase:g,contrastForBase:w,charWidth:E,charHeight:j,canvasWidth:i}),C({ctx:t,feat:_,renderArgs:u,mismatchAlpha:h,drawSNPsMuted:P,drawIndels:!0,largeInsertionIndicatorScale:v,minSubfeatureWidth:y,charWidth:E,charHeight:j,colorForBase:g,contrastForBase:w,canvasWidth:i}),f&&I({ctx:t,feat:_,renderArgs:u,colorForBase:g,config:s,theme:b,canvasWidth:i})}}catch(e){k.e(e)}finally{k.f()}}},22344:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>M});var n=r(88605),o=r(77021),i=r(99376),a=r(83809),u=r(69191),c=r(55713),l=r(63801),s=r(57525);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0&&x=0&&B.5)||h&&(void 0===v||v>.5)?(l&&(w(l,i,"cov","meth"),l.ref--,l[i]--),f&&(w(f,i,"cov","meth"),f.ref--,f[i]--)):(l&&((null==V?void 0:V.some((function(e){return(0,s.doesIntersect2)(t,t+1,e.start+n,e.start+n+e.length)})))||(w(l,i,"cov","unmeth"),l.ref--,l[i])),f&&((null==V?void 0:V.some((function(e){return(0,s.doesIntersect2)(t+1,t+2,e.start+n,e.start+n+e.length)})))||(w(f,i,"cov","unmeth"),f.ref--,f[i]--))));case 4:case"end":return e.stop()}}),e)})),q=0;case 17:if(!(q=0&&tee.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function j(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function P(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){j(i,n,o,a,u,"next",e)}function u(e){j(i,n,o,a,u,"throw",e)}a(void 0)}))}}function k(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=P(E().mark((function n(i){var c,l,s,f,p,d;return E().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.configure();case 2:return c=n.sent,l=c.subadapter,n.next=6,(0,u._)(l.getFeatures(e,r).pipe((0,a.$)()));case 6:return s=n.sent,n.next=9,S(s,e,r,(function(e){return t.fetchSequence(e)}));case 9:f=n.sent,p=f.bins,d=f.skipmap,p.forEach((function(r,n){var a=e.start+n;i.next(new o.default({id:"".concat(t.id,"-").concat(a),data:{score:r.total,snpinfo:r,start:a,end:a+1,refName:e.refName}}))})),Object.entries(d).forEach((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||function(e,t){if(e){if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?O(e,t):void 0}}(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=n[0],u=n[1];i.next(new o.default({id:a,data:{type:"skip",start:u.start,end:u.end,strand:u.strand,score:u.score,xs:u.xs}}))})),i.complete();case 15:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getMultiRegionFeatureDensityStats",value:(s=P(E().mark((function e(t,r){var n,o;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return n=e.sent,o=n.subadapter,e.abrupt("return",o.getMultiRegionFeatureDensityStats(t,r));case 5:case"end":return e.stop()}}),e,this)}))),function(e,t){return s.apply(this,arguments)})},{key:"getRefNames",value:(l=P(E().mark((function e(){var t,r,n,o=arguments;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.subadapter,e.abrupt("return",n.getRefNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"freeResources",value:function(){}}],n&&k(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter)},24154:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(41486),o=r.n(n),i=r(46186),a=r(22970),u=r(91118),c=r(15542),l=r(56588),s=r(92770),f=r(45342),p=r(64568),d=r(87931);function h(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{doAfterAttach:()=>y});var n=r(57525),o=r(55713),i=r(72731);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t){var r,o,a,c,l,s;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,n.getContainingTrack)(t),o=r.rpcSessionId,a=(0,n.getSession)(t),c=a.rpcManager,(l=(0,n.getContainingView)(t)).initialized&&!t.error&&!t.regionTooLarge){e.next=5;break}return e.abrupt("return");case 5:return t.setLoading(!0),e.next=8,c.call(o,"PileupGetReducedFeatures",{sessionId:o,regions:l.staticBlocks.contentBlocks,filterBy:(0,i.getSnapshot)(t.filterBy),adapterConfig:t.adapterConfig});case 8:s=e.sent,t.setChainData(s),t.setLoading(!1);case 11:case"end":return e.stop()}}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){function r(r){var n=e.ref;if(n){var o=n.getContext("2d");o&&e.chainData&&(o.clearRect(0,0,n.width,2*e.height),o.resetTransform(),o.scale(2,2),t(e,o,n.width,e.height),e.setLastDrawnOffsetPx(r.offsetPx),e.setLastDrawnBpPerPx(r.bpPerPx))}}(0,o.vi)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,l(e);case 2:case"end":return t.stop()}}),t)}))),{delay:1e3}),(0,o.vi)(e,h(p().mark((function t(){var o;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:(o=(0,n.getContainingView)(e)).bpPerPx!==e.lastDrawnBpPerPx&&r(o);case 2:case"end":return t.stop()}}),t)})))),(0,o.vi)(e,h(p().mark((function t(){return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r((0,n.getContainingView)(e));case 2:case"end":return t.stop()}}),t)}))),{delay:1e3})}},96596:(e,t,r)=>{"use strict";r.d(t,{DW:()=>l,L9:()=>u,Qg:()=>s,pf:()=>i,sY:()=>c,w7:()=>a});var n=r(72731),o=r(55713),i={color_fwd_strand_not_proper:"#ECC8C8",color_rev_strand_not_proper:"#BEBED8",color_fwd_strand:"#EC8B8B",color_rev_strand:"#8F8FD8",color_fwd_missing_mate:"#D11919",color_rev_missing_mate:"#1919D1",color_fwd_diff_chr:"#000",color_rev_diff_chr:"#969696",color_pair_lr:"#c8c8c8",color_pair_rr:"navy",color_pair_rl:"teal",color_pair_ll:"green",color_nostrand:"#c8c8c8",color_interchrom:"purple",color_longinsert:"red",color_shortinsert:"pink",color_unknown:"grey"},a={color_fwd_strand_not_proper:"#CA6767",color_rev_strand_not_proper:"#7272AA",color_fwd_strand:"#DC2A2A",color_rev_strand:"#4141BA",color_fwd_missing_mate:"#921111",color_rev_missing_mate:"#111192",color_fwd_diff_chr:"#000000",color_rev_diff_chr:"#696969",color_pair_lr:"#8C8C8C",color_pair_rr:"#00005A",color_pair_rl:"#005A5A",color_pair_ll:"#005A00",color_nostrand:"#8C8C8C",color_interchrom:"#5A005A",color_longinsert:"#B30000",color_shortinsert:"#FF3A5C",color_unknown:"grey"};function u(e,t,r){var n=e.refName===t.refName,o=Math.abs(e.tlen||0);return n&&o>((null==r?void 0:r.upper)||0)?[i.color_longinsert,a.color_longinsert]:n&&o<((null==r?void 0:r.lower)||0)?[i.color_shortinsert,a.color_shortinsert]:n?void 0:[i.color_interchrom,a.color_interchrom]}function c(e,t,r){return u(e,t,r)||l(e)}function l(e){var t=o.il.fr,r=o.rr[t[e.pair_orientation||""]];return[i[r]||i.color_unknown,a[r]||a.color_unknown]}var s=n.types.maybe(n.types.model({type:n.types.string,tag:n.types.maybe(n.types.string),extra:n.types.frozen()}))},59313:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderSvg:()=>l});var n=r(41486),o=r.n(n),i=r(57525);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t,r){return s.apply(this,arguments)}function s(){var e;return e=u().mark((function e(t,n,a){var c,l,s,f,p,d,h,y;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c=(0,i.getContainingView)(t),l=c.dynamicBlocks.totalWidthPx,s=t.height,!n.rasterizeLayers){e.next=15;break}if((f=document.createElement("canvas")).width=2*l,f.height=2*s,p=f.getContext("2d")){e.next=10;break}return e.abrupt("return");case 10:return p.scale(2,2),a(t,p,l,s),e.abrupt("return",o().createElement("image",{width:l,height:s,xlinkHref:f.toDataURL("image/png")}));case 15:return e.next=17,Promise.resolve().then(r.t.bind(r,17448,23));case 17:return d=e.sent,h=new d.default(l,s),a(t,h,l,s),u=t.id,void 0,v="undefined"==typeof jest,y="arc-clip-".concat(v?u:"jest"),e.abrupt("return",o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:l,height:s}))),o().createElement("g",{dangerouslySetInnerHTML:{__html:h.getSvg().innerHTML},clipPath:"url(#".concat(y,")")})));case 22:case"end":return e.stop()}var u,v}),e)})),s=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},s.apply(this,arguments)}},83435:(e,t,r)=>{"use strict";function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}(e.chains.values());try{for(r.s();!(t=r.n()).done;)if(1&t.value[0].flags)return!0}catch(e){r.e(e)}finally{r.f()}return!1}r.d(t,{d:()=>o})},55713:(e,t,r)=>{"use strict";r.d(t,{Iw:()=>m,N2:()=>w,XL:()=>A,bH:()=>d,c$:()=>h,il:()=>y,k_:()=>g,rr:()=>v,vi:()=>S});var n=r(83809),o=r(69191),i=r(72731),a=r(77090);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){var r=e.get("tags");return void 0!==r?r[t]:e.get(t)}function h(e,t,r){var n;return null!==(n=d(e,t))&&void 0!==n?n:d(e,r)}var y={fr:{F1R2:"LR",F2R1:"LR",F1F2:"LL",F2F1:"LL",R1R2:"RR",R2R1:"RR",R1F2:"RL",R2F1:"RL"},rf:{R1F2:"LR",R2F1:"LR",R1R2:"LL",R2R1:"LL",F1F2:"RR",F2F1:"RR",F1R2:"RL",F2R1:"RL"},ff:{F2F1:"LR",R1R2:"LR",F2R1:"LL",R1F2:"LL",R2F1:"RR",F1R2:"RR",R2R1:"RL",F1F2:"RL"}},v={LR:"color_pair_lr",LL:"color_pair_ll",RR:"color_pair_rr",RL:"color_pair_rl"};function m(e,t){return b.apply(this,arguments)}function b(){return(b=p(s().mark((function e(t,r){var i,a,u,c,f,p;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=t.start,u=t.end,c=t.originalRefName,f=t.refName,e.next=3,(0,o._)(r.getFeatures(l(l({},t),{},{refName:c||f,end:u+1,start:Math.max(0,a-1)})).pipe((0,n.$)()));case 3:return p=e.sent,e.abrupt("return",null===(i=p[0])||void 0===i?void 0:i.get("seq"));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return"methylation"===e}var w={m:"rgb(255,0,0)",h:"rgb(11, 132, 165)",o:"rgb(111, 78, 129)",f:"rgb(246, 200, 95)",c:"rgb(157, 216, 102)",g:"rgb(255, 160, 86)",e:"rgb(141, 221, 208)",b:"rgb(202, 71, 47)"};function S(e,t,r){(0,i.addDisposer)(e,(0,a.autorun)(p(s().mark((function r(){return s().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t();case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),(0,i.isAlive)(e)&&e.setError(r.t0);case 8:case"end":return r.stop()}}),r,null,[[0,5]])}))),r))}function A(){return"hsl(".concat(200*Math.random(),", 50%, 50%)")}},3678:(e,t,r)=>{"use strict";r.d(t,{A:()=>v});var n=r(41486),o=r.n(n),i=r(87931),a=r(46186),u=r(63548),c=r(74960),l=r(3024),s=r(70805);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{doAfterAttach:()=>g});var n=r(72731),o=r(77090);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){u(i,n,o,a,c,"next",e)}function c(e){u(i,n,o,a,c,"throw",e)}a(void 0)}))}}var l=r(57525);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(){f=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function p(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function d(e){return h.apply(this,arguments)}function h(){var e;return e=f().mark((function e(t){var r,n,o,i,a,u;return f().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,l.getContainingTrack)(t),n=r.rpcSessionId,o=(0,l.getSession)(t),i=o.rpcManager,(a=(0,l.getContainingView)(t)).initialized&&!t.error&&!t.regionTooLarge){e.next=5;break}return e.abrupt("return");case 5:return t.setLoading(!0),e.next=8,i.call(n,"CoreGetFeatures",{sessionId:n,regions:a.staticBlocks.contentBlocks,adapterConfig:t.adapterConfig});case 8:u=e.sent,t.setFeatures(u),t.setLoading(!1);case 11:case"end":return e.stop()}}),e)})),h=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){p(i,n,o,a,u,"next",e)}function u(e){p(i,n,o,a,u,"throw",e)}a(void 0)}))},h.apply(this,arguments)}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function v(){v=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==y(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function m(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function b(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){m(i,n,o,a,u,"next",e)}function u(e){m(i,n,o,a,u,"throw",e)}a(void 0)}))}}function g(e){!function(e,t,r){(0,n.addDisposer)(e,(0,o.autorun)(c(a().mark((function r(){return a().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,r.next=3,t();case 3:r.next=8;break;case 5:r.prev=5,r.t0=r.catch(0),(0,n.isAlive)(e)&&e.setError(r.t0);case 8:case"end":return r.stop()}}),r,null,[[0,5]])}))),{delay:1e3}))}(e,b(v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,d(e);case 2:case"end":return t.stop()}}),t)}))))}},66877:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(41486),o=r.n(n),i=r(46186),a=r(57525),u=r(54133),c=r(3678),l=r(61);function s(e,t){var r,n,o,i,a,u=t?(0,l.h)(t):void 0,c=e.get("start"),s=e.get("end"),f=e.get("strand"),p=e.get("mate"),d=e.get("refName"),h=0,y=0,v=0,m=0;if(["e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1?o().createElement(o().Fragment,null,o().createElement("path",{d:"M ".concat(R," 0 C ").concat(R," ").concat(M,", ").concat(N," ").concat(M,", ").concat(N," 0"),ref:O,stroke:F,strokeWidth:3,onMouseOut:function(){return g(!1)},onMouseOver:function(){return g(!0)},onClick:function(){return l.selectFeature(d)},fill:"none",pointerEvents:"stroke"}),void 0!==A.mateDirection?o().createElement("line",{stroke:F,strokeWidth:3,onMouseOut:function(){return g(!1)},onMouseOver:function(){return g(!0)},onClick:function(){return l.selectFeature(d)},x1:R,x2:R+20*A.mateDirection,y1:1.5,y2:1.5}):null,void 0!==x.mateDirection?o().createElement("line",{stroke:F,strokeWidth:3,onMouseOut:function(){return g(!1)},onMouseOver:function(){return g(!0)},onClick:function(){return l.selectFeature(d)},x1:N,x2:N+20*x.mateDirection,y1:1.5,y2:1.5}):null,b?o().createElement(c.A,{contents:f(d,h)}):null):null}return null})),h=(0,i.observer)((function(e){var t=e.model,r=e.exportSVG,n=e.children,i=t.height,u=(0,a.getContainingView)(t),c=Math.round(u.dynamicBlocks.totalWidthPx);return r?o().createElement(o().Fragment,null,n):o().createElement("svg",{width:c,height:i},n)}));const y=(0,i.observer)((function(e){var t=e.model,r=e.exportSVG,n=(0,a.getContainingView)(t),i=(0,a.getSession)(t),u=i.assemblyManager,c=t.features,l=u.get(n.assemblyNames[0]);return l?o().createElement(h,{model:t,exportSVG:r},null==c?void 0:c.map((function(e){var r,a=e.get("ALT");return null!==(r=null==a?void 0:a.map((function(r){return o().createElement(d,{key:e.id()+"-"+r,session:i,feature:e,alt:r,view:n,model:t,assembly:l})})))&&void 0!==r?r:o().createElement(d,{key:e.id(),session:i,feature:e,view:n,model:t,assembly:l})}))):null}))},44965:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(41486),o=r.n(n),i=r(46186),a=r(87931),u=r(90127),c=(0,r(3024).makeStyles)()((function(e){return{loading:{backgroundColor:e.palette.background.default,backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 5px, ".concat(e.palette.action.disabledBackground," 5px, ").concat(e.palette.action.disabledBackground," 10px)"),position:"absolute",bottom:0,height:50,width:300,right:0,pointerEvents:"none",textAlign:"center"}}})),l=(0,i.observer)((function(e){var t=e.model,r=e.children,n=t.error,i=t.regionTooLarge;return n?o().createElement(u.LW,{message:"".concat(n),severity:"error",buttonText:"Reload",action:t.reload}):i?t.regionCannotBeRendered():o().createElement(s,{model:t},r)})),s=(0,i.observer)((function(e){var t=e.model,r=e.children,n=t.loading;return o().createElement("div",null,r,n?o().createElement(f,{model:t}):null)})),f=(0,i.observer)((function(e){var t=e.model,r=c().classes,n=t.message;return o().createElement("div",{className:r.loading},o().createElement(a.LoadingEllipses,{message:n}))}));const p=l;var d=r(66877);const h=(0,i.observer)((function(e){var t=e.model,r=e.exportSVG;return o().createElement(p,{model:t},o().createElement(d.A,{model:t,exportSVG:r}))}))},60662:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderArcSvg:()=>s});var n=r(41486),o=r.n(n),i=r(57525),a=r(66877);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function l(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function s(e,t){return f.apply(this,arguments)}function f(){var e;return e=c().mark((function e(t,r){var n,u,l,s;return c().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,i.when)((function(){return!t.loading}));case 2:return n=(0,i.getContainingView)(t),u=n.dynamicBlocks.totalWidthPx,l=t.height,s="arc-"+t.id,e.abrupt("return",o().createElement(o().Fragment,null,o().createElement("defs",null,o().createElement("clipPath",{id:s},o().createElement("rect",{x:0,y:0,width:u,height:l}))),o().createElement("g",{clipPath:"url(#".concat(s,")")},o().createElement(a.A,{model:t,exportSVG:!0}))));case 7:case"end":return e.stop()}}),e)})),f=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){l(i,n,o,a,u,"next",e)}function u(e){l(i,n,o,a,u,"throw",e)}a(void 0)}))},f.apply(this,arguments)}},46023:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(64e3),o=r(88605),i=r(87882),a=r(99376),u=r(99868),c=r(31056),l=r(12388);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r0&&void 0!==P[0]?P[0]:{},r=this.pluginManager,o=this.getConf("bedLocation"),e.next=5,(0,i.openLocation)(o,r).readFile(t);case 5:if(!A(a=e.sent)){e.next=12;break}return e.next=9,(0,l.unzip)(a);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=a;case 13:if(!((u=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(c=new TextDecoder("utf8",{fatal:!0}).decode(u),s=c.split(/\n|\r\n|\r/).filter((function(e){return!!e})),f=[],p=0;p0&&void 0!==n[0]?n[0]:{},this.bedFeatures||(this.bedFeatures=this.loadDataP(t).catch((function(e){throw r.bedFeatures=void 0,e}))),e.abrupt("return",this.bedFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getRefNames",value:(g=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.features,e.abrupt("return",Object.keys(n));case 6:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getHeader",value:(m=y(d().mark((function e(){var t,r,n,o=arguments;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"getNames",value:(h=y(d().mark((function e(){var t,r,n,o,i;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"loadFeatureIntervalTreeHelper",value:(p=y(d().mark((function e(t){var r,n,o,i,a,l,s,p,h,y,v,m,b,g,w=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(r=e.sent,n=r.colRef,o=r.colStart,i=r.colEnd,a=r.features,l=r.parser,s=r.scoreColumn,p=a[t]){e.next=12;break}return e.abrupt("return",void 0);case 12:return e.next=14,this.getNames();case 14:h=e.sent,y=new c.Ay,v=p.map((function(e,r){var a="".concat(w.id,"-").concat(t,"-").concat(r);return(0,u.d)(e,n,o,i,s,l,a,h)})),m=f(v);try{for(m.s();!(b=m.n()).done;)g=b.value,y.insert([g.get("start"),g.get("end")],g)}catch(e){m.e(e)}finally{m.f()}return e.abrupt("return",y);case 20:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"loadFeatureIntervalTree",value:(s=y(d().mark((function e(t){var r=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.intervalTrees[t]||(this.intervalTrees[t]=this.loadFeatureIntervalTreeHelper(t).catch((function(e){throw r.intervalTrees[t]=void 0,e}))),e.abrupt("return",this.intervalTrees[t]);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return s.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var r=y(d().mark((function r(n){var o,i,a,u;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureIntervalTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],o&&v(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(o.BaseFeatureDataAdapter);x.capabilities=["getFeatures","getRefNames"];const O=x},63121:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>w});var n=r(64e3),o=r(88605),i=r(87882),a=r(99376),u=r(87906),c=r(99868);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(){s=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var s=c.arg,f=s.value;return f&&"object"==l(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function p(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){f(i,n,o,a,u,"next",e)}function u(e){f(i,n,o,a,u,"throw",e)}a(void 0)}))}}function d(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.bed.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getHeader",value:(f=p(s().mark((function e(){return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.bed.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"getNames",value:(l=p(s().mark((function e(){var t,r,n;return s().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.columnNames.length){e.next=2;break}return e.abrupt("return",this.columnNames);case 2:return e.next=4,this.bed.getHeader();case 4:return t=e.sent,r=t.split(/\n|\r\n|\r/).filter((function(e){return!!e})),n=r.at(-1),e.abrupt("return",(null==n?void 0:n.includes("\t"))?n.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 8:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=p(s().mark((function n(o){var i,a,u,l,f,p;return s().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.bed.getMetadata();case 2:return i=n.sent,a=i.columnNumbers,u=a.ref-1,l=a.start-1,f=a.end-1,n.next=9,t.getNames();case 9:return p=n.sent,n.next=12,t.bed.getLines(e.refName,e.start,e.end,{lineCallback:function(e,r){o.next((0,c.d)(e,u,l,f,t.scoreColumn,t.parser,"".concat(t.id,"-").concat(r),p))},signal:r.signal});case 12:o.complete();case 13:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],o&&d(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(o.BaseFeatureDataAdapter);g.capabilities=["getFeatures","getRefNames"];const w=g},82845:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>P,featureData:()=>O});var n=r(88605),o=r(87882),i=r(99376),a=r(57525),u=r(31056),c=r(12388);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){for(var r=0;r")),new a.SimpleFeature(S(S(S({start:c,end:l,refName:u},o?{ALT:[o]}:{}),{},{strand:y,name:d},b),{},{score:h,uniqueId:t,mate:{refName:s,start:f,end:p,strand:v}}))}function E(e){return"+"===e?1:"-"===e?-1:"."===e?0:void 0}var j=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=v(this,t,arguments)).intervalTrees={},e}var r,n,a,l,f,d,m,b,w;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&g(e,t)}(t,e),r=t,n=[{key:"loadDataP",value:(w=h(p().mark((function e(){var t,r,n,i,a,u,l,s,f,d,h,y,v,m,b,g,w,S=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=S.length>0&&void 0!==S[0]?S[0]:{},r=this.pluginManager,n=this.getConf("bedpeLocation"),e.next=5,(0,o.openLocation)(n,r).readFile(t);case 5:if(!x(i=e.sent)){e.next=12;break}return e.next=9,(0,c.unzip)(i);case 9:e.t0=e.sent,e.next=13;break;case 12:e.t0=i;case 13:if(!((a=e.t0).length>536870888)){e.next=16;break}throw new Error("Data exceeds maximum string length (512MB)");case 16:for(u=new TextDecoder("utf8",{fatal:!0}).decode(a),l=u.split(/\n|\r\n|\r/).filter((function(e){return!!e})),s=[],f=0;f0&&void 0!==n[0]?n[0]:{},this.bedpeFeatures||(this.bedpeFeatures=this.loadDataP(t).catch((function(e){throw r.bedpeFeatures=void 0,e}))),e.abrupt("return",this.bedpeFeatures);case 3:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"getRefNames",value:(m=h(p().mark((function e(){var t,r,n,o,i=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=i.length>0&&void 0!==i[0]?i[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.feats1,o=r.feats2,e.abrupt("return",s(new Set([].concat(s(Object.keys(n)),s(Object.keys(o))))));case 7:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"getHeader",value:(d=h(p().mark((function e(){var t,r,n,o=arguments;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},e.next=3,this.loadData(t);case 3:return r=e.sent,n=r.header,e.abrupt("return",n);case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getNames",value:(f=h(p().mark((function e(){var t,r,n,o,i;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:if(t=e.sent,r=t.header,!(n=t.columnNames).length){e.next=7;break}return e.abrupt("return",n);case 7:return o=r.split(/\n|\r\n|\r/).filter((function(e){return!!e})),i=o.at(-1),e.abrupt("return",(null==i?void 0:i.includes("\t"))?i.slice(1).split("\t").map((function(e){return e.trim()})):void 0);case 10:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"loadFeatureTreeP",value:(l=h(p().mark((function e(t){var r,n,o,i,a,c,l,f,d,h,y,v,m,b,g=this;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.loadData();case 2:return a=e.sent,c=a.feats1,l=a.feats2,e.next=7,this.getNames();case 7:for(f=e.sent,d=new u.Ay,h=null!==(n=null===(r=c[t])||void 0===r?void 0:r.map((function(e,r){return O(e,"".concat(g.id,"-").concat(t,"-").concat(r,"-r1"),!1,f)})))&&void 0!==n?n:[],y=null!==(i=null===(o=l[t])||void 0===o?void 0:o.map((function(e,r){return O(e,"".concat(g.id,"-").concat(t,"-").concat(r,"-r2"),!0,f)})))&&void 0!==i?i:[],v=0,m=[].concat(s(h),s(y));v1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=h(p().mark((function r(n){var o,i,a,u;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return o=e.start,i=e.end,a=e.refName,r.next=3,t.loadFeatureTree(a);case 3:null==(u=r.sent)||u.search([o,i]).forEach((function(e){return n.next(e)})),n.complete();case 6:case"end":return r.stop()}}),r)})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],n&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter);j.capabilities=["getFeatures","getRefNames"];const P=j},84269:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>k});var n=r(23438),o=r(64e3),i=r(88605),a=r(87882),u=r(99376),c=r(77021),l=r(82492),s=r(17133),f=r(99868);function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}var d=["fields"],h=["chromStart","chromEnd","chrom"];function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var d="suspendedStart",h="suspendedYield",y="executing",v="completed",m={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=d;return function(i,a){if(o===y)throw new Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===d)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=y;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?v:h,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},t}function g(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function w(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){g(i,n,o,a,u,"next",e)}function u(e){g(i,n,o,a,u,"throw",e)}a(void 0)}))}}function S(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.signal;return(0,u.ObservableCreate)(function(){var e=w(b().mark((function e(u){var p,d,y;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,t.configure(r);case 3:return p=e.sent,d=p.parser,y=p.bigbed,e.next=8,y.getFeatureStream(n,o,i,{signal:a,basesPerSpan:i-o});case 8:e.sent.pipe((0,l.U)(),(0,s.T)((function(e){var r=d.parseLine("".concat(n,"\t").concat(e.start,"\t").concat(e.end,"\t").concat(e.rest),{uniqueId:e.uniqueId}),o=r.blockCount,i=r.blockSizes,a=r.blockStarts,u=r.chromStarts;if(o){var l=u||a||[],s=i,p=e.start;r.subfeatures=[];for(var y=0;y{"use strict";r.d(t,{B:()=>u,d:()=>c});var n=r(57525);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t=a){var c=e.get("strand")>0?"five":"three";u.push({type:"".concat(c,"_prime_UTR"),start:n,end:a,refName:i})}else if(r>n&&r=a){var l=e.get("strand")>0?"five":"three";u.push({type:"".concat(l,"_prime_UTR"),start:n,end:r,refName:i},{type:"CDS",start:r,end:a,refName:i})}else if(r<=n&&o>=a)u.push({type:"CDS",start:n,end:a,refName:i});else if(r>n&&r0?"five":"three",f=e.get("strand")>0?"three":"five";u.push({type:"".concat(s,"_prime_UTR"),start:n,end:r,refName:i},{type:"CDS",start:r,end:o,refName:i},{type:"".concat(f,"_prime_UTR"),start:o,end:a,refName:i})}else if(r<=n&&o>n&&o0?"three":"five";u.push({type:"CDS",start:n,end:o,refName:i},{type:"".concat(p,"_prime_UTR"),start:o,end:a,refName:i})}else if(o<=n){var d=e.get("strand")>0?"three":"five";u.push({type:"".concat(d,"_prime_UTR"),start:n,end:a,refName:i})}}));var c=Object.fromEntries(e.tags().map((function(t){return[t,e.get(t)]})));return c.subfeatures=u,c.type="mRNA",c.uniqueId=e.id(),delete c.chromStarts,delete c.chromStart,delete c.chromEnd,delete c.chrom,delete c.blockStarts,delete c.blockSizes,delete c.blockCount,delete c.thickStart,delete c.thickEnd,new n.SimpleFeature({data:c,id:e.id()})}function c(e,t,r,o,i,c,l,s){var f=e.split("\t"),p=f[t],d=+f[r],h=r===o?1:0,y=+f[o]+h,v=s?function(e,t){return Object.fromEntries(t.split("\t").map((function(t,r){return[e[r],t]})))}(s,e):c.parseLine(e,{uniqueId:l}),m=v.blockCount,b=v.blockSizes,g=v.blockStarts,w=v.chromStarts;if(m){var S=w||g||[],A=b,x=d;v.subfeatures=[];for(var O=0;O{"use strict";r.r(t),r.d(t,{default:()=>N});var n=r(41486),o=r.n(n),i=r(46186),a=r(87931),u=r(57525),c=r(3024),l=r(54438),s=r(74002),f=r(57372),p=r.n(f),d=r(75201),h=r(11094),y=r(90748),v=r(27831),m=r(31853),b=r(9165),g=r(84627),w=r(50784),S=r(41169),A=r(1906);function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(41486),o=r.n(n),i=r(37956),a=r(15542),u=r(91118),c=r(22970),l=r(60276),s=r(33774),f=r(11898),p=r(45342),d=r(64568),h=r(87931),y=r(57525);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{A:()=>v});var n=r(41486),o=r.n(n),i=r(46186),a=r(57525),u=r(38377),c=r(77682);function l(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rMath.PI?"1":"0";return["M"].concat(l(i),["A",t,t,"0",u,"1"],l(a)).join(" ")}var d=(0,i.observer)((function(e){var t=e.model,r=e.slice,n=e.region,i=(0,c.A)(),u=t.radiusPx+1,s=r.endRadians,f=r.startRadians,p=(0,a.polarToCartesian)(u,f),d=(0,a.polarToCartesian)(u,s),y=(s-f)*u,v=s-f>Math.PI?"1":"0",m=(s+f)/2,b="[".concat(Number(n.regions.length).toLocaleString(),"]");return o().createElement(o().Fragment,null,o().createElement(h,{text:b,view:t,maxWidthPx:y,radians:m,radiusPx:u,title:"".concat(b," more regions"),color:i.palette.text.primary}),o().createElement("path",{d:["M"].concat(l(p),["A",u,u,"0",v,"1"],l(d)).join(" "),stroke:i.palette.text.secondary,strokeWidth:2,strokeDasharray:"2,2",fill:"none"}))})),h=(0,i.observer)((function(e){var t=e.view,r=e.text,n=e.maxWidthPx,i=e.radians,u=e.radiusPx,c=e.title,l=e.color,s=f().classes,p=(0,a.polarToCartesian)(u+5,i);return r?6.5*r.length4?(0,a.radToDeg)(i+t.offsetRadians-Math.PI/2)>=180?o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"start",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i),")"),style:{fill:l}},r,o().createElement("title",null,c||r)):o().createElement("text",{x:0,y:0,className:s.rulerLabel,textAnchor:"end",dominantBaseline:"middle",transform:"translate(".concat(p,") rotate(").concat((0,a.radToDeg)(i)+180,")"),style:{fill:l}},r,o().createElement("title",null,c||r)):null:null})),y=(0,i.observer)((function(e){var t,r=e.model,n=e.slice,i=e.region,l=(0,c.A)(),s=r.radiusPx,f=n.endRadians,d=n.startRadians,y=(f+d)/2,v=(f-d)*s,m=(0,a.getSession)(r).assemblyManager.get(i.assemblyName);if(m&&(t=m.getRefNameColor(i.refName)),t)try{t=(0,u.makeContrasting)(t,l.palette.background.paper)}catch(e){t=l.palette.text.primary}else t=l.palette.text.primary;return o().createElement(o().Fragment,null,o().createElement(h,{text:i.refName,view:r,maxWidthPx:v,radians:y,radiusPx:s,color:t}),o().createElement("path",{d:p(n,s+1,i.start,i.end),stroke:t,strokeWidth:2,fill:"none"}))}));const v=(0,i.observer)((function(e){var t=e.model,r=e.slice;return r.region.elided?o().createElement(d,{key:(0,a.assembleLocString)(r.region.regions[0]),model:t,region:r.region,slice:r}):o().createElement(y,{key:(0,a.assembleLocString)(r.region),region:r.region,model:t,slice:r})}))},29520:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderToSvg:()=>g});var n=r(41486),o=r.n(n),i=r(32652),a=r(77090),u=r(57525),c=r(87931),l=r(72731),s=r(77682);function f(e){var t=e.width,r=e.height,n=e.shift,i=(0,s.A)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,u.stripAlpha)(i.palette.background.default)})}var p=r(54438);function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(){h=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function v(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>Ge});var n=r(41486),o=r.n(n),i=r(54133),a=r(56230),u=r(8112),c=r(15542),l=r(32348),s=r(29078),f=r(3024),p=r(46186),d=r(72731),h=r(93414),y=r(52371),v=r(57525),m=r(87931),b=r(37679),g=r(22970),w=r(47518),S=r(60276),A=r(92770),x=r(74002),O=r(75643),E=r(36304),j=r(85836),P=r(34014),k=r(37292),C=r(64568),_=r(78410),L=r(11765);function T(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return I(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?I(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function I(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{A:()=>d});var n=r(41486),o=r.n(n),i=r(36304),a=r(22970),u=r(3024),c=r(46186);function l(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>A,makeFeatures:()=>S});var n=r(88605),o=r(77021),i=r(99376),a=r(54133);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(){c=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function l(e){return function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))}}function p(e,t){for(var r=0;r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function g(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rn&&s.get("start"){"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(88605),o=r(54133),i=r(93994);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function l(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=d.get("start")&&s.start<=d.get("end")?s.end=d.get("end"):(s&&t.push(s),s={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){f.e(e)}finally{f.f()}s&&t.push(s)}}catch(e){r.e(e)}finally{r.f()}return t.sort((function(e,t){return e.refName.localeCompare(t.refName)})),e.abrupt("return",t);case 5:case"end":return e.stop()}var u,h}),e,this)})),s=function(){var e=this,t=arguments;return new Promise((function(r,n){var o=a.apply(e,t);function i(e){f(o,r,n,i,u,"next",e)}function u(e){f(o,r,n,i,u,"throw",e)}i(void 0)}))},function(){return s.apply(this,arguments)})},{key:"freeResources",value:function(){}}],n&&p(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseAdapter)},98990:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(77021),o=r(99376),i=r(83809),a=r(93994),u=r(69191);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t=d.get("start")&&u.start<=d.get("end")?u.end=d.get("end"):(u&&t.push(u),u={refName:i,start:d.get("start"),end:d.get("end")})}catch(e){c.e(e)}finally{c.f()}u&&t.push(u)}}catch(e){r.e(e)}finally{r.f()}return e.abrupt("return",t);case 4:case"end":return e.stop()}var p,h}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"freeResources",value:function(){}}],a&&m(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),t}(a.default)},44786:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(88605),o=r(87882);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{SS:()=>j,Ay:()=>P});var n=r(41486),o=r.n(n),i=r(58161),a=r(7799),u=r(54133);const c=(0,u.ConfigurationSchema)("FromConfigAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),l=(0,u.ConfigurationSchema)("FromConfigRegionsAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),s=(0,u.ConfigurationSchema)("FromConfigSequenceAdapter",{features:{type:"frozen",defaultValue:[]}},{explicitlyTyped:!0,implicitIdentifier:"adapterId"}),f=(0,u.ConfigurationSchema)("RefNameAliasAdapter",{location:{type:"fileLocation",defaultValue:{uri:"/path/to/my/aliases.txt",locationType:"UriLocation"}},refNameColumn:{type:"number",defaultValue:0}},{explicitlyTyped:!0});var p=r(72731),d=r(20191);const h=function(e){return p.types.model("ConfigurationEditorWidget",{id:d.ElementId,type:p.types.literal("ConfigurationEditorWidget"),target:p.types.safeReference(e.pluggableConfigSchemaType("track"))}).actions((function(e){return{setTarget:function(t){e.target=t}}}))};var y=(0,r(46186).observer)((function(e){var t=e.model;if(null==t?void 0:t.target){if(t.target.type)return o().createElement(o().Fragment,null,"".concat(t.target.type," settings"));if((0,p.isStateTreeNode)(t.target)){var r=(0,p.getType)(t.target);if(null==r?void 0:r.name)return o().createElement(o().Fragment,null,"".concat(r.name.replace("ConfigurationSchema","")," settings"))}}return o().createElement(o().Fragment,null,"Settings")}));const v=y;var m=(0,u.ConfigurationSchema)("ConfigurationEditorWidget",{}),b=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,84048))}));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>j});var n=r(41486),o=r.n(n),i=r(29230),a=r(17712),u=r(18350),c=r(63774),l=r(64568),s=r(57525),f=r(3024),p=r(46186),d=r(38230),h=r(87931);const y=(0,p.observer)((function(e){var t=e.connectionType,r=e.model,i=e.session,a=t.configEditorComponent||d.SS;return o().createElement(n.Suspense,{fallback:o().createElement(h.LoadingEllipses,null)},o().createElement(a,{model:{target:r},session:i}))}));var v=r(22970),m=r(74002),b=r(60276),g=r(26371);const w=(0,p.observer)((function(e){var t=e.connectionTypeChoices,r=e.connectionType,i=e.setConnectionType,a=t[0];return(0,n.useEffect)((function(){r||i(a)}),[r,a,i]),o().createElement("form",{autoComplete:"off"},r?o().createElement(v.A,{value:r.name,label:"connectionType",helperText:r.description?o().createElement(o().Fragment,null,r.description,r.url?o().createElement(m.A,{href:r.url,rel:"noopener noreferrer",target:"_blank"},o().createElement(g.A,null)):null):null,select:!0,fullWidth:!0,onChange:function(e){return i(t.find((function(t){return t.name===e.target.value})))},variant:"outlined"},t.map((function(e){return o().createElement(b.A,{key:e.name,value:e.name},e.displayName||e.name)}))):null)}));var S=r(56880);function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>we});var n=r(41486),o=r.n(n),i=r(46186),a=r(63614),u=r(25705),c=r(60276),l=r(78410),s=r(57525),f=r(15542),p=r(29230),d=r(17712),h=r(18350),y=r(63774),v=r(64568),m=r(84092),b=r(3024),g=r(72731),w=r(54133),S=r(56588),A=r(22970),x=r(33774),O=r(11898),E=r(6197),j=r(87931),P=r(92770),k=r(36304),C=r(26520),_=r(84982),L=r(85836),T=r(34014),I=r(37292),M=r(74002),R=r(11765),N=r(44507);function F(e){return function(e){if(Array.isArray(e))return z(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||B(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||B(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(e,t){if(e){if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?z(e,t):void 0}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function oe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ie(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>F});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(45342),c=r(64568),l=r(87931),s=r(44507),f=r(26278),p=r(92770),d=r(80426),h=r(15002),y=r(32408),v=r(84946),m=r(99238),b=r(74002),g=r(54133),w=r(23950),S=r(11765);const A=(0,i.observer)((function(e){var t=e.rootModel,r=e.setIsAssemblyBeingEdited,n=e.setAssemblyBeingEdited,i=t.jbrowse.assemblies;return o().createElement(f.A,{component:p.A},o().createElement(d.A,null,o().createElement(h.A,null,o().createElement(y.A,null,o().createElement(v.A,null,"Name"),o().createElement(v.A,null,"Display name"),o().createElement(v.A,null,"Aliases"),o().createElement(v.A,null,"Actions"))),o().createElement(m.A,null,i.map((function(e){var i=(0,g.readConfObject)(e,"name"),a=(0,g.readConfObject)(e,"displayName"),u=(0,g.readConfObject)(e,"aliases");return o().createElement(y.A,{key:i},o().createElement(v.A,null,i),o().createElement(v.A,null,a),o().createElement(v.A,null,u?u.toString():""),o().createElement(v.A,null,o().createElement(b.A,{"data-testid":"".concat(i,"-edit"),onClick:function(){r(!0),n(e)}},o().createElement(w.A,{color:"primary"})),o().createElement(b.A,{"data-testid":"".concat(i,"-delete"),onClick:function(){return function(e){t.jbrowse.removeAssemblyConf(e)}(i)}},o().createElement(S.A,{color:"error"}))))})))))}));var x=r(22970),O=r(60276),E=r(68015);function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return P(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?P(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function P(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>Tt});var n=r(41486),o=r.n(n),i=r(46186);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}var u,c=["children","defaultHeight","defaultWidth","disableHeight","disableWidth","nonce","onResize","style","tagName"];function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',i=r.head||r.getElementsByTagName("head")[0],a=r.createElement("style");a.id="detectElementResize",a.type="text/css",null!=e&&a.setAttribute("nonce",e),a.styleSheet?a.styleSheet.cssText=n:a.appendChild(r.createTextNode(n)),i.appendChild(a)}}(f),i.__resizeLast__={},i.__resizeListeners__=[],(i.__resizeTriggers__=f.createElement("div")).className="resize-triggers";var d=f.createElement("div");d.className="expand-trigger",d.appendChild(f.createElement("div"));var h=f.createElement("div");h.className="contract-trigger",i.__resizeTriggers__.appendChild(d),i.__resizeTriggers__.appendChild(h),i.appendChild(i.__resizeTriggers__),a(i),i.addEventListener("scroll",c,!0),n&&(i.__resizeTriggers__.__animationListener__=function(e){e.animationName===r&&a(i)},i.__resizeTriggers__.addEventListener(n,i.__resizeTriggers__.__animationListener__))}i.__resizeListeners__.push(s)}},removeResizeListener:function(e,t){if(l)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",c,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(n,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(e){}}}}}(t),this._detectElementResize.addResizeListener(r,this._onResize)),this._onResize()}}},{key:"componentWillUnmount",value:function(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),null!==this._timeoutId&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}},{key:"render",value:function(){var e=this.props,t=e.children,r=(e.defaultHeight,e.defaultWidth,e.disableHeight),o=void 0!==r&&r,i=e.disableWidth,a=void 0!==i&&i,u=(e.nonce,e.onResize,e.style),l=void 0===u?{}:u,f=e.tagName,p=void 0===f?"div":f,d=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,c),h=this.state,y=h.height,v=h.scaledHeight,m=h.scaledWidth,b=h.width,g={overflow:"visible"},w={},S=!1;return o||(0===y&&(S=!0),g.height=0,w.height=y,w.scaledHeight=v),a||(0===b&&(S=!0),g.width=0,w.width=b,w.scaledWidth=m),(0,n.createElement)(p,s({ref:this._setRef,style:s(s({},g),l)},d),!S&&t(w))}}])&&f(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.Component),E=r(55126),j=r(11318),P=r(60276),k=r(3024),C=r(57525),_=r(44507);function L(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0}:function(){return!0},x=function e(t){for(;null!==b;){if(!A(t))return void requestIdleCallback(e,d);if(b.visited)b.visited=!1,b=null!==b.sibling?b.sibling:b.parent,w=b;else{var o=y.next(h.get(b)).value;if(void 0===o){g?g=!1:(b.isShown&&f.push(b.public.data.id),b.visited=null!==b.child,b=null!==b.child?b.child:null!==b.sibling?b.sibling:b.parent),w=b;continue}var i=n(o.data,r,g?void 0:b,l?s.get(o.data.id):void 0);p.set(i.public.data.id,i),h.set(i,o),g||w!==b?w.sibling=i:w.child=i,w=i}}S&&r.setState({order:f,records:p,updateRequest:{}})};return S?requestIdleCallback(x,d):x(),void 0!==i&&u&&r.order?r:{order:f,records:p}}(e,t,r):function(e,t){var r=e.order,n=e.records,o=t.opennessState;if("object"!==z(o))return null;for(var i in o)if(n.has(i)){var a=o[i],u=n.get(i),c="boolean"==typeof a?{open:a}:a,l=c.open,s=c.subtreeCallback,f=void 0===s?F:s,p=F,d=F;u.isShown&&(l?function(){for(var e=r.indexOf(i),t=u;null!==t;){if(null!==t.sibling){t=t.sibling;break}t=t.parent}var n=null===t?r.length-1-e:r.indexOf(t.public.data.id)-1-e,o=[[e+1,n]];p=function(t){if(t.isShown=!t.parent||t.parent.public.isOpen&&t.parent.isShown,t.isShown){var r=o[o.length-1];r.push(t.public.data.id),32770===r.length&&o.push([e+1+32768*o.length,0])}},d=function(){for(var e=0;e0?Z="positive-descending":(t.scrollLeft=1,Z=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),Z}return Z}var te=function(e,t){return e};function re(e){var t,r=e.getItemOffset,o=e.getEstimatedTotalSize,i=e.getItemSize,a=e.getOffsetForIndexAndAlignment,u=e.getStartIndexForOffset,c=e.getStopIndexForStartIndex,l=e.initInstanceProps,s=e.shouldResetStyleCacheOnItemSizeChange,f=e.validateProps;return t=function(e){function t(t){var n;return(n=e.call(this,t)||this)._instanceProps=l(n.props,(0,R.A)(n)),n._outerRef=void 0,n._resetIsScrollingTimeoutId=null,n.state={instance:(0,R.A)(n),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"==typeof n.props.initialScrollOffset?n.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},n._callOnItemsRendered=void 0,n._callOnItemsRendered=Q((function(e,t,r,o){return n.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:r,visibleStopIndex:o})})),n._callOnScroll=void 0,n._callOnScroll=Q((function(e,t,r){return n.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:r})})),n._getItemStyle=void 0,n._getItemStyle=function(e){var t,o=n.props,a=o.direction,u=o.itemSize,c=o.layout,l=n._getItemStyleCache(s&&u,s&&c,s&&a);if(l.hasOwnProperty(e))t=l[e];else{var f=r(n.props,e,n._instanceProps),p=i(n.props,e,n._instanceProps),d="horizontal"===a||"horizontal"===c,h="rtl"===a,y=d?f:0;l[e]=t={position:"absolute",left:h?void 0:y,right:h?y:void 0,top:d?0:f,height:d?"100%":p,width:d?p:"100%"}}return t},n._getItemStyleCache=void 0,n._getItemStyleCache=Q((function(e,t,r){return{}})),n._onScrollHorizontal=function(e){var t=e.currentTarget,r=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;n.setState((function(e){if(e.scrollOffset===o)return null;var t=n.props.direction,a=o;if("rtl"===t)switch(ee()){case"negative":a=-o;break;case"positive-descending":a=i-r-o}return a=Math.max(0,Math.min(a,i-r)),{isScrolling:!0,scrollDirection:e.scrollOffset=t?e.call(null):o.id=requestAnimationFrame(n)}))})},n._resetIsScrolling=function(){n._resetIsScrollingTimeoutId=null,n.setState({isScrolling:!1},(function(){n._getItemStyleCache(-1,null)}))},n}(0,N.A)(t,e),t.getDerivedStateFromProps=function(e,t){return ne(e,t),f(e),null};var p=t.prototype;return p.scrollTo=function(e){e=Math.max(0,e),this.setState((function(t){return t.scrollOffset===e?null:{scrollDirection:t.scrollOffsetc.clientWidth?X():0:c.scrollHeight>c.clientHeight?X():0}this.scrollTo(a(this.props,e,t,i,this._instanceProps,u))},p.componentDidMount=function(){var e=this.props,t=e.direction,r=e.initialScrollOffset,n=e.layout;if("number"==typeof r&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===n?o.scrollLeft=r:o.scrollTop=r}this._callPropsCallbacks()},p.componentDidUpdate=function(){var e=this.props,t=e.direction,r=e.layout,n=this.state,o=n.scrollOffset;if(n.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===r)if("rtl"===t)switch(ee()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var a=i.clientWidth,u=i.scrollWidth;i.scrollLeft=u-a-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},p.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&K(this._resetIsScrollingTimeoutId)},p.render=function(){var e=this.props,t=e.children,r=e.className,i=e.direction,a=e.height,u=e.innerRef,c=e.innerElementType,l=e.innerTagName,s=e.itemCount,f=e.itemData,p=e.itemKey,d=void 0===p?te:p,h=e.layout,y=e.outerElementType,v=e.outerTagName,m=e.style,b=e.useIsScrolling,g=e.width,w=this.state.isScrolling,S="horizontal"===i||"horizontal"===h,A=S?this._onScrollHorizontal:this._onScrollVertical,x=this._getRangeToRender(),O=x[0],E=x[1],j=[];if(s>0)for(var P=O;P<=E;P++)j.push((0,n.createElement)(t,{data:f,key:d(P,f),index:P,isScrolling:b?w:void 0,style:this._getItemStyle(P)}));var k=o(this.props,this._instanceProps);return(0,n.createElement)(y||v||"div",{className:r,onScroll:A,ref:this._outerRefSetter,style:(0,M.A)({position:"relative",height:a,width:g,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:i},m)},(0,n.createElement)(c||l||"div",{children:j,ref:u,style:{height:S?"100%":k,pointerEvents:w?"none":void 0,width:S?k:"100%"}}))},p._callPropsCallbacks=function(){if("function"==typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],r=e[1],n=e[2],o=e[3];this._callOnItemsRendered(t,r,n,o)}if("function"==typeof this.props.onScroll){var i=this.state,a=i.scrollDirection,u=i.scrollOffset,c=i.scrollUpdateWasRequested;this._callOnScroll(a,u,c)}},p._getRangeToRender=function(){var e=this.props,t=e.itemCount,r=e.overscanCount,n=this.state,o=n.isScrolling,i=n.scrollDirection,a=n.scrollOffset;if(0===t)return[0,0,0,0];var l=u(this.props,a,this._instanceProps),s=c(this.props,l,a,this._instanceProps),f=o&&"backward"!==i?1:Math.max(1,r),p=o&&"forward"!==i?1:Math.max(1,r);return[Math.max(0,l-f),Math.max(0,Math.min(t-1,s+p)),l,s]},t}(n.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var ne=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},oe=function(e,t,r){var n=e.itemSize,o=r.itemMetadataMap,i=r.lastMeasuredIndex;if(t>i){var a=0;if(i>=0){var u=o[i];a=u.offset+u.size}for(var c=i+1;c<=t;c++){var l=n(c);o[c]={offset:a,size:l},a+=l}r.lastMeasuredIndex=t}return o[t]},ie=function(e,t,r,n,o){for(;n<=r;){var i=n+Math.floor((r-n)/2),a=oe(e,i,t).offset;if(a===o)return i;ao&&(r=i-1)}return n>0?n-1:0},ae=function(e,t){var r=e.itemCount,n=t.itemMetadataMap,o=t.estimatedItemSize,i=t.lastMeasuredIndex,a=0;if(i>=r&&(i=r-1),i>=0){var u=n[i];a=u.offset+u.size}return a+(r-i-1)*o},ue=re({getItemOffset:function(e,t,r){return oe(e,t,r).offset},getItemSize:function(e,t,r){return r.itemMetadataMap[t].size},getEstimatedTotalSize:ae,getOffsetForIndexAndAlignment:function(e,t,r,n,o,i){var a=e.direction,u=e.height,c=e.layout,l=e.width,s="horizontal"===a||"horizontal"===c?l:u,f=oe(e,t,o),p=ae(e,o),d=Math.max(0,Math.min(p-s,f.offset)),h=Math.max(0,f.offset-s+f.size+i);switch("smart"===r&&(r=n>=h-s&&n<=d+s?"auto":"center"),r){case"start":return d;case"end":return h;case"center":return Math.round(h+(d-h)/2);default:return n>=h&&n<=d?n:n0?n[o].offset:0)>=r?ie(e,t,o,0,r):function(e,t,r,n){for(var o=e.itemCount,i=1;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:new Map;e.id&&e.children.length&&t.set(e.id,e);var r,n=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return me(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?me(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.children);try{for(n.s();!(r=n.n()).done;)ge(r.value,t)}catch(e){n.e(e)}finally{n.f()}return t}function we(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith("(Unsupported)")||e.endsWith("(Unknown)")}function Se(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=xe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ae(e){return function(e){if(Array.isArray(e))return Oe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function xe(e,t){if(e){if("string"==typeof e)return Oe(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Oe(e,t):void 0}}function Oe(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ze(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return Ge(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ge(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ge(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u({connectionConf:e,safelyBreakConnection:c,dereferenceTypeCount:l,name:o}):c()}t&&s({name:o,connectionConf:e})}return o().createElement(o().Fragment,null,o().createElement(Ke(),{menuItems:[{label:"Open faceted track selector",onClick:function(){g(!0)}}].concat(Xe((0,C.isSessionWithAddTracks)(r)?[{label:"Add track...",onClick:function(){(0,C.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddTrackWidget","addTrackWidget",{view:t.view.id}))}}]:[]),[{label:"Connections...",subMenu:[].concat(Xe((0,C.isSessionModelWithConnections)(r)?[{label:"Turn on/off connections...",onClick:function(){return d(!0)}}]:[]),Xe((0,C.isSessionModelWithConnectionEditing)(r)?[{label:"Add connection...",onClick:function(){(0,C.isSessionModelWithWidgets)(r)&&r.showWidget(r.addWidget("AddConnectionWidget","addConnectionWidget"))}},{label:"Delete connections...",onClick:function(){return v(!0)}}]:[]))},{label:"Sort...",type:"subMenu",subMenu:[{label:"Sort tracks by name",type:"checkbox",checked:t.activeSortTrackNames,onClick:function(){return t.setSortTrackNames(!t.activeSortTrackNames)}},{label:"Sort categories by name",type:"checkbox",checked:t.activeSortCategories,onClick:function(){return t.setSortCategories(!t.activeSortCategories)}}]},{label:"Collapse...",type:"subMenu",subMenu:[].concat(Xe(t.hasAnySubcategories?[{label:"Collapse subcategories",onClick:function(){return t.collapseSubCategories()}}]:[]),[{label:"Collapse top-level categories",onClick:function(){return t.collapseTopLevelCategories()}},{label:"Expand all categories",onClick:function(){return t.expandAllCategories()}}])}])},o().createElement(Je.A,null)),o().createElement(n.Suspense,{fallback:null},a?o().createElement(nt,{modalInfo:a,onClose:function(){return u(void 0)}}):null,l?o().createElement(ot,{handleClose:function(){return s(void 0)},deleteDialogDetails:l,session:r}):null,y?o().createElement(it,{handleClose:function(){return v(!1)},breakConnection:w,session:r}):null,p?o().createElement(at,{handleClose:function(){return d(!1)},session:r,breakConnection:w}):null,b?o().createElement(rt,{handleClose:function(){return g(!1)},model:t}):null))}));var ct=r(20160),lt=r(84508),st=r(87411),ft=r(6197);function pt(e){return function(e){if(Array.isArray(e))return ht(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||dt(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function dt(e,t){if(e){if("string"==typeof e)return ht(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ht(e,t):void 0}}function ht(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{A:()=>y});var n=r(41486),o=r.n(n),i=r(84508),a=r(46186),u=r(57525),c=r(86012),l=r(51957),s=r.n(l);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>d});var n=r(41486),o=r.n(n),i=r(91118),a=r(56326),u=r(85836),c=r(34014),l=r(45342),s=r(64568),f=r(87931);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(41486),o=r.n(n),i=r(91118),a=r(56326),u=r(45342),c=r(64568),l=r(87931);const s=(0,r(46186).observer)((function(e){var t=e.deleteDialogDetails,r=e.session,n=e.handleClose,s=t.connectionConf,f=t.name;return o().createElement(l.Dialog,{open:!0,title:'Delete connection "'.concat(f,'"')},o().createElement(i.A,null,o().createElement(a.A,null,"Are you sure you want to delete this connection?")),o().createElement(u.A,null,o().createElement(c.A,{onClick:function(){return n()},color:"primary"},"Cancel"),o().createElement(c.A,{variant:"contained",color:"primary",onClick:function(){var e;s&&(null===(e=r.deleteConnection)||void 0===e||e.call(r,s)),n()}},"OK")))}))},36894:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>m});var n=r(41486),o=r.n(n),i=r(91118),a=r(15542),u=r(74002),c=r(18334),l=r(45342),s=r(64568),f=r(87931),p=r(3024),d=r(46186),h=r(54133),y=r(98784),v=(0,p.makeStyles)()((function(e){return{connectionContainer:{margin:e.spacing(4),width:500}}}));const m=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection,p=v().classes,d=t.adminMode,m=t.connections,b=t.sessionConnections;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Delete connections"},o().createElement(i.A,null,o().createElement(a.A,null,"Click the X icon to delete the connection from your config completely"),o().createElement("div",{className:p.connectionContainer},m.map((function(e){var t=(0,h.readConfObject)(e,"name");return o().createElement(a.A,{key:"conn-".concat(t)},d||(null==b?void 0:b.includes(e))?o().createElement(u.A,{onClick:function(){return n(e,!0)}},o().createElement(y.default,{color:"error"})):o().createElement(c.A,{title:"Unable to delete connection in config file as non-admin user"},o().createElement(u.A,null,o().createElement(y.default,{color:"disabled"}))),t)})),m.length?null:o().createElement(a.A,null,"No connections found"))),o().createElement(l.A,null,o().createElement(s.A,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},16279:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>b});var n=r(41486),o=r.n(n),i=r(33774),a=r(11898),u=r(15542),c=r(91118),l=r(45342),s=r(64568),f=r(87931),p=r(3024),d=r(46186),h=r(54133),y=(0,p.makeStyles)()((function(e){return{connectionContainer:{width:500,margin:e.spacing(4)}}})),v=(0,d.observer)((function(e){var t,r=e.conf,n=e.session,u=e.breakConnection,c=n.connectionInstances,l=void 0===c?[]:c,s=(0,h.readConfObject)(r,"name"),f=(0,h.readConfObject)(r,"assemblyNames"),p=l.find((function(e){return s===e.name}));return o().createElement(i.A,{key:r.connectionId,control:o().createElement(a.A,{checked:!!p,onChange:function(){var e;p?u(r):null===(e=n.makeConnection)||void 0===e||e.call(n,r)},color:"primary"}),label:[s,f.length?"(".concat((t=f.join(","),t.length>20?"".concat(t.slice(0,20),"..."):t),")"):""].filter((function(e){return!!e})).join(" ")})})),m=(0,d.observer)((function(e){var t=e.session,r=e.breakConnection,n=y().classes;return o().createElement("div",{className:n.connectionContainer},t.connections.length?t.connections.map((function(e,n){return o().createElement("div",{key:e.name+"_"+n},o().createElement(v,{conf:e,session:t,breakConnection:r}))})):o().createElement(u.A,null,"No connections found"))}));const b=(0,d.observer)((function(e){var t=e.session,r=e.handleClose,n=e.breakConnection;return o().createElement(f.Dialog,{open:!0,onClose:r,maxWidth:"lg",title:"Turn on/off connections"},o().createElement(c.A,null,o().createElement(u.A,null,"Use the checkbox to turn on/off connections"),o().createElement(m,{session:t,breakConnection:n})),o().createElement(l.A,null,o().createElement(s.A,{onClick:function(){return r()},variant:"contained",color:"primary"},"Close")))}))},60252:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>ee});var n=r(41486),o=r.n(n),i=r(91118),a=r(87931),u=r(46186),c=r(77090),l=r(72731),s=r(80142),f=r(5912),p=r(94107),d=r.n(p),h=r(7118),y=r.n(h),v=r(57525),m=r(44563),b=r(3024),g=r(68015),w=r(22970),S=r(37292),A=r(74002),x=r(3365),O=r(50784),E=r(20160);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function H(e,t){if(e){if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?V(e,t):void 0}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e,t){var r;return"".concat((e.startsWith("metadata.")?null===(r=t.metadata)||void 0===r?void 0:r[e.replace("metadata.","")]:t[e])||"")}r.d(t,{a:()=>n})},54713:(e,t,r)=>{"use strict";r.d(t,{A:()=>y});var n=r(41486),o=r.n(n),i=r(3024),a=r(57525),u=r(51957),c=r.n(u),l=r(94445),s=r(634),f=r(67706);function p(e){return function(e){if(Array.isArray(e))return d(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(41486),o=r.n(n),i=r(46186),a=r(87931),u=r(91118),c=r(56326),l=r(22970),s=r(91542),f=r(45342),p=r(64568),d=r(3024),h=r(57525),y=r(74002),v=r(52371);function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(41486),o=r.n(n),i=r(91118),a=r(15542),u=r(45342),c=r(64568),l=r(87931);function s(e){var t=e.onClose,r=e.plugin;return o().createElement(l.Dialog,{open:!0,onClose:function(){return t()},title:"Remove ".concat(r)},o().createElement(i.A,null,o().createElement(a.A,null,"Please confirm that you want to remove ",r,"."),o().createElement(a.A,{color:"error"},"Note: if any resources in this session still use this plugin, it may cause your session to crash")),o().createElement(u.A,null,o().createElement(c.A,{variant:"contained",color:"primary",onClick:function(){window.setTimeout((function(){t(r)}),500)}},"Confirm"),o().createElement(c.A,{variant:"contained",color:"secondary",onClick:function(){t()}},"Cancel")))}},85126:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>K});var n=r(41486),o=r.n(n),i=r(15542),a=r(64568),u=r(22970),c=r(37292),l=r(74002),s=r(56230),f=r(8112),p=r(3024),d=r(46186),h=r(72731),y=r(87931),v=r(57525),m=r(52371),b=r(3365),g=r(42936),w=r(85836),S=r(18334),A=r(34014),x=r(98784),O=r(9165),E=r(35795);function j(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?u.filter((function(e){return e.name.toLowerCase().includes(a.toLowerCase())})).map((function(e){return o().createElement(_,{key:e.name,plugin:e,model:r})})):o().createElement(i.A,null,"No plugins currently installed"))}));var T=r(26520),I=r(84982),M=r(56588),R=r(64150),N=r(10463),F=r(44507),D=r(63084);function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function V(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function W(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rxe});var c=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={};var n,i,a,u,c,l=null!=r?r:{},s=l.checkIndent,f=void 0===s||s,p=l.skipValidation,d=void 0!==p&&p,h=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,c=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return u=e.done,e},e:function(e){c=!0,a=e},f:function(){try{u||null==r.return||r.return()}finally{if(c)throw a}}}}("string"==typeof t?t.trimEnd().split(/\r?\n/):t||[]);try{for(h.s();!(a=h.n()).done;){var y=a.value;if(""===y)throw new Error("Invalid stanza, contained blank lines");if(!y.trim().startsWith("#"))if(y.trimEnd().endsWith("\\")){var v=y.trimEnd().slice(0,-1);i?i+=v.trimStart():i=v}else{var m=y;if(i&&(m=i+m.trimStart(),i=void 0),null!=n?n:f){var b=m.match(/^([ \t]+)/);if(void 0===n)n=b?(u=b,c=2,function(e){if(Array.isArray(e))return e}(u)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(u,c)||o(u,c)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())[1]:"";else if(""===n&&null!==b||n&&b&&n!==b[1])throw new Error("Inconsistent indentation of stanza")}else n="";var g=m.trim(),w=g.indexOf(" ");if(-1!==w){var S=g.slice(0,w),A=g.slice(w+1);if(this.data[S]&&A!==this.data[S])throw new Error("Got duplicate key with a different value in stanza: "+'"'.concat(S,'" key has both ').concat(this.data[S]," and ").concat(A));this.nameKey||(this.nameKey=S,this.name=g.slice(w+1)),this.data[S]=A}else{if(!this.nameKey)throw new Error("First line in a stanza must have both a key and a value");if(this.data[g])continue;this.data[g]=""}}}}catch(e){h.e(e)}finally{h.f()}d||this.validate()}var t,r;return t=e,(r=[{key:"validate",value:function(){}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1?arguments[1]:void 0;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={};var n,o=null!=r?r:{},i=o.checkIndent,a=void 0===i||i,u=o.skipValidation,l=void 0!==u&&u,f=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}("string"==typeof t?t.trimEnd().split(/(?:[\t ]*\r?\n){2,}/):t||[]);try{for(f.s();!(n=f.n()).done;){var p=n.value;if(""===p)throw new Error("Invalid stanza, was empty");if(!p.trim().startsWith("#")||!p.trimEnd().split(/\r?\n/).map((function(e){return e.trim()})).every((function(e){return e.startsWith("#")}))){var d=new c(p,{checkIndent:a});if(this.nameKey){if(d.nameKey!==this.nameKey)throw new Error("The first line in each stanza must have the same key. "+"Saw both ".concat(this.nameKey," and ").concat(d.nameKey))}else this.nameKey=d.nameKey;if(!d.name)throw new Error("No stanza name: ".concat(d.name));if(this.data[d.name])throw new Error("Got duplicate stanza name: ".concat(d.name));this.data[d.name]=d}}}catch(e){f.e(e)}finally{f.f()}l||this.validate()}var t,r;return t=e,(r=[{key:"validate",value:function(){}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r2&&void 0!==arguments[2]?arguments[2]:"",o=[],i=function(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return h(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(t);try{for(i.s();!(r=i.n()).done;){var a=r.value;e.data[a]||o.push(a)}}catch(e){i.e(e)}finally{i.f()}if(o.length>0)throw new Error("".concat(n," is missing required entr").concat(1===o.length?"y":"ies",": ").concat(o.join(", ")))}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r"');y(this.hubData,["hub","shortLabel","longLabel","email","descriptionUrl"])}},{key:"validateGenomeSection",value:function(){if("genome"!==this.genome.nameKey)throw new Error('Genomes file must begin with a line like "genome "')}}])&&_(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function M(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&void 0!==arguments[0]?arguments[0]:["genome","trackDb"];if("genome"!==this.nameKey)throw new Error('Genomes file must begin with a line like "genome "');for(var n=0,o=Object.entries(this.data);n=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function te(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function re(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return we(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?we(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function we(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0)||P.includes(E)){e.next=37;break}return e.abrupt("continue",53);case 37:if(k=c.get(E)){e.next=41;break}return o.push(E),e.abrupt("continue",53);case 41:if(C=j.data.trackDb){e.next=44;break}throw new Error("genomesFile not found on hub");case 44:return _=new URL(m,b),L=b?{uri:new URL(C,_).href,locationType:"UriLocation"}:{localPath:C,locationType:"LocalPathLocation"},e.next=48,le(L);case 48:I=e.sent,M=(0,ye.getConf)(k,["sequence","adapter"]),R=he({trackDb:I,trackDbLoc:L,assemblyName:E,sequenceAdapter:M}),t.addTrackConfs(R),S[E]=R.length;case 53:A++,e.next=32;break;case 56:N=Object.entries(S),F=N.length?"Loaded data from these assemblies: ".concat(N.map((function(e){var t=ge(e,2),r=t[0],n=t[1];return"".concat(r," (").concat(n," tracks)")})).join(", ")):"",D=o.length?"Skipped data from these assemblies: ".concat(o.join(", ")):"",n.notify([F,D].filter((function(e){return!!e})).join(". "),"success");case 60:e.next=67;break;case 62:e.prev=62,e.t0=e.catch(2),console.error(e.t0),n.notify("".concat((0,ye.getConf)(t,"name"),': "').concat(e.t0,'"'),"error"),null===(r=n.breakConnection)||void 0===r||r.call(n,t.configuration);case 67:case"end":return e.stop()}}),e,null,[[2,62]])})),Oe=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Se(i,n,o,a,u,"next",e)}function u(e){Se(i,n,o,a,u,"throw",e)}a(void 0)}))},Oe.apply(this,arguments)}},19567:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(88605),o=r(69191),i=r(99376),a=r(57525),u=r(83809);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rb)){n.next=13;break}return i.complete(),n.abrupt("return");case 13:return g=s.getFeatures(p(p({},e),{},{start:m,end:b}),t),n.next=16,(0,o._)(g.pipe((0,u.$)()));case 16:for(w=n.sent,S=(null===(c=w[0])||void 0===c?void 0:c.get("seq"))||"",A=y;A{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(22970),l=r(45342),s=r(64568),f=r(87931);function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return d(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?d(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rd?o().createElement(f.ErrorMessage,{error:"It is not recommended to make the step size larger than the window size"}):null,o().createElement(c.A,{label:"Size of sliding window (bp)",value:"".concat(d),onChange:function(e){return h(e.target.value)}}),o().createElement(c.A,{label:"Step size of sliding window (bp)",value:"".concat(v),onChange:function(e){return m(e.target.value)}}),o().createElement(l.A,null,o().createElement(s.A,{variant:"contained",onClick:function(){t.setGCContentParams({windowSize:+d,windowDelta:+v}),r()}},"Submit"),o().createElement(s.A,{variant:"contained",color:"secondary",onClick:function(){return r()}},"Cancel"))))}))},50498:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(88605),o=r(87882),i=r(99376),a=r(31056),u=r(77021),c=r(12388),l=r(67245);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,f=l.value;return f&&"object"==s(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=h(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function h(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:for(i=new TextDecoder("utf8",{fatal:!0}).decode(n),s=i.split(/\n|\r\n|\r/),f=[],h=0;h1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=m(p().mark((function r(n){var o,i,a,u,c,l;return p().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.loadData();case 4:c=r.sent,l=c.intervalTree,null===(o=l[u])||void 0===o||o.search([i,a]).forEach((function(e){return n.next(e)})),n.complete(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),n.error(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"featureData",value:function(e){var t,r,n=this,o=function(e){for(var t=1;t0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],n&&b(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter)},19534:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(88605),o=r(98976),i=r(87882),a=r(99376),u=r(77021),c=r(87906),l=r(67245),s=r(54133);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function m(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){v(i,n,o,a,u,"next",e)}function u(e){v(i,n,o,a,u,"throw",e)}a(void 0)}))}}function b(e,t){for(var r=0;r0&&void 0!==r[0]?r[0]:{},e.abrupt("return",this.gff.getReferenceSequenceNames(t));case 2:case"end":return e.stop()}}),e,this)}))),function(){return v.apply(this,arguments)})},{key:"getHeader",value:(d=m(y().mark((function e(){return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.gff.getHeader());case 1:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,a.ObservableCreate)(function(){var n=m(y().mark((function n(o){var i;return y().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.gff.getMetadata();case 2:return i=n.sent,n.next=5,t.getFeaturesHelper(e,r,i,o,!0);case 5:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"getFeaturesHelper",value:(f=m(y().mark((function e(t){var r,n,i,a,u,c,s,f,p,d=this,v=arguments;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=v.length>1&&void 0!==v[1]?v[1]:{},n=v.length>2?v[2]:void 0,i=v.length>3?v[3]:void 0,a=v.length>4?v[4]:void 0,u=v.length>5&&void 0!==v[5]?v[5]:t,e.prev=5,c=[],e.next=9,this.gff.getLines(t.refName,t.start,t.end,(function(e,t){c.push(d.parseLine(n.columnNumbers,e,t))}));case 9:if(!a||!c.length){e.next=17;break}if(s=1/0,f=-1/0,c.forEach((function(e){var t=e.fields[2];if(!d.dontRedispatch.includes(t)){var r=e.start-1;rf&&(f=e.end)}})),!(f>t.end||s0&&(o.subfeatures=e.child_features.flatMap((function(e){return e.map((function(e){return n.featureData(e)}))}))),delete o.child_features,delete o.data,delete o._linehash,delete o.attributes,delete o.seq_id,o}},{key:"freeResources",value:function(){}}],n&&b(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter)},36884:(e,t,r)=>{"use strict";r.r(t),r.d(t,{createFinalConfig:()=>L,fetchConfigFile:()=>I,fetchJb1:()=>C,parseJb1:()=>R});var n=r(87882),o=r(92950),i=r.n(o),a=r(43370),u=r.n(a),c=r(57525);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e){return(null==e?void 0:e.label)&&"string"==typeof e.label}function f(e,t){for(var r=0,n=Object.keys(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function O(e){return O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},O(e)}function E(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function j(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){E(i,n,o,a,u,"next",e)}function u(e){E(i,n,o,a,u,"throw",e)}a(void 0)}))}}function P(e){return void 0!==e.uri}function k(e){return void 0!==e.localPath}function C(){return _.apply(this,arguments)}function _(){return _=j(x().mark((function e(){var t,r,n,o,i,a,u,c,l,s,f,p,d,h,y=arguments;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=y.length>1&&void 0!==y[1]?y[1]:{include:["{dataRoot}/trackList.json","{dataRoot}/tracks.conf"]},n=y.length>2&&void 0!==y[2]?y[2]:{uri:"",locationType:"UriLocation"},o="uri"in(t=y.length>0&&void 0!==y[0]?y[0]:{uri:"",locationType:"UriLocation"})?"uri":"localPath",i=JSON.parse(JSON.stringify(t)),a="",P(t)&&(a=t.uri),k(t)&&(a=t.localPath),a.endsWith("/")&&(i[o]=a.slice(0,-1)),!(P(n)&&n.uri||k(n)&&n.localPath)){e.next=35;break}u="uri"in n?"uri":"localPath",c="",P(n)&&(c=n.uri),k(n)&&(c=n.localPath),c.endsWith("/")&&(c=c.slice(0,-1)),l={},s=0,f=["jbrowse.conf","jbrowse_conf.json"];case 17:if(!(s1&&void 0!==o[1]?o[1]:U),t),e.next=4,D(r);case 4:return G(n=N(n=e.sent,t)||n,n),H(n),e.abrupt("return",n);case 9:case"end":return e.stop()}}),e)}))),T.apply(this,arguments)}function I(e){return M.apply(this,arguments)}function M(){return(M=j(x().mark((function e(t){var r;return x().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,n.openLocation)(t).readFile("utf8");case 2:if(r=e.sent,!P(t)){e.next=5;break}return e.abrupt("return",R(r,t.uri));case 5:if(!k(t)){e.next=7;break}return e.abrupt("return",R(r,t.localPath));case 7:return e.abrupt("return",R(r));case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function R(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.trim().startsWith("{")?function(e,t){if("string"==typeof e){var r;try{r=JSON.parse(e)}catch(e){throw new Error("".concat(e," when parsing configuration."))}return w(r,t)}return w(e,t)}(e,t):g(e,t)}function N(e,t){if(null===t)return null;null===e&&(e={});for(var r=0,n=Object.keys(t);r{"use strict";r.r(t),r.d(t,{convertTrackConfig:()=>f,createRefSeqsAdapter:()=>p});var n=r(87882),o=r(57525),i=r(6197);function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,c)}),(function(e){r("throw",e,a,c)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>Ie});var n=r(23842),o=r(84137),i=r.n(o),a=r(87791),u=r.n(a);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r){var n,o,i,a=arguments;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=(a.length>2&&void 0!==a[2]?a[2]:{}).defaultContent,o=void 0===n?{}:n,e.prev=2,e.next=5,r(t,{encoding:"utf8"});case 5:return i=e.sent,e.abrupt("return",JSON.parse(i));case 9:if(e.prev=9,e.t0=e.catch(2),"ENOENT"!==e.t0.code&&404!==e.t0.status){e.next=13;break}return e.abrupt("return",o);case 13:throw e.t0;case 14:case"end":return e.stop()}}),e,null,[[2,9]])})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}function d(e){return d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},d(e)}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(){y=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",h="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==d(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:h,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function v(e){return function(e){if(Array.isArray(e))return g(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||b(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||b(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1;)r(e[n=o+i>>>1])>=t?i=n:o=n;return r===this.end?i:o}},{key:"readChunkItems",value:function(e){return f(n.resolve(this.baseURL,this.lazyUrlTemplate.replace(/\{Chunk\}/gi,e)),this.readFile,{defaultContent:[]})}},{key:"iterateSublist",value:function(e,t,r,n,o,i,a){var u=this;return A(y().mark((function c(){var l,s,f,p,d,h,b,g,w,S;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:l=u.attrs.makeGetter("Chunk"),s=u.attrs.makeGetter("Sublist"),f=[],p=y().mark((function c(){var p,h,v;return y().wrap((function(c){for(;;)switch(c.prev=c.next){case 0:if(e[d][0]!==u.lazyClass){c.next=6;break}p=l(e[d]),h=u.chunkCache.get(p,p).then((function(e){return[e,p]})),f.push(h),c.next=8;break;case 6:return c.next=8,[e[d],a.concat(d)];case 8:if(!(v=s(e[d]))){c.next=11;break}return c.delegateYield(O(j(u.iterateSublist(v,t,r,n,o,i,a.concat(d)))),"t0",11);case 11:case"end":return c.stop()}}),c)})),d=u.binarySearch(e,t,o);case 5:if(!(d=0&&n*i(e[d])t?-1:1,i=e>t?r.start:r.end,a=e>t?r.end:r.start,!(r.topList.length>0)){n.next=5;break}return n.delegateYield(O(j(r.iterateSublist(r.topList,e,t,o,i,a,[0]))),"t0",5);case 5:case"end":return n.stop()}}),n)})))()}},{key:"histogram",value:(o=y().mark((function e(t,r,n){var o,i,a,u,c,l,s,f,p,d,h;return y().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(o=new Array(n)).fill(0),i=(r-t)/n,a=!1,u=!1,e.prev=5,l=j(this.iterate(t,r));case 7:return e.next=9,l.next();case 9:if(!(a=!(s=e.sent).done)){e.next=17;break}for(f=s.value,p=Math.max(0,(this.start(f)-t)/i|0),d=Math.min(n,(this.end(f)-t)/i|0),h=p;h<=d;h+=1)o[h]+=1;case 14:a=!1,e.next=7;break;case 17:e.next=23;break;case 19:e.prev=19,e.t0=e.catch(5),u=!0,c=e.t0;case 23:if(e.prev=23,e.prev=24,!a||null==l.return){e.next=28;break}return e.next=28,l.return();case 28:if(e.prev=28,!u){e.next=31;break}throw c;case 31:return e.finish(28);case 32:return e.finish(23);case 33:return e.abrupt("return",o);case 34:case"end":return e.stop()}}),e,this,[[5,19,23,33],[24,,28,32]])})),a=function(){var e=this,t=arguments;return new Promise((function(r,n){var i=o.apply(e,t);function a(e){h(i,r,n,a,u,"next",e)}function u(e){h(i,r,n,a,u,"throw",e)}a(void 0)}))},function(e,t,r){return a.apply(this,arguments)})}],r&&w(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function _(e,t){for(var r=0;r=e.length||!(t in e[n])?t in this.classes[e[0]].proto?this.classes[e[0]].proto[t]:void 0:e[n][t]}},{key:"makeSetter",value:function(e){var t=this;return function(r,n){t.set(r,e,n)}}},{key:"makeGetter",value:function(e){var t=this;return function(r){return t.get(r,e)}}},{key:"makeFastGetter",value:function(e){var t=this.attrIndices(e);return function(e){if(void 0!==t[e[0]])return e[t[e[0]]]}}},{key:"accessors",value:function(){return this._accessors||(this._accessors=this._makeAccessors()),this._accessors}},{key:"_makeAccessors",value:function(){var e={},t={get:function(e){var t=this.get.field_accessors[e.toLowerCase()];if(t)return t.call(this)},set:function(e,t){var r=this.set.field_accessors[e];if(r)return r.call(this,t)},tags:function(){return r[this[0]]||[]}};t.get.field_accessors={},t.set.field_accessors={},this.classes.forEach((function(t,r){(t.attributes||[]).forEach((function(t,n){e[t]=e[t]||[],e[t][r]=n+1,t=t.toLowerCase(),e[t]=e[t]||[],e[t][r]=n+1}))}));var r=this.classes.map((function(e){return e.attributes}));return Object.keys(e).forEach((function(r){var n=e[r];t.get.field_accessors[r]=n?function(){return this[n[this[0]]]}:function(){}})),t}}])&&_(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}();function I(e){return I="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},I(e)}function M(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function R(){R=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==I(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function N(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return F(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?F(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function F(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function K(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function J(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){K(i,n,o,a,u,"next",e)}function u(e){K(i,n,o,a,u,"throw",e)}a(void 0)}))}}function X(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Z(e){for(var t=1;t=a})),s=u._histograms.meta[0],f=0;f=u._histograms.meta[f].basesPerBin&&(s=u._histograms.meta[f]);if(!((p=a/s.basesPerBin)>.9&&Math.abs(p-Math.round(p))<1e-4)){e.next=52;break}for(d=Math.floor(n/s.basesPerBin),p=Math.round(p),h=[],y=0;y=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function xe(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Oe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){xe(i,n,o,a,u,"next",e)}function u(e){xe(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Ee(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{};return(0,pe.ObservableCreate)(function(){var n=Oe(Ae().mark((function n(o){var i,a,u,c,l,s,f;return Ae().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=r.signal,a=!1,u=!1,n.prev=3,l=Le(t.nclist.getFeatures(e,r));case 5:return n.next=7,l.next();case 7:if(!(a=!(s=n.sent).done)){n.next=14;break}f=s.value,(0,de.checkAbortSignal)(i),o.next(t.wrapFeature(f));case 11:a=!1,n.next=5;break;case 14:n.next=20;break;case 16:n.prev=16,n.t0=n.catch(3),u=!0,c=n.t0;case 20:if(n.prev=20,n.prev=21,!a||null==l.return){n.next=25;break}return n.next=25,l.return();case 25:if(n.prev=25,!u){n.next=28;break}throw c;case 28:return n.finish(25);case 29:return n.finish(20);case 30:o.complete();case 31:case"end":return n.stop()}}),n,null,[[3,16,20,30],[21,,25,29]])})));return function(e){return n.apply(this,arguments)}}())}},{key:"wrapFeature",value:function(e){return new we(e,void 0,"".concat(this.id,"-").concat(e.id()))}},{key:"hasDataForRefName",value:(i=Oe(Ae().mark((function e(t){var r,n;return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.nclist.getDataRoot(t);case 2:return n=e.sent,e.abrupt("return",!!(null===(r=null==n?void 0:n.stats)||void 0===r?void 0:r.featureCount));case 4:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"getRefNames",value:(o=Oe(Ae().mark((function e(){return Ae().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",this.configRefNames||[]);case 1:case"end":return e.stop()}}),e,this)}))),function(){return o.apply(this,arguments)})},{key:"freeResources",value:function(){}}],n&&Ee(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(fe.BaseFeatureDataAdapter)},61277:(e,t,r)=>{function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o=r(85832).Buffer,i=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];function a(e){if(o.isBuffer(e))return e;var t="function"==typeof o.alloc&&"function"==typeof o.from;if("number"==typeof e)return t?o.alloc(e):new o(e);if("string"==typeof e)return t?o.from(e):new o(e);throw new Error("input must be buffer, number, or string, received "+n(e))}function u(e,t){e=a(e),o.isBuffer(t)&&(t=t.readUInt32BE(0));for(var r=-1^~~t,n=0;n>>8;return-1^r}function c(){return e=u.apply(null,arguments),(t=a(4)).writeInt32BE(e,0),t;var e,t}"undefined"!=typeof Int32Array&&(i=new Int32Array(i)),c.signed=function(){return u.apply(null,arguments)},c.unsigned=function(){return u.apply(null,arguments)>>>0},e.exports=c},96953:(e,t,r)=>{"use strict";r.d(t,{$G:()=>f,Db:()=>p,fK:()=>d});var n=r(41486),o=r.n(n),i=r(3024),a=r(46186);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{"use strict";r.d(t,{A:()=>l});var n=r(41486),o=r.n(n),i=r(64568),a=r(84092),u=r(18334),c=(0,r(3024).makeStyles)()({ellipses:{textOverflow:"ellipsis",overflow:"hidden"}});function l(e){var t=e.message,r=e.severity,n=e.buttonText,l=e.icon,s=e.action,f=c().classes,p=s?o().createElement(i.A,{"data-testid":"reload_button",onClick:s,startIcon:l},n):null;return o().createElement(a.A,{severity:r,action:p,classes:{message:f.ellipses}},o().createElement(u.A,{title:t},o().createElement("div",null,t)))}},42724:(e,t,r)=>{"use strict";r.r(t),r.d(t,{renderBaseLinearDisplaySvg:()=>y});var n=r(41486),o=r.n(n),i=r(57525),a=r(16619),u=r(58680);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t{"use strict";r.d(t,{A:()=>E,s:()=>j});var n=r(72731),o=r(54133),i=r(57525),a=r(20191),u=r(35795),c=r(6197),l=r(41486),s=r.n(l),f=r(3024),p=r(46186),d=r(87931),h=r(75715),y=r(60776),v=(0,f.makeStyles)()((function(e){var t=e.palette.action.disabledBackground;return{loading:{paddingLeft:"0.6em",backgroundColor:e.palette.background.default,backgroundImage:"repeating-linear-gradient(45deg, transparent, transparent 5px, ".concat(t," 5px, ").concat(t," 10px)"),textAlign:"center"}}})),m=(0,p.observer)((function(e){var t=e.model,r=v().classes,o=t.status,i=(0,n.getParent)(t,2).message||o;return s().createElement("div",{className:r.loading},s().createElement(d.LoadingEllipses,{message:i}))}));const b=(0,p.observer)((function(e){var t=e.model;return t.error?s().createElement(y.A,{message:"".concat(t.error),severity:"error",buttonText:"reload",icon:s().createElement(h.A,null),action:t.reload}):t.message?s().isValidElement(t.message)?t.message:s().createElement(y.A,{message:"".concat(t.message),severity:"info"}):t.filled?t.reactElement:s().createElement(m,{model:t})}));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function S(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function x(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function O(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){x(i,n,o,a,u,"next",e)}function u(e){x(i,n,o,a,u,"throw",e)}a(void 0)}))}}const E=n.types.model("BlockState",{key:n.types.string,region:a.Region,reloadFlag:0,isLeftEndOfDisplayedRegion:!1,isRightEndOfDisplayedRegion:!1}).volatile((function(){return{renderInProgress:void 0,filled:!1,reactElement:void 0,features:void 0,layout:void 0,status:"",error:void 0,message:void 0,maxHeightReached:!1,ReactComponent:b,renderProps:void 0}})).actions((function(e){var t;return{doReload:function(){e.reloadFlag=e.reloadFlag+1},afterAttach:function(){var t=this,r=(0,i.getContainingDisplay)(e);setTimeout((function(){(0,n.isAlive)(e)&&(0,i.makeAbortableReaction)(e,j,P,{name:"".concat(r.id,"/").concat((0,i.assembleLocString)(e.region)," rendering"),delay:r.renderDelay,fireImmediately:!0},t.setLoading,t.setRendered,t.setError)}),r.renderDelay)},setStatus:function(t){e.status=t},setLoading:function(r){void 0===t||t.signal.aborted||t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=r},setMessage:function(r){t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=r,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.maxHeightReached=!1,e.renderProps=void 0,t=void 0},setRendered:function(r){if(r){var n=r.reactElement,o=r.features,i=r.layout,a=r.maxHeightReached,u=r.renderProps;e.filled=!0,e.message=void 0,e.reactElement=n,e.features=o,e.layout=i,e.error=void 0,e.maxHeightReached=a,e.renderProps=u,t=void 0}},setError:function(r){console.error(r),t&&!t.signal.aborted&&t.abort(),e.filled=!1,e.message=void 0,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.maxHeightReached=!1,e.error=r,e.renderProps=void 0,t=void 0,(0,u.isRetryException)(r)&&this.reload()},reload:function(){e.renderInProgress=void 0,e.filled=!1,e.reactElement=void 0,e.features=void 0,e.layout=void 0,e.error=void 0,e.message=void 0,e.maxHeightReached=!1,e.ReactComponent=b,e.renderProps=void 0,(0,n.getParent)(e,2).reload()},beforeDestroy:function(){O(A().mark((function r(){var o,a,u,c,l,s;return A().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,t&&!t.signal.aborted&&t.abort(),o=(0,i.getContainingDisplay)(e),a=(0,i.getSession)(e),u=a.rpcManager,c=o.rendererType,l=j((0,n.cast)(e)),!(s=l.renderArgs)){r.next=9;break}return r.next=9,c.freeResourcesInClient(u,JSON.parse(JSON.stringify(s)));case 9:r.next=14;break;case 11:r.prev=11,r.t0=r.catch(0),console.error("Error while destroying block",r.t0);case 14:case"end":return r.stop()}}),r,null,[[0,11]])})))()}}}));function j(e,t){try{var r=t||(0,i.getContainingDisplay)(e),a=(0,i.getSession)(r),u=a.assemblyManager,l=a.rpcManager,s=r.adapterConfig,f=r.rendererType,p=r.error,d=r.parentTrack,h=(0,c.getTrackAssemblyNames)(d),y=e.region.assemblyName;if(!h.includes(y)&&!h.some((function(e){var t;return null===(t=u.get(e))||void 0===t?void 0:t.hasName(y)})))throw new Error("region assembly (".concat(y,") does not match track assemblies (").concat(h,")"));var v=r.renderProps(),m=v.config;(0,o.readConfObject)(m);var b=(0,c.getRpcSessionId)(r),g=(0,i.getContainingView)(r).id;return{rendererType:f,rpcManager:l,renderProps:v,cannotBeRenderedReason:r.regionCannotBeRendered(e.region),displayError:p,renderArgs:{statusCallback:function(t){(0,n.isAlive)(e)&&e.setStatus(t)},assemblyName:e.region.assemblyName,regions:[(0,n.getSnapshot)(e.region)],adapterConfig:s,rendererType:f.name,sessionId:b,layoutId:g,blockKey:e.key,reloadFlag:e.reloadFlag,timeout:1e6}}}catch(e){return{displayError:e}}}function P(e,t,r){return k.apply(this,arguments)}function k(){return(k=O(A().mark((function e(t,r,o){var a,u,c,l,s,f,p,d,h,y,v;return A().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=2;break}return e.abrupt("return");case 2:if(a=t.rendererType,u=t.renderProps,c=t.rpcManager,l=t.renderArgs,s=t.cannotBeRenderedReason,f=t.displayError,(0,n.isAlive)(o)){e.next=5;break}return e.abrupt("return",void 0);case 5:if(!f){e.next=8;break}return o.setError(f),e.abrupt("return",void 0);case 8:if(!s){e.next=11;break}return o.setMessage(s),e.abrupt("return",void 0);case 11:if(!u.notReady){e.next=13;break}return e.abrupt("return",void 0);case 13:return e.next=15,a.renderInClient(c,S(S(S({},l),u),{},{viewParams:(0,i.getViewParams)(o),signal:r}));case 15:return p=e.sent,d=p.reactElement,h=p.features,y=p.layout,v=p.maxHeightReached,e.abrupt("return",{reactElement:d,features:h,layout:y,maxHeightReached:v,renderProps:u});case 21:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},58680:(e,t,r)=>{"use strict";r.d(t,{OX:()=>s,W7:()=>l,bf:()=>f});var n=r(57525),o=r(6197),i=r(72731);function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},c=i.iterator||"@@iterator",l=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,u,c){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==a(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function l(e){return Math.floor(e/1e6)>0?"".concat(Number.parseFloat((e/1e6).toPrecision(3))," Mb"):Math.floor(e/1e3)>0?"".concat(Number.parseFloat((e/1e3).toPrecision(3))," Kb"):"".concat(Math.floor(e)," bytes")}function s(e,t){var r="undefined"==typeof jest;return["clip",r?e:"jest",t,r?Math.random():""].filter((function(e){return!!e})).join("-")}function f(e){return p.apply(this,arguments)}function p(){var e;return e=u().mark((function e(t){var r,a,c,l,s,f;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=(0,n.getContainingView)(t),a=r.staticBlocks.contentBlocks,c=(0,n.getSession)(t),l=c.rpcManager,s=t.adapterConfig){e.next=6;break}return e.abrupt("return",{});case 6:return f=(0,o.getRpcSessionId)(t),e.abrupt("return",l.call(f,"CoreGetFeatureDensityStats",{sessionId:f,regions:a,adapterConfig:s,statusCallback:function(e){(0,i.isAlive)(t)&&t.setMessage(e)}}));case 8:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){c(i,n,o,a,u,"next",e)}function u(e){c(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}},20642:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(41486),o=r.n(n),i=r(46186),a=r(87931),u=r(91118),c=r(15542),l=r(22970),s=r(45342),f=r(64568);function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{A:()=>p});var n=r(41486),o=r.n(n),i=r(46186),a=r(3029),u=r(1051);function c(e,t,r,n,o){return"M"+e+","+t+"h"+(r-o)+"a"+o+","+o+" 0 0 1 "+o+","+o+"v"+(n-2*o)+"a"+o+","+o+" 0 0 1 "+-o+","+o+"h"+(o-r)+"z"}function l(e,t,r,n){return[[e,0],[e+r,n/2],[e,n]].toString()}function s(e,t,r,n){return[[e,n/2],[e+r,0],[e+r,n]].toString()}var f={gneg:"rgb(227,227,227)",gpos25:"rgb(142,142,142)",gpos50:"rgb(85,85,85)",gpos100:"rgb(0,0,0)",gpos75:"rgb(57,57,57)",gvar:"rgb(0,0,0)",stalk:"rgb(127,127,127)",acen:"#800"};const p=(0,i.observer)((function(e){var t=e.overview,r=e.block,n=e.assembly,i=r.offsetPx,p=r.reversed,d=(0,u.S5)(n,r.refName),h=p?d.length-1:0,y=p?0:d.length-1,v=a.Gu,m=!1;return o().createElement("g",{transform:"translate(-".concat(i,")")},d.map((function(e,r){var n=JSON.stringify(e),i=e.refName,a=e.type,u=e.start,d=e.end,b=t.bpToPx({refName:i,coord:u})||0,g=t.bpToPx({refName:i,coord:d})||0,w=Math.min(b,g),S=Math.abs(g-b),A=f[a];if("acen"!==a||m){if("acen"===a&&m){var x=p?l(b-S,0,S,v):s(b,0,S,v);return o().createElement("polygon",{key:n,points:x,fill:A})}return h===r?o().createElement("path",{key:n,d:(O=w,0,E=S,j=v,8,"M"+(O+8)+",0h"+(E-8)+"v"+j+"h"+(8-E)+"a8,8 0 0 1 "+"-8,"+"-8v"+(16-j)+"a8,8 0 0 1 8,"+"-8z"),fill:A}):y===r?o().createElement("path",{key:n,d:c(w,0,S,v,8),fill:A}):o().createElement("rect",{key:n,x:w,y:0,width:S,height:v,fill:A})}m=!0;var O,E,j,P=p?s(b-S,0,S,v):l(b,0,S,v);return o().createElement("polygon",{key:n,points:P,fill:A})})))}))},16443:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(41486),o=r.n(n),i=r(37956),a=r(15542),u=r(91118),c=r(22970),l=r(60276),s=r(33774),f=r(11898),p=r(45342),d=r(64568),h=r(87931),y=r(57525);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function m(){m=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function b(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>R});var n=r(41486),o=r.n(n),i=r(3024),a=r(91118),u=r(15542),c=r(68191),l=r(37956),s=r(22970),f=r(29078),p=r(33774),d=r(11898),h=r(45342),y=r(64568),v=r(46186),m=r(20276),b=r(54133),g=r(49304),w=r.n(g),S=r(87931),A=r(57525),x=r(47327),O=r(41169),E=r(49045);function j(e){return j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},j(e)}function P(){P=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(I([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==j(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1e6;return o().createElement(S.Dialog,{maxWidth:"xl",open:!0,onClose:function(){r(),t.setOffsets()},title:"Reference sequence"},o().createElement(a.A,null,g?o().createElement(u.A,{color:"error"},"".concat(g)):q?o().createElement(c.A,null,"Retrieving reference sequence...",o().createElement(l.A,{style:{marginLeft:10},size:20,disableShrink:!0})):null,o().createElement(s.A,{"data-testid":"rubberband-sequence",variant:"outlined",multiline:!0,minRows:5,maxRows:10,disabled:$,className:i.dialogContent,fullWidth:!0,value:$?"Reference sequence too large to display, use the download FASTA button":Q,InputProps:{readOnly:!0,classes:{input:i.textAreaFont}}}),o().createElement(f.A,null,o().createElement(p.A,{control:o().createElement(d.A,{value:N,onChange:function(e){return F(e.target.checked)}}),label:"Reverse sequence"}),o().createElement(p.A,{control:o().createElement(d.A,{value:U,onChange:function(e){return H(e.target.checked)}}),label:"Complement sequence"})),o().createElement(u.A,{style:{margin:10}},'Note: Check both boxes for the "reverse complement"')),o().createElement(h.A,null,o().createElement(y.A,{onClick:function(){w()(Q),z(!0),setTimeout((function(){return z(!1)}),500)},disabled:q||!!g||$,color:"primary",startIcon:o().createElement(O.ContentCopy,null)},B?"Copied":"Copy to clipboard"),o().createElement(y.A,{onClick:function(){(0,m.saveAs)(new Blob([Q||""],{type:"text/x-fasta;charset=utf-8"}),"jbrowse_ref_seq.fa")},disabled:q||!!g,color:"primary",startIcon:o().createElement(E.A,null)},"Download FASTA"),o().createElement(y.A,{onClick:r,variant:"contained"},"Close")))}))},87520:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(41486),o=r.n(n),i=r(3024),a=r(46186),u=r(57525),c=r(68191),l=r(68015),s=r(63614),f=r(37956),p=r(64568),d=r(87931),h=r(98784),y=r(63571),v=r(17843),m=r(1051);const b=(0,a.observer)((function(e){var t=e.model,r=e.selectedAsm,n=e.value,i=e.setValue,a=e.setOption,c=(0,u.getSession)(t),l=c.assemblyManager,s=c.textSearchManager,f=t.rankSearchResults,p=t.searchScope(r),d=l.get(r);return o().createElement(v.A,{fetchResults:function(e){return(0,m.Jf)({queryString:e,assembly:d,textSearchManager:s,rankSearchResults:f,searchScope:p})},model:t,assemblyName:r,value:n,minWidth:270,onChange:function(e){return i(e)},onSelect:function(e){return a(e)},TextFieldProps:{variant:"outlined",helperText:"Enter sequence name, feature name, or location"}})}));function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(){w=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=m.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==g(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function S(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function A(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>Ae});var n=r(41486),o=r.n(n),i=r(92770),a=r(15542),u=r(64568),c=r(3024),l=r(87931),s=r(57525),f=r(46186),p=r(41169),d=r(72731),h=r(21318),y=r(63548),v=r(74002),m=r(54133),b=r(6197),g=r(51957),w=r.n(g),S=r(50784),A=r(98784),x=r(90374),O=r(44507),E=r(13607),j=(0,c.makeStyles)()({dragHandle:{cursor:"grab"},dragHandleIcon:{display:"inline-block",verticalAlign:"middle",pointerEvents:"none"}});const P=function(e){var t=e.trackId,r=e.view,n=e.track,i=j().classes;return o().createElement("span",{draggable:!0,className:i.dragHandle,onDragStart:function(e){var t=e.currentTarget;if(t.parentNode){var o=t.parentNode;e.dataTransfer.setDragImage(o,20,20),r.setDraggingTrackId(n.id)}},onDragEnd:function(){return r.setDraggingTrackId(void 0)},"data-testid":"dragHandle-".concat(r.id,"-").concat(t)},o().createElement(E.A,{className:i.dragHandleIcon,fontSize:"small"}))};function k(e){return function(e){if(Array.isArray(e))return C(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,te),c=oe(),l=c.classes,s=c.cx,f=r.staticBlocks.offsetPx-r.offsetPx;return o().createElement(i.A,ne({"data-resizer":"true",className:s(l.scalebarContainer,a),variant:"outlined",ref:t,style:n},u),o().createElement("div",{className:l.scalebarZoomContainer,style:{transform:1!==r.scaleFactor?"scaleX(".concat(r.scaleFactor,")"):void 0}},o().createElement("div",{className:l.scalebar,style:ne({left:f-1,width:r.staticBlocks.totalWidthPx},n)},o().createElement(ue,{model:r}))),o().createElement(ie,{model:r}))})));var le=(0,c.makeStyles)()((function(e){return{verticalGuidesZoomContainer:{position:"absolute",height:"100%",width:"100%",zIndex:1,pointerEvents:"none"},verticalGuidesContainer:{position:"absolute",height:"100%",zIndex:1,pointerEvents:"none",display:"flex"},tick:{position:"absolute",height:"100%",width:1},majorTick:{background:e.palette.action.disabled},minorTick:{background:e.palette.divider}}}));function se(e){var t=e.block,r=e.bpPerPx,n=le(),i=n.classes,a=n.cx,u=(0,Z.H2)(t.start,t.end,r);return o().createElement(X.$G,{block:t},u.map((function(e){var n=e.type,u=e.base,c=(t.reversed?t.end-u:u-t.start)/r;return o().createElement("div",{key:u,className:a(i.tick,"major"===n||"labeledMajor"===n?i.majorTick:i.minorTick),style:{left:c}})})))}var fe=(0,f.observer)((function(e){var t=e.model,r=t.staticBlocks,n=t.bpPerPx;return o().createElement(o().Fragment,null,r.map((function(e,t){var r="".concat(e.key,"-").concat(t);return e instanceof J.ContentBlock?o().createElement(se,{key:r,block:e,bpPerPx:n}):e instanceof J.ElidedBlock?o().createElement(X.Db,{key:r,width:e.widthPx}):e instanceof J.InterRegionPaddingBlock?o().createElement(X.fK,{key:r,width:e.widthPx,boundary:"boundary"===e.variant}):null})))}));const pe=(0,f.observer)((function(e){var t=e.model,r=le().classes,n=t.staticBlocks.offsetPx-t.offsetPx;return o().createElement("div",{className:r.verticalGuidesZoomContainer,style:{transform:1!==t.scaleFactor?"scaleX(".concat(t.scaleFactor,")"):void 0}},o().createElement("div",{className:r.verticalGuidesContainer,style:{left:n,width:t.staticBlocks.totalWidthPx}},o().createElement(fe,{model:t})))}));var de=(0,c.makeStyles)()((function(e){return{centerLineContainer:{background:"transparent",height:"100%",zIndex:5,position:"absolute",border:"1px ".concat(e.palette.action.active," dashed"),borderTop:"none",borderBottom:"none",pointerEvents:"none"},centerLineText:{position:"absolute",pointerEvents:"none",whiteSpace:"nowrap",fontWeight:"bold"}}})),he=(0,f.observer)((function(e){var t=e.model,r=t.bpPerPx,i=t.centerLineInfo,a=t.trackHeights,u=t.tracks,c=t.width,l=(0,n.useRef)(null),s=de().classes,f=c/2;return u.length?o().createElement("div",{"data-testid":"centerline_container",className:s.centerLineContainer,role:"presentation",ref:l,style:{left:"".concat(f,"px"),width:Math.max(1/r,1)}},i&&o().createElement("div",{"data-testid":"centerline_text",className:s.centerLineText,role:"presentation",style:{left:Math.max(1/r,1)+5,top:a}},i.refName,":"," ",Math.max(Math.round(i.offset)+1,0))):null}));const ye=he;var ve=(0,c.makeStyles)()({tracksContainer:{position:"relative",overflow:"hidden"}});const me=(0,f.observer)((function(e){var t=e.children,r=e.model,i=ve().classes,a=(0,s.getEnv)(r).pluginManager,u=function(e){var t=U((0,n.useState)(!1),2),r=t[0],o=t[1],i=(0,n.useRef)(!1),a=(0,n.useRef)(0);return(0,n.useEffect)((function(){var t=function(){};function n(t){t.preventDefault();var r=t.clientX-a.current;r&&(i.current||(i.current=!0,window.requestAnimationFrame((function(){e.horizontalScroll(-r),i.current=!1,a.current=t.clientX}))))}function u(){a.current=0,r&&o(!1)}return r&&(window.addEventListener("mousemove",n,!0),window.addEventListener("mouseup",u,!0),t=function(){window.removeEventListener("mousemove",n,!0),window.removeEventListener("mouseup",u,!0)}),t}),[e,r,a]),{mouseDown:function(e){if(!e.shiftKey){var t=e.target;t.draggable||t.dataset.resizer||0===e.button&&(a.current=e.clientX,o(!0))}},mouseUp:function(e){e.preventDefault(),o(!1)}}}(r),c=u.mouseDown,f=u.mouseUp,p=(0,n.useRef)(null),d=V(p,r,!0),h=d.guideX,y=d.rubberbandOn,v=d.leftBpOffset,m=d.rightBpOffset,b=d.numOfBpSelected,g=d.width,w=d.left,S=d.anchorPosition,A=d.handleMenuItemClick,x=d.open,O=d.handleClose,E=d.mouseMove,j=d.mouseDown;!function(e,t){var r=(0,n.useRef)(0),o=(0,n.useRef)(),i=(0,n.useRef)(!1);(0,n.useEffect)((function(){var n=e.current;function a(e){var a=z()(e);!0===e.ctrlKey?(e.preventDefault(),r.current+=a.pixelY/500,t.setScaleFactor(r.current<0?1-r.current:1/(1+r.current)),o.current&&clearTimeout(o.current),o.current=setTimeout((function(){t.setScaleFactor(1),t.zoomTo(r.current>0?t.bpPerPx*(1+r.current):t.bpPerPx/(1-r.current),e.clientX-((null==n?void 0:n.getBoundingClientRect().left)||0)),r.current=0}),300)):(Math.abs(a.pixelX)>Math.abs(2*a.pixelY)&&e.preventDefault(),r.current+=a.pixelX,i.current||(i.current=!0,window.requestAnimationFrame((function(){t.horizontalScroll(r.current),r.current=0,i.current=!1}))))}return n?(n.addEventListener("wheel",a),function(){n.removeEventListener("wheel",a)}):function(){}}),[t,e])}(p,r);var P=a.evaluateExtensionPoint("LinearGenomeView-TracksContainerComponent",void 0,{model:r});return o().createElement("div",{ref:p,"data-testid":"trackContainer",className:i.tracksContainer,onMouseDown:function(e){c(e),j(e)},onMouseMove:E,onMouseUp:f},r.showGridlines?o().createElement(pe,{model:r}):null,r.showCenterLine?o().createElement(ye,{model:r}):null,void 0!==h?o().createElement(Q,{model:r,coordX:h}):y?o().createElement($.A,{leftBpOffset:v,rightBpOffset:m,numOfBpSelected:b,width:g,left:w}):null,S?o().createElement(l.Menu,{anchorReference:"anchorPosition",anchorPosition:{left:S.clientX,top:S.clientY},onMenuItemClick:A,open:x,onClose:O,menuItems:r.rubberBandMenuItems()}):null,o().createElement(K,{model:r,ControlComponent:o().createElement(ce,{model:r,style:{height:D.jE,boxSizing:"border-box"}})}),P,t)}));var be=(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,87520))})),ge=(0,c.makeStyles)()((function(e){return{note:{textAlign:"center",paddingTop:e.spacing(1),paddingBottom:e.spacing(1)},rel:{position:"relative"},top:{zIndex:1e3}}}));function we(e){var t=e.model,r=ge().classes,n=t.hideNoTracksActive;return o().createElement(i.A,{className:r.note},n?o().createElement("div",{style:{height:"48px"}}):o().createElement(o().Fragment,null,o().createElement(a.A,null,"No tracks active."),o().createElement(u.A,{variant:"contained",color:"primary",onClick:function(){return t.activateTrackSelector()},className:r.top,startIcon:o().createElement(p.TrackSelector,null)},"Open track selector")))}var Se=(0,f.observer)((function(e){var t=e.model,r=t.tracks,i=t.error,a=t.initialized,u=t.hasDisplayedRegions,c=(0,n.useRef)(null),f=(0,s.getSession)(t),p=ge().classes;if((0,n.useEffect)((function(){function e(e){var r,n;e.target instanceof Element&&(null===(r=null==c?void 0:c.current)||void 0===r?void 0:r.contains(e.target))&&(null===(n=f.setFocusedViewId)||void 0===n||n.call(f,t.id))}return document.addEventListener("mousedown",e),document.addEventListener("keydown",e),function(){document.removeEventListener("mousedown",e),document.removeEventListener("keydown",e)}}),[f,t]),!a&&!i)return o().createElement(l.LoadingEllipses,{variant:"h6"});if(!u||i)return o().createElement(be,{model:t});var d=t.MiniControlsComponent(),h=t.HeaderComponent();return o().createElement("div",{className:p.rel,ref:c,onMouseLeave:function(){return f.setHovered(void 0)},onMouseMove:function(e){var r=c.current;if(r){var n=t.tracks,o=e.clientX-r.getBoundingClientRect().left,i=t.pxToBp(o),a=n.find((function(e){return e.displays[0].featureUnderMouse}));f.setHovered({hoverPosition:i,hoverFeature:a})}}},o().createElement(h,{model:t}),o().createElement(d,{model:t}),o().createElement(me,{model:t},r.length?r.map((function(e){return o().createElement(F,{key:e.id,model:t,track:e})})):o().createElement(we,{model:t})))}));const Ae=Se},50605:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(41486),o=r.n(n),i=r(77682),a=r(63548),u=r(46186),c=r(3029);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>s});var n=r(41486),o=r.n(n),i=r(91118),a=r(47838),u=r(45342),c=r(64568),l=r(87931);function s(e){var t=e.handleClose;return o().createElement(l.Dialog,{open:!0,maxWidth:"xl",onClose:t,title:"Using the search box"},o().createElement(i.A,null,o().createElement("h3",null,"Searching"),o().createElement("ul",null,o().createElement("li",null,"Jump to a feature or reference sequence by typing its name in the location box and pressing Enter."),o().createElement("li",null,"Jump to a specific region by typing the region into the location box as: ",o().createElement("code",null,"ref:start..end")," or ",o().createElement("code",null,"ref:start-end"),". Commas are allowed in the start and end coordinates. A space-separated list of locstrings can be used to open up multiple chromosomes at a time")),o().createElement("h3",null,"Example Searches"),o().createElement("ul",null,o().createElement("li",null,o().createElement("code",null,"BRCA")," - searches for the feature named BRCA"),o().createElement("li",null,o().createElement("code",null,"chr4")," - jumps to chromosome 4"),o().createElement("li",null,o().createElement("code",null,"chr4:79,500,000..80,000,000")," - jumps the region on chromosome 4 between 79.5Mb and 80Mb."),o().createElement("li",null,o().createElement("code",null,"chr1:1-100 chr2:1-100")," - create a split view of chr1:1-100 and chr2:1-100"),o().createElement("li",null,o().createElement("code",null,"chr1 chr2 chr3")," - open up multiple chromosomes at once"),o().createElement("li",null,o().createElement("code",null,"chr1:1-100[rev] chr2:1-100")," - open up the first region in the horizontally flipped orientation"),o().createElement("li",null,o().createElement("code",null,"chr1 100 200")," - use whitespace separated refname, start, end"))),o().createElement(a.A,null),o().createElement(u.A,null,o().createElement(c.A,{onClick:function(){return t()},color:"primary"},"Close")))}},17843:(e,t,r)=>{"use strict";r.d(t,{A:()=>I});var n=r(41486),o=r.n(n),i=r(46186),a=r(57525),u=r(93015),c=r(28724);function l(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e);try{for(n.s();!(t=n.n()).done;){var o=t.value,i=o.getDisplayString();r[i]||(r[i]=[]),r[i].push(o)}}catch(e){n.e(e)}finally{n.f()}return r}(e)).map((function(e){var t,r,n=(r=2,function(e){if(Array.isArray(e))return e}(t=e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||s(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o=n[0],i=n[1];return 1===i.length?{result:i[0]}:{result:new u.Ay({displayString:o,results:i,label:o})}}))}var d=r(22970),h=r(74002),y=r(37292),v=r(9074),m=r(79797);function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function _(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return T(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r100?[{group:"limitOption",result:new u.Ay({label:"keep typing for more results"})}]:[]))}(e,t.inputValue)},renderInput:function(e){return o().createElement(E,{showHelp:v,params:e,inputBoxVal:Y,TextFieldProps:A,setCurrentSearch:D,setInputValue:G})},getOptionLabel:function(e){return"string"==typeof e?e:e.result.getDisplayString()}}))}))},69526:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(41486),o=r.n(n),i=r(3024),a=r(63548),u=r(18078),c=r(15542),l=r(57525),s=(0,i.makeStyles)()((function(e){var t=e.palette,r=t.primary,n=t.tertiary;return{rubberband:{height:"100%",background:n?(0,a.X4)(n.light,.7):(0,a.X4)(r.light,.7),position:"absolute",zIndex:10,textAlign:"center",overflow:"hidden"},rubberbandControl:{cursor:"crosshair",width:"100%",minHeight:8},rubberbandText:{color:n?n.contrastText:r.contrastText},popover:{mouseEvents:"none",cursor:"crosshair"},paper:{paddingLeft:e.spacing(1),paddingRight:e.spacing(1)}}}));function f(e){var t=e.leftBpOffset,r=e.rightBpOffset,i=e.numOfBpSelected,a=e.left,f=e.width,p=(0,n.useRef)(null),d=s().classes;return o().createElement(o().Fragment,null,p.current?o().createElement(o().Fragment,null,o().createElement(u.Ay,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"left"},transformOrigin:{vertical:"bottom",horizontal:"right"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.A,null,(0,l.stringify)(t))),o().createElement(u.Ay,{className:d.popover,classes:{paper:d.paper},open:!0,anchorEl:p.current,anchorOrigin:{vertical:"top",horizontal:"right"},transformOrigin:{vertical:"bottom",horizontal:"left"},keepMounted:!0,disableRestoreFocus:!0},o().createElement(c.A,null,(0,l.stringify)(r)))):null,o().createElement("div",{ref:p,className:d.rubberband,style:{left:a,width:f}},i?o().createElement(c.A,{variant:"h6",className:d.rubberbandText},(0,l.toLocale)(i)," bp"):null))}},2481:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(41486),o=r.n(n),i=r(87931),a=r(91118),u=r(15542),c=r(47838),l=r(45342),s=r(64568),f=r(26278),p=r(92770),d=r(80426),h=r(15002),y=r(32408),v=r(84946),m=r(99238),b=r(72731),g=r(57525);function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function S(){S=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=g.prototype=m.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==w(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function A(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function x(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){A(i,n,o,a,u,"next",e)}function u(e){A(i,n,o,a,u,"throw",e)}a(void 0)}))}}function O(e){var t,r=e.searchResults,n=e.assemblyName,i=e.model,a=e.handleClose,u=(0,g.getSession)(i),c=(0,g.getEnv)(u).pluginManager,l=u.assemblyManager,w=n||(null===(t=i.displayedRegions[0])||void 0===t?void 0:t.assemblyName),A=l.get(w);if(!A)throw new Error("assembly ".concat(w," not found"));if(!A.regions)throw new Error("assembly ".concat(w," regions not loaded"));function O(e){return E.apply(this,arguments)}function E(){return E=x(S().mark((function e(t){var r,n;return S().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!(n=null===(r=null==A?void 0:A.regions)||void 0===r?void 0:r.find((function(e){return t===e.refName})))){e.next=7;break}i.setDisplayedRegions([n]),i.showAllRegions(),e.next=9;break;case 7:return e.next=9,i.navToLocString(t,w);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(0),console.warn(e.t0),u.notify("".concat(e.t0),"warning");case 15:case"end":return e.stop()}}),e,null,[[0,11]])}))),E.apply(this,arguments)}return o().createElement(f.A,{component:p.A},o().createElement(d.A,null,o().createElement(h.A,null,o().createElement(y.A,null,o().createElement(v.A,null,"Name"),o().createElement(v.A,{align:"right"},"Location"),o().createElement(v.A,{align:"right"},"Track"),o().createElement(v.A,{align:"right"}))),o().createElement(m.A,null,r.map((function(e){return o().createElement(y.A,{key:"".concat(e.getId())},o().createElement(v.A,{component:"th",scope:"row"},e.getLabel()),o().createElement(v.A,{align:"right"},e.getLocation()),o().createElement(v.A,{align:"right"},function(e){var t;if(e){var r=c.pluggableConfigSchemaType("track"),n=(0,b.resolveIdentifier)(r,(0,b.getRoot)(i),e);return(null===(t=null==n?void 0:n.name)||void 0===t?void 0:t.value)||""}return""}(e.getTrackId())||"N/A"),o().createElement(v.A,{align:"right"},o().createElement(s.A,{onClick:(t=x(S().mark((function t(){var r,n;return S().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,!(r=e.getLocation())){t.next=7;break}return t.next=5,O(r);case 5:(n=e.getTrackId())&&i.showTrack(n);case 7:t.next=13;break;case 9:t.prev=9,t.t0=t.catch(0),console.error(t.t0),u.notify("".concat(t.t0),"error");case 13:a();case 14:case"end":return t.stop()}}),t,null,[[0,9]])}))),function(){return t.apply(this,arguments)}),color:"primary",variant:"contained"},"Go")));var t})))))}function E(e){var t=e.model,r=e.assemblyName,n=e.searchQuery,f=e.searchResults,p=e.handleClose;return o().createElement(i.Dialog,{open:!0,maxWidth:"xl",onClose:p,title:"Search results"},o().createElement(a.A,null,(null==f?void 0:f.length)?o().createElement(o().Fragment,null,o().createElement(u.A,null,"Showing results for ",o().createElement("b",null,n)),o().createElement(O,{model:t,handleClose:p,assemblyName:r,searchResults:f})):o().createElement(u.A,null,"No results found for ",o().createElement("b",null,n))),o().createElement(c.A,null),o().createElement(l.A,null,o().createElement(s.A,{onClick:function(){return p()},color:"primary"},"Cancel")))}},89894:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(41486),o=r.n(n),i=r(91118),a=r(15542),u=r(22970),c=r(29078),l=r(33774),s=r(11898),f=r(45342),p=r(64568),d=r(87931),h=r(72731),y=r(3024),v=r(46186),m=r(57525);function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Jf:()=>s,Pn:()=>p,S5:()=>d});var n=r(57525),o=r(93015);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.d(t,{Ij:()=>Qe,Gu:()=>$e,IV:()=>Ce.default,jE:()=>Ye,Es:()=>Xe,Gd:()=>Ae,P5:()=>Ze,yY:()=>ye,Ay:()=>tt});var n=r(41486),o=r.n(n),i=r(7799),a=r(54133),u=r(53274),c=r(20191),l=r(57525),s=r(96206),f=r(78413),p=r(6197),d=r(77090),h=r(72731),y=r(94707),v=r.n(y),m=r(29320),b=r(20276),g=r(42738),w=r.n(g),S=r(41169),A=r(60074),x=r(36198),O=r(35766),E=r(88818),j=r(84627),P=r(11094),k=r(48101),C=r(46186),_=r(92770),L=r(74002),T=r(75201),I=r(21950),M=r(51957),R=r.n(M),N=r(3024),F=(0,N.makeStyles)()((function(e){return{background:{position:"absolute",right:0,zIndex:1001,background:e.palette.background.paper},focusedBackground:{background:e.palette.secondary.light,svg:{fill:e.palette.secondary.contrastText}}}}));const D=(0,C.observer)((function(e){var t=e.model,r=F(),n=r.classes,i=r.cx,a=t.id,u=t.bpPerPx,c=t.maxBpPerPx,s=t.minBpPerPx,f=t.scaleFactor,p=t.hideHeader,d=(0,l.getSession)(t).focusedViewId;return p?o().createElement(_.A,{className:i(n.background,d===a?n.focusedBackground:void 0)},o().createElement(R(),{menuItems:t.menuItems()},o().createElement(I.A,{fontSize:"small"})),o().createElement(L.A,{"data-testid":"zoom_out",onClick:function(){return t.zoom(2*u)},disabled:u>=c-1e-4||1!==f},o().createElement(T.A,{fontSize:"small"})),o().createElement(L.A,{"data-testid":"zoom_in",onClick:function(){return t.zoom(u/2)},disabled:u<=s+1e-4||1!==f},o().createElement(P.A,{fontSize:"small"}))):null}));var B=r(63548),z=r(64568),G=r(15542),U=r(29078),H=r(59464),V=r(10246),W=r(77682),q=r(91455),Q=r(48108),$=r(1051),Y=r(18334),K=r(69526);function J(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?X(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.get("start")&&f.coord3){var e=Math.min(s,d),n=Math.max(s,d);t.moveTo(r.pxToBp(e-u),r.pxToBp(n-u))}if(void 0!==s&&void 0===d){var o=r.pxToBp(s-u);o.refName?t.centerAt(Math.round(o.coord),o.refName,o.index):((0,l.getSession)(t).notify("unknown position clicked"),console.error("unknown position clicked",o))}f(void 0),h(void 0),void 0!==s&&m(void 0)}function o(e){"Escape"===e.key&&(f(void 0),h(void 0))}return w?(window.addEventListener("mousemove",e,!0),window.addEventListener("mouseup",n,!0),window.addEventListener("keydown",o,!0),function(){window.removeEventListener("mousemove",e,!0),window.removeEventListener("mouseup",n,!0),window.removeEventListener("keydown",o,!0)}):function(){}}),[w,d,s,t,r,u]),void 0===s)return o().createElement("div",{className:g.rel},void 0!==v?o().createElement(ee,{model:t,open:!w,overview:r,guideX:v}):null,o().createElement("div",{className:g.rubberbandControl,ref:b,onMouseDown:S,onMouseOut:x,onMouseMove:A},a));var O,E,j=s||0,P=0;if(void 0!==s&&void 0!==d&&(j=de.length)&&(t=e.length);for(var r=0,n=new Array(t);r=u-1e-4||1!==s,size:"large"},o().createElement(T.A,null)),o().createElement(pe.Ay,{size:"small",className:a.slider,value:p,min:100*-Math.log2(u),max:100*-Math.log2(c),onChange:function(e,t){return d(t)},onChangeCommitted:function(){return i.zoomTo(Math.pow(2,-p/100))},disabled:1!==s}),o().createElement(L.A,{"data-testid":"zoom_in",onClick:function(){return i.zoom(i.bpPerPx/2)},disabled:l<=c+1e-4||1!==s,size:"large"},o().createElement(P.A,null)))}));var ve=r(17843),me=r(63571);function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ge(){ge=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==be(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function we(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}var Se=(0,N.makeStyles)()((function(){return{headerRefName:{minWidth:100}}}));const Ae=(0,C.observer)((function(e){var t,r,n=e.model,i=e.showHelp,a=Se().classes,u=(0,W.A)(),c=(0,l.getSession)(n),s=c.textSearchManager,f=c.assemblyManager,p=n.assemblyNames,d=n.rankSearchResults,h=p[0],y=f.get(h),v=n.searchScope(h);return o().createElement(ve.A,{showHelp:i,onSelect:(t=ge().mark((function e(t){var r;return ge().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t.hasLocation()){e.next=6;break}return e.next=4,(0,me.Kd)({option:t,model:n,assemblyName:h});case 4:e.next=13;break;case 6:if(!(null===(r=t.results)||void 0===r?void 0:r.length)){e.next=10;break}n.setSearchResults(t.results,t.getLabel()),e.next=13;break;case 10:if(!y){e.next=13;break}return e.next=13,(0,me.cm)({input:t.getLabel(),assembly:y,model:n});case 13:e.next=19;break;case 15:e.prev=15,e.t0=e.catch(0),console.error(e.t0),(0,l.getSession)(n).notify("".concat(e.t0),"warning");case 19:case"end":return e.stop()}}),e,null,[[0,15]])})),r=function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){we(i,n,o,a,u,"next",e)}function u(e){we(i,n,o,a,u,"throw",e)}a(void 0)}))},function(e){return r.apply(this,arguments)}),assemblyName:h,fetchResults:function(e){return(0,$.Jf)({queryString:e,searchScope:v,rankSearchResults:d,textSearchManager:s,assembly:y})},model:n,minWidth:175,TextFieldProps:{variant:"outlined",className:a.headerRefName,style:{margin:Xe},InputProps:{style:{padding:0,height:Ze,background:(0,B.X4)(u.palette.background.paper,.8)}}}})}));var xe=(0,N.makeStyles)()((function(e){return{headerBar:{display:"flex"},headerForm:{flexWrap:"nowrap",marginRight:7},spacer:{flexGrow:1},panButton:{background:(0,B.X4)(e.palette.background.paper,.8),color:e.palette.text.primary,margin:Xe},bp:{display:"flex",alignItems:"center",marginLeft:5},toggleButton:{height:44,border:"none",marginLeft:e.spacing(4)},buttonSpacer:{marginRight:e.spacing(2)}}})),Oe=(0,C.observer)((function(e){var t=e.model,r=xe().classes;return o().createElement(L.A,{onClick:t.activateTrackSelector,className:r.toggleButton,title:"Open track selector",value:"track_select"},o().createElement(S.TrackSelector,{className:r.buttonSpacer}))}));function Ee(e){var t=e.model,r=xe().classes;return o().createElement(o().Fragment,null,o().createElement(z.A,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(-.9)}},o().createElement(V.A,null)),o().createElement(z.A,{variant:"outlined",className:r.panButton,onClick:function(){return t.slide(.9)}},o().createElement(H.A,null)))}var je=(0,C.observer)((function(e){var t=e.model,r=xe().classes,n=t.coarseTotalBp;return o().createElement(G.A,{variant:"body2",color:"textSecondary",className:r.bp},(0,l.getBpDisplayStr)(n))})),Pe=function(e){var t=e.model,r=xe().classes;return o().createElement("div",{className:r.headerBar},o().createElement(Oe,{model:t}),o().createElement("div",{className:r.spacer}),o().createElement(U.A,{row:!0,className:r.headerForm},o().createElement(Ee,{model:t}),o().createElement(Ae,{model:t})),o().createElement(je,{model:t}),o().createElement(ye,{model:t}),o().createElement("div",{className:r.spacer}))};const ke=(0,C.observer)((function(e){var t=e.model;return t.hideHeader?null:t.hideHeaderOverview?o().createElement(Pe,{model:t}):o().createElement(fe,{model:t},o().createElement(Pe,{model:t}))}));var Ce=r(75481);function _e(e){return _e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_e(e)}function Le(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||Fe(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Te(){Te=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_e(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Ie(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Me(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){Ie(i,n,o,a,u,"next",e)}function u(e){Ie(i,n,o,a,u,"throw",e)}a(void 0)}))}}function Re(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Fe(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function Ne(e){return function(e){if(Array.isArray(e))return De(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Fe(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Fe(e,t){if(e){if("string"==typeof e)return De(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?De(e,t):void 0}}function De(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0},get scaleBarHeight(){return Ye+Ke},get headerHeight(){return e.hideHeader?0:e.hideHeaderOverview?Qe:Qe+$e},get trackHeights(){return(0,l.sum)(e.tracks.map((function(e){return e.displays[0].height})))},get trackHeightsWithResizeHandles(){return this.trackHeights+e.tracks.length*Ke},get height(){return this.trackHeightsWithResizeHandles+this.headerHeight+this.scaleBarHeight},get totalBp(){return e.displayedRegions.reduce((function(e,t){return e+t.end-t.start}),0)},get maxBpPerPx(){return this.totalBp/(.9*e.width)},get minBpPerPx(){return.02},get error(){return e.volatileError||this.assemblyErrors},get maxOffset(){return this.displayedRegionsTotalPx-10},get minOffset(){return 30-e.width},get displayedRegionsTotalPx(){return this.totalBp/e.bpPerPx},renderProps:function(){return ze(ze({},(0,p.getParentRenderProps)(e)),{},{bpPerPx:e.bpPerPx,highResolutionScaling:(0,a.getConf)((0,l.getSession)(e),"highResolutionScaling")})},searchScope:function(t){return{assemblyName:t,includeAggregateIndexes:!0,tracks:e.tracks}},getTrack:function(t){return e.tracks.find((function(e){return e.configuration.trackId===t}))},rankSearchResults:function(t){var r,n=new Set(e.tracks.map((function(e){return e.configuration.trackId}))),o=Re(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;n.has(i.trackId)&&i.updateScore(i.getScore()+1)}}catch(e){o.e(e)}finally{o.f()}return t},rewriteOnClicks:function(t,r){var n=this;r.forEach((function(r){if("subMenu"in r&&n.rewriteOnClicks(t,r.subMenu),"onClick"in r){var o=r.onClick;r.onClick=function(){for(var r=arguments.length,n=new Array(r),i=0;i1&&void 0!==arguments[1]?arguments[1]:t.width/2,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=(0,l.clamp)(e,t.minBpPerPx,t.maxBpPerPx);if(o===t.bpPerPx)return o;var i=t.bpPerPx;return Math.abs(i-o)<1e-6?(console.warn("zoomTo bpPerPx rounding error"),i):(t.bpPerPx=o,this.scrollTo(Math.round((t.offsetPx+r)*i/o-(n?t.width/2:r))),o)},setOffsets:function(e,r){t.leftOffset=e,t.rightOffset=r},setSearchResults:function(e,r,n){(0,l.getSession)(t).queueDialog((function(o){return[We,{model:t,searchResults:e,searchQuery:r,handleClose:o,assemblyName:n}]}))},setNewView:function(e,t){this.zoomTo(e),this.scrollTo(t)},horizontallyFlip:function(){t.displayedRegions=(0,h.cast)(Ne(t.displayedRegions).reverse().map((function(e){return ze(ze({},e),{},{reversed:!e.reversed})}))),this.scrollTo(t.totalBp/t.bpPerPx-t.offsetPx-t.width)},showTrack:function(r){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.pluggableConfigSchemaType("track"),a=(0,h.resolveIdentifier)(i,(0,h.getRoot)(t),r);if(!a)throw new Error('Could not resolve identifier "'.concat(r,'"'));var u=e.getTrackType(null==a?void 0:a.type);if(!u)throw new Error("Unknown track type ".concat(a.type));var c=e.getViewType(t.type),l=new Set(c.displayTypes.map((function(e){return e.name}))),s=a.displays.find((function(e){return l.has(e.type)}));if(!s)throw new Error("Could not find a compatible display for view type ".concat(t.type));var f=t.tracks.filter((function(e){return e.configuration===a}));if(0===f.length){var p=u.stateModel.create(ze(ze({},n),{},{type:a.type,configuration:a,displays:[ze({type:s.type,configuration:s},o)]}));return t.tracks.push(p),p}return f[0]},hideTrack:function(r){var n=e.pluggableConfigSchemaType("track"),o=(0,h.resolveIdentifier)(n,(0,h.getRoot)(t),r),i=t.tracks.filter((function(e){return e.configuration===o}));return(0,d.transaction)((function(){return i.forEach((function(e){return t.tracks.remove(e)}))})),i.length}}})).actions((function(e){return{moveTrack:function(t,r){var n=e.tracks.findIndex((function(e){return e.id===t}));if(-1===n)throw new Error("Track ID ".concat(t," not found"));var o=e.tracks.findIndex((function(e){return e.id===r}));if(-1===o)throw new Error("Track ID ".concat(r," not found"));var i=(0,h.getSnapshot)(e.tracks[n]);e.tracks.splice(n,1),e.tracks.splice(o,0,i)},closeView:function(){var t=(0,l.getContainingView)(e);t?(0,l.isViewContainer)(t)&&t.removeView(e):(0,l.getSession)(e).removeView(e)},toggleTrack:function(t){return!e.hideTrack(t)&&(e.showTrack(t),!0)},setTrackLabels:function(t){localStorage.setItem("lgv-trackLabels",t),e.trackLabels=t},setShowCenterLine:function(t){e.showCenterLine=t},setDisplayedRegions:function(t){e.displayedRegions=(0,h.cast)(t),e.zoomTo(e.bpPerPx)},activateTrackSelector:function(){if("hierarchical"===e.trackSelectorType){var t=(0,l.getSession)(e);if((0,l.isSessionModelWithWidgets)(t)){var r=t.addWidget("HierarchicalTrackSelectorWidget","hierarchicalTrackSelector",{view:e});return t.showWidget(r),r}}throw new Error("invalid track selector type ".concat(e.trackSelectorType))},getSelectedRegions:function(t,r){var n=(0,h.getSnapshot)(e),o=v().create(ze(ze({},n),{},{interRegionPaddingWidth:e.interRegionPaddingWidth}));return o.setVolatileWidth(e.width),o.moveTo(t,r),o.dynamicBlocks.contentBlocks.map((function(e){return ze(ze({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},afterDisplayedRegionsSet:function(t){e.afterDisplayedRegionsSetCallbacks.push(t)},horizontalScroll:function(t){var r=e.offsetPx;return e.scrollTo(e.offsetPx+t)-r},center:function(){var t=e.totalBp/2/e.bpPerPx;e.scrollTo(Math.round(t-e.width/2))},showAllRegions:function(){e.zoomTo(e.maxBpPerPx),this.center()},showAllRegionsInAssembly:function(t){var r=(0,l.getSession)(e),n=r.assemblyManager;if(!t){var o=new Set(e.displayedRegions.map((function(e){return e.assemblyName})));if(o.size>1)return void r.notify("Can't perform operation with multiple assemblies currently");t=Ne(o)[0]}var i=n.get(t);if(i){var a=i.regions;a&&(this.setDisplayedRegions(a),e.zoomTo(e.maxBpPerPx),this.center())}},setDraggingTrackId:function(t){e.draggingTrackId=t},setScaleFactor:function(t){e.scaleFactor=t},clearView:function(){this.setDisplayedRegions([]),e.tracks.clear(),e.scrollTo(0),e.zoomTo(10)},exportSvg:function(){var t=arguments;return Me(Te().mark((function n(){var o,i,a,u,c;return Te().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return o=t.length>0&&void 0!==t[0]?t[0]:{},n.next=3,Promise.resolve().then(r.bind(r,9967));case 3:return i=n.sent,a=i.renderToSvg,n.next=7,a(e,o);case 7:u=n.sent,c=new Blob([u],{type:"image/svg+xml"}),(0,b.saveAs)(c,o.filename||"image.svg");case 10:case"end":return n.stop()}}),n)})))()}}})).actions((function(e){var t=function(){};return{slide:function(r){var n=Le((0,l.springAnimate)(e.offsetPx,e.offsetPx+e.width*r,e.scrollTo),2),o=n[0],i=n[1];t(),t=i,o()}}})).actions((function(e){var t=function(){};return{zoom:function(r){if(e.zoomTo(e.bpPerPx),!(re.bpPerPx&&e.bpPerPx===e.maxBpPerPx)){var n=e.bpPerPx/r,o=Le((0,l.springAnimate)(1,n,e.setScaleFactor,(function(){e.zoomTo(r),e.setScaleFactor(1)})),2),i=o[0],a=o[1];t(),t=a,i()}}}})).views((function(e){return{get canShowCytobands(){return 1===e.displayedRegions.length&&this.anyCytobandsExist},get showCytobands(){return this.canShowCytobands&&e.showCytobandsSetting},get anyCytobandsExist(){var t=(0,l.getSession)(e).assemblyManager;return e.assemblyNames.some((function(e){var r,n;return null===(n=null===(r=t.get(e))||void 0===r?void 0:r.cytobands)||void 0===n?void 0:n.length}))},get cytobandOffset(){return this.showCytobands?(0,l.measureText)(e.displayedRegions[0].refName,12)+15:0}}})).views((function(e){return{menuItems:function(){var t,r=e.canShowCytobands,n=e.showCytobands,o=(0,l.getSession)(e),i=[{label:"Return to import form",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[Ge,{model:e,handleClose:t}]}))},icon:E.A}].concat(Ne((0,l.isSessionWithAddTracks)(o)?[{label:"Sequence search",onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[Ue,{model:e,handleClose:t}]}))}}]:[]),[{label:"Export SVG",icon:j.A,onClick:function(){(0,l.getSession)(e).queueDialog((function(t){return[He,{model:e,handleClose:t}]}))}},{label:"Open track selector",onClick:e.activateTrackSelector,icon:S.TrackSelector},{label:"Horizontally flip",icon:A.A,onClick:e.horizontallyFlip},{label:"Show...",icon:x.A,subMenu:[{label:"Show all regions in assembly",onClick:e.showAllRegionsInAssembly},{label:"Show center line",type:"checkbox",checked:e.showCenterLine,onClick:function(){return e.setShowCenterLine(!e.showCenterLine)}},{label:"Show header",type:"checkbox",checked:!e.hideHeader,onClick:function(){return e.setHideHeader(!e.hideHeader)}},{label:"Show header overview",type:"checkbox",checked:!e.hideHeaderOverview,onClick:function(){return e.setHideHeaderOverview(!e.hideHeaderOverview)},disabled:e.hideHeader},{label:"Show no tracks active button",type:"checkbox",checked:!e.hideNoTracksActive,onClick:function(){return e.setHideNoTracksActive(!e.hideNoTracksActive)}},{label:"Show guidelines",type:"checkbox",checked:e.showGridlines,onClick:function(){return e.setShowGridlines(!e.showGridlines)}}].concat(Ne(r?[{label:"Show ideogram",type:"checkbox",checked:e.showCytobands,onClick:function(){return e.setShowCytobands(!n)}}]:[]))},{label:"Track labels",icon:O.A,subMenu:[{label:"Overlapping",icon:x.A,type:"radio",checked:"overlapping"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("overlapping")}},{label:"Offset",icon:x.A,type:"radio",checked:"offset"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("offset")}},{label:"Hidden",icon:x.A,type:"radio",checked:"hidden"===e.trackLabelsSetting,onClick:function(){return e.setTrackLabels("hidden")}}]}]),a=Re(e.trackTypeActions.entries());try{for(a.s();!(t=a.n()).done;){var u=Le(t.value,2),c=u[0],s=u[1];s.length&&(i.push({type:"divider"},{type:"subHeader",label:c}),s.forEach((function(e){return i.push(e)})))}}catch(e){a.e(e)}finally{a.f()}return i}}})).views((function(e){var t,r="";return{get staticBlocks(){var n=(0,f.default)(e),o=JSON.stringify(n);return r!==o&&(t=n,r=o),t},get dynamicBlocks(){return(0,s.default)(e)},get roundedDynamicBlocks(){return this.dynamicBlocks.contentBlocks.map((function(e){return ze(ze({},e),{},{start:Math.floor(e.start),end:Math.ceil(e.end)})}))},get visibleLocStrings(){return qe(this.dynamicBlocks.contentBlocks)},get coarseVisibleLocStrings(){return qe(e.coarseDynamicBlocks)}}})).actions((function(e){return{setCoarseDynamicBlocks:function(t){e.coarseDynamicBlocks=t.contentBlocks,e.coarseTotalBp=t.totalBp},afterAttach:function(){var t=this;(0,h.addDisposer)(e,(0,d.autorun)((function(){e.initialized&&t.setCoarseDynamicBlocks(e.dynamicBlocks)}),{delay:150})),(0,h.addDisposer)(e,(0,d.autorun)((function(){var t=function(e){return JSON.stringify(e)},r=e.showCytobandsSetting,n=e.showCenterLine;"undefined"!=typeof localStorage&&(localStorage.setItem("lgv-showCytobands",t(r)),localStorage.setItem("lgv-showCenterLine",t(n)))})))}}})).actions((function(e){return{moveTo:function(t,r){(0,m.moveTo)(e,t,r)},navToLocString:function(t,r){var n=this;return Me(Te().mark((function o(){var i,a,u,c,s;return Te().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:if(i=e.assemblyNames,a=(0,l.getSession)(e),u=a.assemblyManager,c=u.isValidRefName,!(s=r||i[0])){o.next=7;break}return o.next=7,u.waitForAssembly(s);case 7:return o.abrupt("return",n.navToLocations((0,Q.CU)(t,s,c),s));case 8:case"end":return o.stop()}}),o)})))()},navToSearchString:function(t){return Me(Te().mark((function r(){var n,o;return Te().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return n=t.input,o=t.assembly,r.next=3,(0,me.cm)({input:n,assembly:o,model:e});case 3:case"end":return r.stop()}}),r)})))()},navToLocations:function(t,r){var n=this;return Me(Te().mark((function o(){var i,a,u,c,s,f,p,h;return Te().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=(0,l.getSession)(e),a=i.assemblyManager,o.next=3,(0,d.when)((function(){return void 0!==e.volatileWidth}));case 3:return o.next=5,(0,Q.Cz)(t,a,r);case 5:1===(u=o.sent).length?(c=u[0],s=c.reversed,f=c.parentRegion,p=c.start,h=c.end,e.setDisplayedRegions([ze({reversed:s},f)]),n.navTo(ze(ze({},c),{},{start:(0,l.clamp)(null!=p?p:0,0,f.end),end:(0,l.clamp)(null!=h?h:f.end,0,f.end)}))):(e.setDisplayedRegions(u.map((function(e){return void 0===e.start?e.parentRegion:e}))),e.showAllRegions());case 7:case"end":return o.stop()}}),o)})))()},navTo:function(e){this.navToMultiple([e])},navToMultiple:function(t){if(t.some((function(e){return void 0!==e.start&&void 0!==e.end&&e.start>e.end})))throw new Error("found start greater than end");var r=t.at(0),n=t.at(-1);if(r&&n){var o=e.assemblyNames[0],i=(0,l.getSession)(e).assemblyManager,a=i.get(r.assemblyName||o),u=i.get(n.assemblyName||o),c=(null==a?void 0:a.getCanonicalRefName(r.refName))||r.refName,s=(null==u?void 0:u.getCanonicalRefName(n.refName))||n.refName,f=e.displayedRegions.find((function(e){return e.refName===c})),p=(0,l.findLast)(e.displayedRegions,(function(e){return e.refName===s}));if(!f)throw new Error('could not find a region with refName "'.concat(c,'"'));if(!p)throw new Error('could not find a region with refName "'.concat(s,'"'));var d=void 0===r.start?f.start:r.start,h=void 0===r.end?f.end:r.end,y=void 0===n.start?p.start:n.start,v=void 0===n.end?p.end:n.end,m=e.displayedRegions.findIndex((function(e){return c===e.refName&&d>=e.start&&d<=e.end&&h<=e.end&&h>=e.start})),b=e.displayedRegions.findIndex((function(e){return s===e.refName&&y>=e.start&&y<=e.end&&v<=e.end&&v>=e.start}));if(-1===m||-1===b)throw new Error('could not find a region that contained "'.concat(t.map((function(e){return(0,l.assembleLocString)(e)})),'"'));var g=e.displayedRegions[m],w=e.displayedRegions[b];this.moveTo({index:m,offset:g.reversed?g.end-h:d-g.start},{index:b,offset:w.reversed?w.end-y:v-w.start})}}}})).views((function(e){return{rubberBandMenuItems:function(){return[{label:"Zoom to region",icon:P.A,onClick:function(){return e.moveTo(e.leftOffset,e.rightOffset)}},{label:"Get sequence",icon:k.A,onClick:function(){return(0,l.getSession)(e).queueDialog((function(t){return[Ve,{model:e,handleClose:t}]}))}}]},bpToPx:function(t){var r=t.refName,n=t.coord,o=t.regionNumber;return(0,m.bpToPx)({refName:r,coord:n,regionNumber:o,self:e})},centerAt:function(t,r,n){var o=this.bpToPx({refName:r,coord:t,regionNumber:n});void 0!==o&&e.scrollTo(Math.round(o.offsetPx-e.width/2))},pxToBp:function(t){return(0,m.pxToBp)(e,t)},get centerLineInfo(){return e.displayedRegions.length>0?this.pxToBp(e.width/2):void 0}}})).actions((function(e){return{afterCreate:function(){function t(t){(0,l.getSession)(e).focusedViewId===e.id&&(t.ctrlKey||t.metaKey)&&("ArrowLeft"===t.code?(t.preventDefault(),e.slide(-.9)):"ArrowRight"===t.code?(t.preventDefault(),e.slide(.9)):"ArrowUp"===t.code&&1===e.scaleFactor?(t.preventDefault(),e.zoom(e.bpPerPx/2)):"ArrowDown"===t.code&&1===e.scaleFactor&&(t.preventDefault(),e.zoom(2*e.bpPerPx)))}document.addEventListener("keydown",t),(0,h.addDisposer)(e,(function(){document.removeEventListener("keydown",t)}))}}}))}function tt(e){e.addViewType((function(){return new i.ViewType({name:"LinearGenomeView",displayName:"Linear genome view",stateModel:et(e),ReactComponent:(0,n.lazy)((function(){return Promise.resolve().then(r.bind(r,75481))}))})}))}},9967:(e,t,r)=>{"use strict";r.r(t),r.d(t,{SVGRuler:()=>A,SVGTracks:()=>y,renderToSvg:()=>N});var n=r(41486),o=r.n(n),i=r(77090),a=r(57525),u=r(32652),c=r(87931),l=r(6197),s=r(72731),f=r(77682);function p(e){var t=e.width,r=e.height,n=e.shift,i=(0,f.A)();return o().createElement("rect",{width:t+2*n,height:r,fill:(0,a.stripAlpha)(i.palette.background.default)})}function d(e){var t=e.model,r=e.height,n=t.dynamicBlocks,i=t.offsetPx,a=t.interRegionPaddingWidth;return o().createElement(o().Fragment,null,n.contentBlocks.slice(1).map((function(e){return o().createElement("rect",{key:e.key,x:e.offsetPx-i-a,width:a,y:0,height:r,fill:"grey"})})))}function h(e){var t=e.trackLabels,r=e.trackName,n=e.fontSize,i=e.trackLabelOffset,u=e.x,c=(0,f.A)().palette.text.primary,l="overlay"===t?5:0,s="offset"===t?5:0,p=(0,a.coarseStripHTML)(r);return"none"!==t?o().createElement("g",null,"left"===t?o().createElement("text",{x:i-40,y:20,fill:c,fontSize:n,dominantBaseline:"hanging",textAnchor:"end"},p):o().createElement("text",{x:u+l,y:s,fill:c,fontSize:n,dominantBaseline:"hanging"},p)):null}function y(e){var t=e.displayResults,r=e.model,n=e.offset,i=e.textHeight,u=e.fontSize,c=e.trackLabels,s=void 0===c?"offset":c,f=e.trackLabelOffset,p=void 0===f?0:f,y=(0,a.getSession)(r),v="offset"===s?i:0;return o().createElement(o().Fragment,null,t.map((function(e){var t=e.track,i=e.result,a=n,c=t.configuration,f=(0,l.getTrackName)(c,y),m=t.displays[0],b=Math.max(-r.offsetPx,0);return n+=m.height+v,o().createElement("g",{key:c.trackId,transform:"translate(0 ".concat(a,")")},o().createElement("g",{transform:"translate(".concat(p," ").concat(v,")")},o().createElement(d,{model:r,height:m.height}),i),o().createElement(h,{trackName:f,fontSize:u,trackLabels:s,trackLabelOffset:p,x:b}))})))}var v=r(94707),m=r.n(v),b=r(3029),g=r(40744),w=r(48108);function S(e){var t=e.start,r=e.end,n=e.bpPerPx,i=e.reversed,u=void 0!==i&&i,c=e.major,l=void 0===c||c,s=e.minor,p=void 0===s||s,d=e.hideText,h=void 0!==d&&d,y=(0,w.H2)(t,r,n,l,p),v=(0,f.A)(),m=(0,a.stripAlpha)(v.palette.text.secondary);return o().createElement(o().Fragment,null,y.map((function(e){var i=(u?r-e.base:e.base-t)/n;return o().createElement("line",{key:"tick-"+e.base,x1:i,x2:i,y1:0,y2:"major"===e.type?6:4,strokeWidth:1,stroke:m})})),h?null:y.filter((function(e){return"major"===e.type})).map((function(e){var i=(u?r-e.base:e.base-t)/n;return o().createElement("text",{key:"label-".concat(e.base),x:i-3,y:18,fontSize:11,fill:m},(0,a.getTickDisplayStr)(e.base+1,n))})))}function A(e){var t=e.model,r=e.fontSize,n=t.dynamicBlocks.contentBlocks,i=t.offsetPx,u=t.bpPerPx,c=n.length<5,l=(0,f.A)(),s=(0,a.stripAlpha)(l.palette.text.primary);return o().createElement(o().Fragment,null,o().createElement(d,{model:t,height:30}),n.map((function(e){var t=e.start,n=e.end,a=e.key,l=e.reversed,f=e.offsetPx,p=e.refName,d=e.widthPx,h=f-i,y="clip-".concat(a);return o().createElement("g",{key:a},o().createElement("defs",null,o().createElement("clipPath",{id:y},o().createElement("rect",{x:0,y:0,width:d,height:100}))),o().createElement("g",{transform:"translate(".concat(h," 0)")},o().createElement("g",{clipPath:"url(#".concat(y,")")},o().createElement("text",{x:4,y:r,fontSize:r,fill:s},p),o().createElement("g",{transform:"translate(0 20)"},o().createElement(S,{hideText:!c,start:t,end:n,bpPerPx:u,reversed:l})))))})))}function x(e){var t=e.model,r=e.fontSize,n=t.offsetPx,i=t.dynamicBlocks,u=i.totalWidthPxWithoutBorders,c=i.totalBp,l=(0,f.A)(),s=(0,a.getBpDisplayStr)(c),p=Math.max(-n,0),d=p+u,h=(0,a.stripAlpha)(l.palette.text.secondary),y=p+(d-p)/2,v=r;return o().createElement(o().Fragment,null,o().createElement("line",{x1:p,x2:d,y1:10,y2:10,stroke:h}),o().createElement("line",{x1:p,x2:p,y1:5,y2:15,stroke:h}),o().createElement("line",{x1:d,x2:d,y1:5,y2:15,stroke:h}),o().createElement("text",{x:y,y:v,textAnchor:"middle",dominantBaseline:"hanging",fontSize:r,fill:h},s))}var O=r(50605);function E(e){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},E(e)}function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t1?"":c[0],h=p.get(d),y=(0,f.A)(),v=(0,a.stripAlpha)(y.palette.text.primary),w=m().create({displayedRegions:JSON.parse(JSON.stringify(s)),interRegionPaddingWidth:0,minimumBlockWidth:t.minimumBlockWidth}),S=t.dynamicBlocks.contentBlocks;if(!S.length)return null;w.setVolatileWidth(u),w.showAllRegions();var E=w.dynamicBlocks.contentBlocks[0],j=S.at(0),k=S.at(-1),C=w.bpToPx(P(P({},j),{},{coord:j.reversed?j.end:j.start}))||0,_=w.bpToPx(P(P({},k),{},{coord:k.reversed?k.start:k.end}))||0,L=+l*n;return o().createElement("g",{id:"header"},o().createElement("text",{x:0,y:0,dominantBaseline:"hanging",fontSize:r,fill:v},d),l?o().createElement("g",{transform:"translate(0 ".concat(i,")")},o().createElement(g.A,{overview:w,assembly:h,block:E}),o().createElement("rect",{stroke:"red",fill:"rgb(255,0,0,0.1)",width:Math.max(_-C,.5),height:b.Gu-1,x:C,y:.5}),o().createElement("g",{transform:"translate(0,".concat(b.Gu,")")},o().createElement(O.A,{overview:w,model:t,useOffset:!1}))):null,o().createElement("g",{transform:"translate(0 ".concat(r+L,")")},o().createElement(x,{model:t,fontSize:r})),o().createElement("g",{transform:"translate(0 ".concat(i+L,")")},o().createElement(A,{model:t,fontSize:r})))}var C=r(49031);function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function L(){L=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(I([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==_(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function T(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t{"use strict";r.d(t,{m:()=>o});var n=r(57525);function o(e,t,r){return(0,n.sum)(e.map((function(e){return e.displays[0].height+(["none","left"].includes(r)?0:t)})))}},48108:(e,t,r)=>{"use strict";r.d(t,{CU:()=>y,Cz:()=>d,H2:()=>p,i3:()=>f});var n=r(57525);function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function i(){i=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var o=t&&t.prototype instanceof g?t:g,i=Object.create(o.prototype),u=new T(n||[]);return a(i,"_invoke",{value:k(e,r,u)}),i}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(i,a,u,c){var l=d(e[i],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=n);)i*=2.5;var a=(i=Math.max(i,5))/e,u=0;return!(i%10)&&a/10>=r?u=i/10:!(i%5)&&a/5>=r?u=i/5:!(i%2)&&a/2>=r&&(u=i/2),{majorPitch:i,minorPitch:u}}function p(e,t,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=f(r,60,15),a=e,u=t;if(null===a||null===u)return[];if(r<0){var c=[u,a];a=c[0],u=c[1]}a-=Math.abs(20*r)-1,u+=Math.abs(20*r)+1;for(var l=i.minorPitch||i.majorPitch,s=0,p=[],d=Math.floor(a/l)*l;d0&&void 0!==o[0]?o[0]:[],r=o.length>1?o[1]:void 0,n=o.length>2?o[2]:void 0,e.abrupt("return",Promise.all(t.map(function(){var e=s(i().mark((function e(t){var o,a,c,l,s,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=t.assemblyName||n){e.next=3;break}throw new Error("no assembly provided");case 3:return e.next=5,r.waitForAssembly(o);case 5:if(a=e.sent,c=t.refName,a){e.next=9;break}throw new Error("assembly ".concat(o," not found"));case 9:if(l=a.regions){e.next=12;break}throw new Error("regions not loaded yet for ".concat(o));case 12:if(s=a.getCanonicalRefName(t.refName)){e.next=15;break}throw new Error("Could not find refName ".concat(c," in ").concat(a.name));case 15:if(f=l.find((function(e){return e.refName===s}))){e.next=18;break}throw new Error("Could not find refName ".concat(c," in ").concat(o));case 18:return e.abrupt("return",u(u({},t),{},{assemblyName:o,parentRegion:f}));case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())));case 4:case"end":return e.stop()}}),e)}))),h.apply(this,arguments)}function y(e,t,r){var o,i,a=e.split(/(\s+)/).map((function(e){return e.trim()})).filter((function(e){return!!e}));try{return a.map((function(e){return(0,n.parseLocString)(e,(function(e){return r(e,t)}))}))}catch(e){var u=(i=3,function(e){if(Array.isArray(e))return e}(o=a)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(o,i)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}(o,i)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),l=u[0],s=u[1],f=u[2];if("".concat(e).match(/Unknown reference sequence/)&&Number.isInteger(+s)&&Number.isInteger(+f))return[(0,n.parseLocString)(l+":"+s+".."+f,(function(e){return r(e,t)}))];throw e}}},90127:(e,t,r)=>{"use strict";r.d(t,{Lr:()=>ye,GQ:()=>H,LW:()=>N.A,e6:()=>re,_e:()=>q,Ki:()=>c,Ay:()=>He,lw:()=>xe,bN:()=>_e});var n=r(58161),o=r(57525),i=r(54133),a=r(72731),u=r(77895);const c=(0,i.ConfigurationSchema)("BaseLinearDisplay",{maxFeatureScreenDensity:{type:"number",description:"maximum features per pixel that is displayed in the view, used if byte size estimates not available",defaultValue:.3},fetchSizeLimit:{type:"number",defaultValue:1e6,description:"maximum data to attempt to download for a given track, used if adapter doesn't specify one"},height:{type:"number",defaultValue:100,description:"default height for the track"},mouseover:{type:"string",description:"text to display when the cursor hovers over a feature",defaultValue:"jexl:get(feature,'name')",contextVariable:["feature"]}},{explicitIdentifier:"displayId"});var l=r(53274),s=r(89450),f=r(6197),p=r(77090),d=r(48101),h=r(41486),y=r.n(h),v=r(46186),m=r(77682),b=r(3024),g=r(87931),w=r(91455),S=r(96953),A=(0,b.makeStyles)()({linearBlocks:{whiteSpace:"nowrap",textAlign:"left",position:"absolute",minHeight:"100%",display:"flex"},heightOverflowed:{position:"absolute",color:"rgb(77,77,77)",borderBottom:"2px solid rgb(77,77,77)",textShadow:"white 0px 0px 1px",whiteSpace:"nowrap",width:"100%",fontWeight:"bold",textAlign:"center",zIndex:2e3,boxSizing:"border-box"}}),x=(0,v.observer)((function(e){var t=e.model,r=A().classes,n=t.blockDefinitions,o=t.blockState;return y().createElement(y().Fragment,null,n.map((function(e){if(e instanceof w.ContentBlock){var n=o.get(e.key);return y().createElement(S.$G,{block:e,key:"".concat(t.id,"-").concat(e.key)},n&&n.ReactComponent?y().createElement(n.ReactComponent,{model:n}):null,n&&n.maxHeightReached?y().createElement("div",{className:r.heightOverflowed,style:{top:n.layout.getTotalHeight()-16,pointerEvents:"none",height:16}},"Max height reached"):null)}if(e instanceof w.ElidedBlock)return y().createElement(S.Db,{key:"".concat(t.id,"-").concat(e.key),width:e.widthPx});if(e instanceof w.InterRegionPaddingBlock)return y().createElement(S.fK,{key:e.key,width:e.widthPx,style:{background:"none"},boundary:"boundary"===e.variant});throw new Error("invalid block type ".concat(JSON.stringify(e)))})))})),O=(0,v.observer)((function(e){var t=e.model,r=A().classes,n=t.blockDefinitions,i=(0,o.getContainingView)(t);return y().createElement("div",{className:r.linearBlocks,style:{left:n.offsetPx-i.offsetPx}},y().createElement(x,{model:t}))}));const E=O;var j=r(63548),P=r(74960),k=r(70805);function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function L(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=W})))}).volatile((function(){return{scrollTop:0}})).views((function(e){return{get height(){var t;return null!==(t=e.heightPreConfig)&&void 0!==t?t:(0,i.getConf)(e,"height")}}})).actions((function(e){return{setScrollTop:function(t){e.scrollTop=t},setHeight:function(t){return e.heightPreConfig=Math.max(t,W),e.height},resizeHeight:function(t){var r=e.height;return this.setHeight(e.height+t)-r}}}))}const Q=function(e){var t=e.model,r=t.regionTooLargeReason;return y().createElement(N.A,{severity:"warning",action:function(){t.setFeatureDensityStatsLimit(t.featureDensityStats),t.reload()},buttonText:"Force load",message:[r,"Zoom in to see features or force load (may be slow)"].filter((function(e){return!!e})).join(". ")})};var $=r(58680);function Y(e){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Y(e)}function K(){K=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Y(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function J(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function X(){var e;return e=K().mark((function e(t){var r,n,i;return K().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,(n=(0,o.getContainingView)(t)).initialized&&n.staticBlocks.contentBlocks.length&&n.bpPerPx!==t.currStatsBpPerPx&&!t.error){e.next=4;break}return e.abrupt("return");case 4:if(void 0===(null===(r=t.featureDensityStats)||void 0===r?void 0:r.featureDensity)){e.next=7;break}return t.setCurrStatsBpPerPx(n.bpPerPx),e.abrupt("return");case 7:return t.clearFeatureDensityStats(),t.setCurrStatsBpPerPx(n.bpPerPx),e.next=11,t.getFeatureDensityStats();case 11:i=e.sent,(0,a.isAlive)(t)&&t.setFeatureDensityStats(i),e.next=18;break;case 15:e.prev=15,e.t0=e.catch(0),!(0,o.isAbortException)(e.t0)&&(0,a.isAlive)(t)&&(console.error(e.t0),t.setError(e.t0));case 18:case"end":return e.stop()}}),e,null,[[0,15]])})),X=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){J(i,n,o,a,u,"next",e)}function u(e){J(i,n,o,a,u,"throw",e)}a(void 0)}))},X.apply(this,arguments)}function Z(e){return Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Z(e)}function ee(){ee=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),u=new _(n||[]);return o(a,"_invoke",{value:j(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var p="suspendedStart",d="suspendedYield",h="executing",y="completed",v={};function m(){}function b(){}function g(){}var w={};l(w,a,(function(){return this}));var S=Object.getPrototypeOf,A=S&&S(S(L([])));A&&A!==r&&n.call(A,a)&&(w=A);var x=g.prototype=m.prototype=Object.create(w);function O(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Z(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function j(t,r,n){var o=p;return function(i,a){if(o===h)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=P(u,n);if(c){if(c===v)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?y:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function P(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,P(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function _(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function L(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function te(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function re(){return a.types.model({userBpPerPxLimit:a.types.maybe(a.types.number),userByteSizeLimit:a.types.maybe(a.types.number)}).volatile((function(){return{featureDensityStatsP:void 0,featureDensityStats:void 0,currStatsBpPerPx:0}})).views((function(e){return{get currentBytesRequested(){var t;return(null===(t=e.featureDensityStats)||void 0===t?void 0:t.bytes)||0},get currentFeatureScreenDensity(){var t,r=(0,o.getContainingView)(e);return((null===(t=e.featureDensityStats)||void 0===t?void 0:t.featureDensity)||0)*r.bpPerPx},get maxFeatureScreenDensity(){return(0,i.getConf)(e,"maxFeatureScreenDensity")},get featureDensityStatsReady(){var t=(0,o.getContainingView)(e);return!(e.currStatsBpPerPx!==t.bpPerPx||!e.featureDensityStats&&!e.userBpPerPxLimit)},get maxAllowableBytes(){var t;return e.userByteSizeLimit||(null===(t=e.featureDensityStats)||void 0===t?void 0:t.fetchSizeLimit)||(0,i.getConf)(e,"fetchSizeLimit")}}})).actions((function(e){return{afterAttach:function(){(0,a.addDisposer)(e,(0,p.autorun)((function(){return function(e){return X.apply(this,arguments)}(e)})))}}})).actions((function(e){return{setCurrStatsBpPerPx:function(t){e.currStatsBpPerPx=t},setFeatureDensityStatsLimit:function(t){var r=(0,o.getContainingView)(e);(null==t?void 0:t.bytes)?e.userByteSizeLimit=t.bytes:e.userBpPerPxLimit=r.bpPerPx},getFeatureDensityStats:function(){var t,r=this;return(t=ee().mark((function t(){return ee().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.featureDensityStatsP||(e.featureDensityStatsP=(0,$.bf)(e).catch((function(t){throw(0,a.isAlive)(e)&&r.setFeatureDensityStatsP(void 0),t}))),t.abrupt("return",e.featureDensityStatsP);case 2:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var i=t.apply(e,r);function a(e){te(i,n,o,a,u,"next",e)}function u(e){te(i,n,o,a,u,"throw",e)}a(void 0)}))})()},setFeatureDensityStatsP:function(t){e.featureDensityStatsP=t},setFeatureDensityStats:function(t){e.featureDensityStats=t},clearFeatureDensityStats:function(){e.featureDensityStatsP=void 0,e.featureDensityStats=void 0}}})).views((function(e){return{get regionTooLarge(){var t=(0,o.getContainingView)(e);return!(!e.featureDensityStatsReady||t.dynamicBlocks.totalBp<2e4)&&(e.currentBytesRequested>e.maxAllowableBytes||(e.userBpPerPxLimit?t.bpPerPx>e.userBpPerPxLimit:e.currentFeatureScreenDensity>e.maxFeatureScreenDensity))},get regionTooLargeReason(){var t=e.currentBytesRequested,r=e.maxAllowableBytes;return t&&t>r?"Requested too much data (".concat((0,$.W7)(t),")"):""}}})).views((function(e){return{regionCannotBeRenderedText:function(t){return e.regionTooLarge?"Force load to see features":""},regionCannotBeRendered:function(t){return e.regionTooLarge?y().createElement(Q,{model:e}):null}}}))}function ne(e){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ne(e)}var oe=["height"],ie=["blockState"];function ae(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function ue(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ce(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function se(e){return function(e){if(Array.isArray(e))return he(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||de(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function fe(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function pe(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){fe(i,n,o,a,u,"next",e)}function u(e){fe(i,n,o,a,u,"throw",e)}a(void 0)}))}}function de(e,t){if(e){if("string"==typeof e)return he(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?he(e,t):void 0}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}(e.blockState.values());try{for(n.s();!(t=n.n()).done;){var o=t.value;(null==o?void 0:o.features)&&r.push(o.features)}}catch(e){n.e(e)}finally{n.f()}return new s.A(r)},get featureUnderMouse(){var t=e.featureIdUnderMouse;return t?this.features.get(t):void 0},getFeatureOverlapping:function(t,r,n){var o,i;return null===(i=null===(o=e.blockState.get(t))||void 0===o?void 0:o.layout)||void 0===i?void 0:i.getByCoord(r,n)},getFeatureByID:function(t,r){var n,o;return null===(o=null===(n=e.blockState.get(t))||void 0===n?void 0:n.layout)||void 0===o?void 0:o.getByID(r)},searchFeatureByID:function(t){var r;return e.blockState.forEach((function(e){var n,o=null===(n=null==e?void 0:e.layout)||void 0===n?void 0:n.getByID(t);o&&(r=o)})),r}}})).actions((function(e){return{addBlock:function(t,r){e.blockState.set(t,V.A.create({key:t,region:r.toRegion()}))},deleteBlock:function(t){e.blockState.delete(t)},selectFeature:function(t){var r=(0,o.getSession)(e);if((0,o.isSessionModelWithWidgets)(r)){var n=r.addWidget("BaseFeatureWidget","baseFeature",{view:(0,o.getContainingView)(e),track:(0,o.getContainingTrack)(e),featureData:t.toJSON()});r.showWidget(n)}(0,o.isSelectionContainer)(r)&&r.setSelection(t)},clearFeatureSelection:function(){(0,o.getSession)(e).clearSelection()},setFeatureIdUnderMouse:function(t){e.featureIdUnderMouse=t},setContextMenuFeature:function(t){e.contextMenuFeature=t}}})).actions((function(e){var t=e.reload;return{reload:function(){return pe(le().mark((function r(){return le().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:e.setError(),e.setCurrStatsBpPerPx(0),e.clearFeatureDensityStats(),se(e.blockState.values()).map((function(e){return e.doReload()})),t();case 5:case"end":return r.stop()}}),r)})))()}}})).views((function(e){return{trackMenuItems:function(){return[]},contextMenuItems:function(){return se(e.contextMenuFeature?[{label:"Open feature details",icon:d.A,onClick:function(){e.contextMenuFeature&&e.selectFeature(e.contextMenuFeature)}}]:[])},renderProps:function(){return ce(ce({},(0,f.getParentRenderProps)(e)),{},{notReady:!e.featureDensityStatsReady,rpcDriverName:e.rpcDriverName,displayModel:e,onFeatureClick:function(t,r){var n=r||e.featureIdUnderMouse;if(n){var o=e.features.get(n);o&&e.selectFeature(o)}else e.clearFeatureSelection()},onClick:function(){e.clearFeatureSelection()},onFeatureContextMenu:function(t,r){var n=r||e.featureIdUnderMouse;n?e.setContextMenuFeature(e.features.get(n)):e.clearFeatureSelection()},onMouseMove:function(t,r){e.setFeatureIdUnderMouse(r)},onMouseLeave:function(t){e.setFeatureIdUnderMouse(void 0)},onContextMenu:function(){e.setContextMenuFeature(void 0),e.clearFeatureSelection()}})}}})).actions((function(e){return{renderSvg:function(t){return pe(le().mark((function n(){var o,i;return le().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Promise.resolve().then(r.bind(r,42724));case 2:return o=n.sent,i=o.renderBaseLinearDisplaySvg,n.abrupt("return",i(e,t));case 5:case"end":return n.stop()}}),n)})))()},afterAttach:function(){(0,a.addDisposer)(e,(0,p.autorun)((function(){var t={};(0,o.getContainingView)(e).initialized&&(e.blockDefinitions.contentBlocks.forEach((function(r){t[r.key]=!0,e.blockState.has(r.key)||e.addBlock(r.key,r)})),e.blockState.forEach((function(r,n){t[n]||e.deleteBlock(n)})))})))}}})).preProcessSnapshot((function(e){return e?ce({heightPreConfig:e.height},ae(e,oe)):e})).postProcessSnapshot((function(e){var t=e;return t.blockState,ae(t,ie)})),ve=r(7799);function me(e){return(0,i.ConfigurationSchema)("LinearBareDisplay",{renderer:e.pluggableConfigSchemaType("renderer")},{baseConfiguration:c,explicitlyTyped:!0})}function be(e){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},be(e)}function ge(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function we(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),C(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;C(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:L(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function Me(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function Re(e,t,r){try{e.showTrack(t)}catch(e){if(!"".concat(e).match("Could not resolve identifier"))throw e;r.push(t)}}function Ne(e){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ne(e)}function Fe(e,t){for(var r=0;r{"use strict";r.d(t,{Kd:()=>p,cm:()=>h});var n=r(57525),o=r(93015);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(e){return function(e){if(Array.isArray(e))return l(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function u(){u=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},c=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",s=a.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function c(e,t){if(e){if("string"==typeof e)return l(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?l(e,t):void 0}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1)){e.next=17;break}o.setSearchResults(d,r.toLowerCase(),c),e.next=24;break;case 17:if(1!==d.length){e.next=22;break}return e.next=20,p({option:d[0],model:o,assemblyName:c});case 22:return e.next=24,o.navToLocString(r,c);case 24:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e,t){var r,n,o=function(e,t){var r=e.lastIndexOf(":");return-1===r?[e,""]:[e.slice(0,r),e.slice(r+1)]}(e),i=(n=2,function(e){if(Array.isArray(e))return e}(r=o)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(r,n)||c(r,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),a=i[0],u=i[1];return t.includes(e)||t.includes(a)&&!Number.isNaN(Number.parseInt(u,10))}function m(e){return b.apply(this,arguments)}function b(){return(b=f(u().mark((function e(t){var r,i,c,l,s,f,p,d,h;return u().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.queryString,i=t.searchType,c=t.searchScope,l=t.rankSearchResults,s=t.textSearchManager,f=t.assembly,s||console.warn("No text search manager"),e.next=4,null==s?void 0:s.search({queryString:r,searchType:i},c,l);case 4:return d=e.sent,h=null===(p=null==f?void 0:f.allRefNames)||void 0===p?void 0:p.filter((function(e){return e.toLowerCase().startsWith(r.toLowerCase())})).slice(0,10).map((function(e){return new o.Ay({label:e})})),e.abrupt("return",(0,n.dedupe)([].concat(a(h||[]),a(d||[])),(function(e){return e.getId()})));case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},54513:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(92561),o=r(87882);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function c(e,t){for(var r=0;r{"use strict";r.r(t),r.d(t,{default:()=>v});var n=r(88605),o=r(87882);function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function a(){a=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,c,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,c)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,a,u,c){var l=d(e[o],e,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==i(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,u,c)}),(function(e){r("throw",e,u,c)})):t.resolve(f).then((function(e){s.value=e,u(s)}),(function(e){return r("throw",e,u,c)}))}c(l.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[c];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>x});var n=r(92561),o=r(88605),i=r(87882),a=r(99376),u=r(57525),c=r(87791),l=r.n(c),s=r(30673);function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=d(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==f(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{default:()=>A});var n=r(88605),o=r(99376),i=r(57525),a=r(83809),u=r(69191);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;rh)){n.next=10;break}return o.complete(),n.abrupt("return");case 10:return y=s.getFeatures(p(p({},e),{},{start:f,end:h}),t),n.next=13,(0,u._)(y.pipe((0,a.$)()));case 13:if(v=n.sent,m=(null===(c=v[0])||void 0===c?void 0:c.get("seq"))||"",b=r.getConf("search"),g=r.getConf("searchForward"),w=r.getConf("searchReverse"),S=r.getConf("caseInsensitive"),A=new RegExp(b,"g"+(S?"i":"")),b){if(g){x=m.matchAll(A),O=l(x);try{for(O.s();!(E=O.n()).done;)j=E.value,P=f+(j.index||0),(0,i.doesIntersect2)(P,P+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(P,"-p"),refName:e.refName,start:P,end:P+j[0].length,name:j[0],strand:1}))}catch(e){O.e(e)}finally{O.f()}}if(w){k=(0,i.revcom)(m).matchAll(A),C=l(k);try{for(C.s();!(_=C.n()).done;)L=_.value,T=h-(L.index||0),(0,i.doesIntersect2)(T,T+b.length,e.start,e.end)&&o.next(new i.SimpleFeature({uniqueId:"".concat(r.id,"-match-").concat(T,"-n"),refName:e.refName,start:T-L[0].length,name:L[0],end:T,strand:-1}))}catch(e){C.e(e)}finally{C.f()}}}o.complete();case 22:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}())}},{key:"freeResources",value:function(){}}],n&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter)},94799:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>D});var n=r(88605),o=r(87882),i=r(99376),a=r(77021),u=r(12899),c=r.n(u),l=r(39962),s=r(70315),f=r(85832).Buffer;function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(){d=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function f(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};l(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var c=f(e[o],e,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==p(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(s).then((function(e){l.value=e,a(l)}),(function(e){return r("throw",e,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=f(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=f(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r>6&3]+w[A>>4&3]+w[A>>2&3]+w[3&A]);var x=S.map((function(e){return e.toLowerCase()})),O=function(){function e(t){var r=t.filehandle,n=t.path;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r)this.filehandle=r;else{if(!n)throw new Error("must supply path or filehandle");this.filehandle=new l.LocalFile(n)}this.isBigEndian=void 0}var t,r,n,o,i,a,u,p,h,m,g,w,A,O;return t=e,r=[{key:"_getParser",value:(O=y(d().mark((function e(t){var r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._getParsers();case 2:if(e.t0=t,r=e.sent[e.t0]){e.next=6;break}throw new Error("parser ".concat(t," not found"));case 6:return e.abrupt("return",r);case 7:case"end":return e.stop()}}),e,this)}))),function(e){return O.apply(this,arguments)})},{key:"_detectEndianness",value:(A=y(d().mark((function e(){var t,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.filehandle.read(f.allocUnsafe(8),0,8,0);case 2:if(t=e.sent,(r=t.buffer).readInt32LE(0)!==b){e.next=9;break}this.isBigEndian=!1,this.version=r.readInt32LE(4),e.next=15;break;case 9:if(r.readInt32BE(0)!==b){e.next=14;break}this.isBigEndian=!0,this.version=r.readInt32BE(4),e.next=15;break;case 14:throw new Error("not a 2bit file");case 15:case"end":return e.stop()}}),e,this)}))),function(){return A.apply(this,arguments)})},{key:"_getParsers",value:(w=y(d().mark((function e(){var t,r,n,o;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return t=this.isBigEndian?"big":"little",r=this.isBigEndian?"be":"le",n=(new s.i).endianess(t).uint8("nameLength").string("name",{length:"nameLength"}),n=1===this.version?n.buffer("offsetBytes",{length:8}):n.uint32("offset"),o=(new s.i).endianess(t).int32("magic",{assert:function(e){return 440477507===e}}).int32("version",{assert:function(e){return 0===e||1===e}}).uint32("sequenceCount",{assert:function(e){return e>=0}}).uint32("reserved"),e.abrupt("return",{header:o,index:(new s.i).endianess(t).uint32("sequenceCount").uint32("reserved").array("index",{length:"sequenceCount",type:n}),record1:(new s.i).endianess(t).uint32("dnaSize").uint32("nBlockCount"),record2:(new s.i).endianess(t).uint32("nBlockCount").array("nBlockStarts",{length:"nBlockCount",type:"uint32".concat(r)}).array("nBlockSizes",{length:"nBlockCount",type:"uint32".concat(r)}).uint32("maskBlockCount"),record3:(new s.i).endianess(t).uint32("maskBlockCount").array("maskBlockStarts",{length:"maskBlockCount",type:"uint32".concat(r)}).array("maskBlockSizes",{length:"maskBlockCount",type:"uint32".concat(r)}).int32("reserved")});case 8:case"end":return e.stop()}}),e,this)}))),function(){return w.apply(this,arguments)})},{key:"getHeader",value:(g=y(d().mark((function e(){var t,r,n;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._detectEndianness();case 2:return e.next=4,this.filehandle.read(f.allocUnsafe(16),0,16,0);case 4:return t=e.sent,r=t.buffer,e.next=8,this._getParser("header");case 8:return n=e.sent,e.abrupt("return",n.parse(r).result);case 10:case"end":return e.stop()}}),e,this)}))),function(){return g.apply(this,arguments)})},{key:"getIndex",value:(m=y(d().mark((function e(){var t,r,n,o,i,a,u,l=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getHeader();case 2:return t=e.sent,r=8+t.sequenceCount*(257+(1===this.version?8:4)),e.next=6,this.filehandle.read(f.allocUnsafe(r),0,r,8);case 6:return n=e.sent,o=n.buffer,e.next=10,this._getParser("index");case 10:return i=e.sent,a=i.parse(o).result.index,u={},1===this.version?a.forEach((function(e){var t=e.name,r=e.offsetBytes,n=c().fromBytes(r,!0,!l.isBigEndian);if(n.greaterThan(Number.MAX_SAFE_INTEGER))throw new Error("integer overflow. File offset greater than 2^53-1 encountered. This library can only handle offsets up to 2^53-1.");u[t]=n.toNumber()})):a.forEach((function(e){var t=e.name,r=e.offset;u[t]=r})),e.abrupt("return",u);case 15:case"end":return e.stop()}}),e,this)}))),function(){return m.apply(this,arguments)})},{key:"getSequenceNames",value:(h=y(d().mark((function e(){var t;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,e.abrupt("return",Object.keys(t));case 4:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"getSequenceSizes",value:(p=y(d().mark((function e(){var t,r,n,o,i,a,u=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.getIndex();case 2:return t=e.sent,r=Object.keys(t),n=Object.values(t).map((function(e){return u._getSequenceSize(e)})),e.next=7,Promise.all(n);case 7:for(o=e.sent,i={},a=0;a1&&void 0!==O[1]?O[1]:0,n=O.length>2?O[2]:void 0,e.next=4,this.getIndex();case 4:if(o=e.sent,i=o[t]){e.next=8;break}return e.abrupt("return",void 0);case 8:return e.next=10,this._getSequenceRecord(i);case 10:if(a=e.sent,!(r<0)){e.next=13;break}throw new TypeError("regionStart cannot be less than 0");case 13:return(void 0===n||n>a.dnaSize)&&(n=a.dnaSize),u=this._getOverlappingBlocks(r,n,a.nBlocks.starts,a.nBlocks.sizes),c=this._getOverlappingBlocks(r,n,a.maskBlocks.starts,a.maskBlocks.sizes),l=f.allocUnsafe(Math.ceil((n-r)/4)+1),s=Math.floor(r/4),e.next=20,this.filehandle.read(l,0,l.length,a.dnaPosition+s);case 20:for(p=e.sent,h=p.buffer,y="",v=r;vv,u[0]&&v>=u[0].start&&v=u+n[a]||t<=u){if(void 0!==o){i=a;break}}else void 0===o&&(o=a)}if(void 0===o)return[];void 0===i&&(i=r.length);for(var c=new Array(i-o),l=o;l=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||function(e,t){if(e){if("string"==typeof e)return C(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?C(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>P});var n=r(41486),o=r.n(n),i=r(46186),a=r(33774),u=r(11898),c=r(91118),l=r(45342),s=r(64568),f=r(3024),p=r(72731),d=r(87931),h=r(57525);function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}var v=["id","displays"],m=["id"];function b(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||g(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){if(e){if("string"==typeof e)return w(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?w(e,t):void 0}}function w(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}var O=(0,f.makeStyles)()({block:{display:"block"}});function E(e){return e.map((function(e){e.id;var t=e.displays;return A(A({},x(e,v)),{},{displays:t.map((function(e){return e.id,x(e,m)}))})}))}function j(e){var t=e.checked,r=e.label,n=e.onChange,i=O().classes;return o().createElement(a.A,{className:i.block,control:o().createElement(u.A,{checked:t,onChange:n}),label:r})}const P=(0,i.observer)((function(e){var t=e.model,r=e.handleClose,i=e.feature,a=e.viewType,u=b((0,n.useState)(!0),2),f=u[0],y=u[1],v=b((0,n.useState)(!0),2),m=v[0],S=v[1];return o().createElement(d.Dialog,{open:!0,onClose:r,title:"Breakpoint split view options"},o().createElement(c.A,null,o().createElement(j,{checked:f,onChange:function(e){return y(e.target.checked)},label:"Copy tracks into the new view"}),o().createElement(j,{checked:m,onChange:function(e){return S(e.target.checked)},label:"Mirror tracks vertically in vertically stacked view"})),o().createElement(l.A,null,o().createElement(s.A,{onClick:function(){var e,n=t.view,o=(0,h.getSession)(t);try{var u=a.snapshotFromBreakendFeature(i,n),c=b(u.views,2),l=c[0],s=c[1],f=(0,p.getSnapshot)(n.tracks);o.addView("BreakpointSplitView",A(A({},u),{},{views:[A(A({},l),{},{tracks:E(f),offsetPx:l.offsetPx-n.width/2+100}),A(A({},s),{},{tracks:E(m?(e=f,function(e){if(Array.isArray(e))return w(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||g(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).reverse():f),offsetPx:s.offsetPx-n.width/2+100})]}))}catch(e){console.error(e),o.notify("".concat(e))}r()},variant:"contained",color:"primary",autoFocus:!0},"OK"),o().createElement(s.A,{onClick:function(){return r()},color:"secondary",variant:"contained"},"Cancel")))}))},14263:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>X});var n=r(41486),o=r.n(n),i=r(46186),a=r(92770),u=r(52313),c=r(61),l=r(15542),s=r(22970),f=r(33774),p=r(11898),d=r(80142),h=r(5912),y=r(57525),v=r(7118),m=r.n(v),b=r(44563);function g(e){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},g(e)}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||S(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function S(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(i,Q));return o().createElement(a.A,{"data-testid":"variant-side-drawer"},o().createElement(u.FeatureDetails,Y({feature:l,descriptions:Y(Y({},W),n)},e)),o().createElement(J,{feature:l,descriptions:n}),o().createElement(K,{feature:l,descriptions:n}),"breakend"===i.type?o().createElement(R,{feature:i,locStrings:i.ALT.map((function(e){var t;return(null===(t=(0,c.h)(e))||void 0===t?void 0:t.MatePosition)||""})),model:t}):null,"translocation"===i.type?o().createElement(R,{feature:i,model:t,locStrings:["".concat(i.INFO.CHR2[0],":").concat(i.INFO.END)]}):null,o().createElement(P,Y(Y({feature:i},e),{},{descriptions:n})))}))},80932:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>E});var n=r(88605),o=r(87882),i=r(99376),a=r(31056),u=r(12388),c=r(61),l=r(69076);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function h(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function y(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){h(i,n,o,a,u,"next",e)}function u(e){h(i,n,o,a,u,"throw",e)}a(void 0)}))}}function v(e,t){for(var r=0;r536870888)){e.next=14;break}throw new Error("Data exceeds maximum string length (512MB)");case 14:i=(new TextDecoder).decode(n),s=A(i),p=s.header,h=s.lines,y={},v=new c.A({header:p}),m=0,b=f(h);try{for(b.s();!(g=b.n()).done;)w=g.value,S=new l.A({variant:v.parseLine(w),parser:v,id:"".concat(this.id,"-").concat(m++)}),O=S.get("refName"),y[O]||(y[O]=new a.Ay),y[O].insert([S.get("start"),S.get("end")],S)}catch(e){b.e(e)}finally{b.f()}return e.abrupt("return",{header:p,intervalTree:y});case 22:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"setup",value:(p=y(d().mark((function e(){var t=this;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.vcfFeatures||(this.vcfFeatures=this.setupP().catch((function(e){throw t.vcfFeatures=void 0,e}))),e.abrupt("return",this.vcfFeatures);case 2:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"getRefNames",value:(s=y(d().mark((function e(){var t,r;return d().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=3,this.setup();case 3:return t=e.sent,r=t.intervalTree,e.abrupt("return",Object.keys(r));case 6:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var r=y(d().mark((function r(n){var o,i,a,u,c,l;return d().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.prev=0,i=e.start,a=e.end,u=e.refName,r.next=4,t.setup();case 4:c=r.sent,l=c.intervalTree,null===(o=l[u])||void 0===o||o.search([i,a]).forEach((function(e){n.next(e)})),n.complete(),r.next=13;break;case 10:r.prev=10,r.t0=r.catch(0),n.error(r.t0);case 13:case"end":return r.stop()}}),r,null,[[0,10]])})));return function(e){return r.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],n&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter);O.capabilities=["getFeatures","getRefNames"];const E=O},69076:(e,t,r)=>{"use strict";r.d(t,{A:()=>w});var n=r(61);function o(e){return function(e){if(Array.isArray(e))return u(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||a(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(e,t):void 0}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===t)return["insertion",t];if(""===t)return["deletion",t];if(""===t)return["inversion",t];if(""===t)return["translocation",t];if(t.includes("<"))return["sv",t];if(e.length===t.length)return e.split("").reverse().join("")===t?["inversion",f("inversion",e,t)]:["substitution",f("substitution",e,t)];if(e.length<=t.length){var r=t.length-e.length,o=r.toLocaleString("en-US");return["insertion",r>5?o+"bp INS":f("insertion",e,t)]}if(e.length>t.length){var i=e.length-t.length,a=i.toLocaleString("en-US");return["deletion",i>5?a+"bp DEL":f("deletion",e,t)]}return["indel",f("indel",e,t)]}(e,t),d=i(p,2);c=d[0],l=d[1]}c&&l&&(a.add(c),u.add(l))})),u.size>1){var c=o(u),l=new Set(c.map((function(e){var t=e.split("->");return t[1]?t[0]:e})));u=new Set(o(l).map((function(e){return e.trim()})).map((function(e){var t=c.map((function(e){return e.split("->").map((function(e){return e.trim()}))})).map((function(t){return t[1]&&t[0]===e?t[1]:""})).filter((function(e){return!!e}));return t.length?"".concat(e," -> ").concat(t.join(",")):e})))}return a.size?[o(a).join(","),o(u).join(",")]:[]}function s(e,t,r){if("string"==typeof t&&!t.startsWith("<"))return[];var n=c[t];if(!n&&r.getMetadata("ALT",t)&&(n="sequence_variant"),n)return[n,t];var o=t.split(":");return o.length>1?s(e,"<".concat(o.slice(0,-1).join(":"),">"),r):[]}function f(e,t,r){return"".concat(e," ").concat(t," -> ").concat(r)}function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function d(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function h(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r"===e}));return{refName:a,start:s,end:(null==o?void 0:o.some((function(e){return e.includes("<")})))&&u.END&&!h?+u.END[0]:s+n.length,description:d,type:p,name:null==c?void 0:c.join(","),aliases:c&&c.length>1?e.ID.slice(1):void 0}}},{key:"toJSON",value:function(){return h(h(h({uniqueId:this._id},this.variant),this.data),{},{samples:this.variant.SAMPLES})}}])&&b(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},84542:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>S});var n=r(88605),o=r(87882),i=r(99376),a=r(87906),u=r(61),c=r(69076);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function d(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){d(i,n,o,a,u,"next",e)}function u(e){d(i,n,o,a,u,"throw",e)}a(void 0)}))}}function y(e,t){for(var r=0;r0&&void 0!==o[0]?o[0]:{},e.next=3,this.configure();case 3:return r=e.sent,n=r.vcf,e.abrupt("return",n.getReferenceSequenceNames(t));case 6:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"getHeader",value:(s=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.vcf,e.abrupt("return",r.getHeader());case 5:case"end":return e.stop()}}),e,this)}))),function(){return s.apply(this,arguments)})},{key:"getMetadata",value:(l=h(p().mark((function e(){var t,r;return p().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.configure();case 2:return t=e.sent,r=t.parser,e.abrupt("return",r.getMetadata());case 5:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"getFeatures",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(0,i.ObservableCreate)(function(){var n=h(p().mark((function n(o){var i,a,u,l,s,d;return p().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return i=e.refName,a=e.start,u=e.end,n.next=3,t.configure();case 3:return l=n.sent,s=l.vcf,d=l.parser,n.next=8,s.getLines(i,a,u,f({lineCallback:function(e,r){o.next(new c.A({variant:d.parseLine(e),parser:d,id:"".concat(t.id,"-vcf-").concat(r)}))}},r));case 8:o.complete();case 9:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),r.signal)}},{key:"freeResources",value:function(){}}],n&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),t}(n.BaseFeatureDataAdapter)},40117:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>O});var n=r(23438),o=r(88605),i=r(87882),a=r(57525),u=r(99376),c=r(12590);function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw i}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function y(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function v(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){y(i,n,o,a,u,"next",e)}function u(e){y(i,n,o,a,u,"throw",e)}a(void 0)}))}}function m(e,t){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=e.refName,o=e.start,i=e.end,a=r.bpPerPx,c=void 0===a?0:a,l=r.signal,f=r.resolution,p=void 0===f?1:f,y=r.statusCallback,m=void 0===y?function(){}:y;return(0,u.ObservableCreate)(function(){var a=v(h().mark((function a(u){var l,f,y,v,b,g,w;return h().wrap((function(a){for(;;)switch(a.prev=a.next){case 0:return m("Downloading bigwig data"),l=t.getConf("source"),a.next=4,t.setup(r);case 4:return f=a.sent,y=f.bigwig,a.next=8,y.getFeatures(n,o,i,d(d({},r),{},{basesPerSpan:c/p}));case 8:v=a.sent,b=s(v),a.prev=10,w=h().mark((function t(){var r,o;return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:r=g.value,l&&(r.source=l),o="".concat(l,":").concat(e.refName,":").concat(r.start,"-").concat(r.end),r.refName=n,r.uniqueId=o,u.next({get:function(e){return r[e]},id:function(){return o},toJSON:function(){return r}});case 6:case"end":return t.stop()}}),t)})),b.s();case 13:if((g=b.n()).done){a.next=17;break}return a.delegateYield(w(),"t0",15);case 15:a.next=13;break;case 17:a.next=22;break;case 19:a.prev=19,a.t1=a.catch(10),b.e(a.t1);case 22:return a.prev=22,b.f(),a.finish(22);case 25:u.complete();case 26:case"end":return a.stop()}}),a,null,[[10,19,22,25]])})));return function(e){return a.apply(this,arguments)}}(),l)}},{key:"getMultiRegionFeatureDensityStats",value:(l=v(h().mark((function e(t){return h().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{featureDensity:0});case 1:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)})},{key:"freeResources",value:function(){}}],o&&m(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),t}(o.BaseFeatureDataAdapter);x.capabilities=["hasResolution","hasLocalStats","hasGlobalStats"];const O=x},78586:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(41486),o=r.n(n),i=r(91118),a=r(15542),u=r(22970),c=r(45342),l=r(64568),s=r(57991),f=r.n(s),p=r(54133);function d(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>y});var n=r(41486),o=r.n(n),i=r(46186),a=r(91118),u=r(15542),c=r(33774),l=r(22510),s=r(45342),f=r(64568),p=r(87931),d=r(53486);function h(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r{"use strict";r.r(t),r.d(t,{default:()=>p});var n=r(41486),o=r.n(n),i=r(46186),a=r(57525),u=r(54133),c=r(90127),l=r(38038);function s(e){return s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},s(e)}function f(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const p=(0,i.observer)((function(e){var t=e.model,r=t.stats,n=t.height,i=t.needsScalebar,p=(0,a.getContainingView)(t).trackLabels,d=(0,a.getContainingTrack)(t),h="overlapping"===p?(0,a.measureText)((0,u.getConf)(d,"name"),12.8)+100:50;return o().createElement("div",null,o().createElement(c.GQ,function(e){for(var t=1;t{"use strict";r.r(t),r.d(t,{renderSvg:()=>f});var n=r(41486),o=r.n(n),i=r(57525),a=r(77090),u=r(38038);function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function l(){l=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,r){return e[t]=r}}function p(e,t,r,n){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),u=new T(n||[]);return o(a,"_invoke",{value:k(e,r,u)}),a}function d(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=p;var h="suspendedStart",y="suspendedYield",v="executing",m="completed",b={};function g(){}function w(){}function S(){}var A={};f(A,a,(function(){return this}));var x=Object.getPrototypeOf,O=x&&x(x(I([])));O&&O!==r&&n.call(O,a)&&(A=O);var E=S.prototype=g.prototype=Object.create(A);function j(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function P(e,t){function r(o,i,a,u){var l=d(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){r("next",e,a,u)}),(function(e){r("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return r("throw",e,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return i=i?i.then(o,o):o()}})}function k(t,r,n){var o=h;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===m){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===b)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(t,r,n);if("normal"===l.type){if(o=n.done?m:y,l.arg===b)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=m,n.method="throw",n.arg=l.arg)}}}function C(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,C(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),b;var i=d(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,b;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,b):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,b)}function _(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function L(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(_,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),L(r),b}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),b}},t}function s(e,t,r,n,o,i,a){try{var u=e[i](a),c=u.value}catch(e){return void r(e)}u.done?t(c):Promise.resolve(c).then(n,o)}function f(e,t,r){return p.apply(this,arguments)}function p(){var e;return e=l().mark((function e(t,r,n){var c,s,f,p;return l().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,a.when)((function(){return!!t.stats&&!!t.regionCannotBeRenderedText}));case 2:return c=t.needsScalebar,s=t.stats,f=(0,i.getContainingView)(t),p=f.offsetPx,e.t0=o(),e.t1=o().Fragment,e.t2=o(),e.t3={id:"snpcov"},e.next=10,n(r);case 10:return e.t4=e.sent,e.t5=e.t2.createElement.call(e.t2,"g",e.t3,e.t4),e.t6=c&&s?o().createElement("g",{transform:"translate(".concat(Math.max(-p,0),")")},o().createElement(u.A,{model:t,orientation:"left"})):null,e.abrupt("return",e.t0.createElement.call(e.t0,e.t1,null,e.t5,e.t6));case 14:case"end":return e.stop()}}),e)})),p=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(e){s(i,n,o,a,u,"next",e)}function u(e){s(i,n,o,a,u,"throw",e)}a(void 0)}))},p.apply(this,arguments)}},89379:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>$});var n=r(41486),o=r.n(n),i=r(91118),a=r(64568),u=r(45342),c=r(3024),l=r(57525),s=r(42738),f=r.n(s),p=r(92770),d=r(65172),h=r(54526),y=r(80446),v=r(74002),m=r(47838),b=r(46186),g=r(43111),w=r.n(g),S=r(98784);function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function x(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function O(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||(o[r]=e[r]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(y,F)),m=B((0,n.useState)("blue"),2),b=m[0],g=m[1],w=B((0,n.useState)({idx:0,field:null}),2),S=w[0],A=w[1];return o().createElement("div",null,o().createElement(a.A,{disabled:!d.length,onClick:function(e){return f(e.currentTarget)}},"Change color of selected items"),o().createElement(a.A,{onClick:function(){return r((0,L.BO)(D(t),d))},disabled:!d.length},o().createElement(R.A,null),i?"Move selected items up":null),o().createElement(a.A,{onClick:function(){return r((0,L.oJ)(D(t),d))},disabled:!d.length},o().createElement(M.A,null),i?"Move selected items down":null),o().createElement(a.A,{onClick:function(){return r((0,L.BO)(D(t),d,t.length))},disabled:!d.length},o().createElement(T.A,null),i?"Move selected items to top":null),o().createElement(a.A,{onClick:function(){return r((0,L.oJ)(D(t),d,t.length))},disabled:!d.length},o().createElement(I.A,null),i?"Move selected items to bottom":null),o().createElement(C.ColorPopover,{anchorEl:s,color:b,onChange:function(e){g(e),d.forEach((function(r){var n=t.find((function(e){return e.name===r}));n&&(n.color=e)})),r(D(t))},onClose:function(){return f(null)}}),o().createElement("div",{style:{height:400,width:"100%"}},o().createElement(k.zh,{getRowId:function(e){return e.name},checkboxSelection:!0,disableRowSelectionOnClick:!0,onRowSelectionModelChange:function(e){return h(e)},rows:t,rowHeight:25,columnHeaderHeight:33,columns:[{field:"color",headerName:"Color",renderCell:function(e){var n=e.value,i=e.id;return o().createElement(_(),{color:n||"blue",onChange:function(e){var n=t.find((function(e){return e.name===i}));n&&(n.color=e),r(D(t))}})}},{field:"name",sortingOrder:[null],headerName:"Name",width:(0,l.measureGridWidth)(t.map((function(e){return e.name})))}].concat(D(Object.keys(v).map((function(e){return{field:e,sortingOrder:[null],renderCell:function(e){var t=e.value;return o().createElement("div",{className:u.cell},o().createElement(N.SanitizedHTML,{html:(0,l.getStr)(t)}))},width:(0,l.measureGridWidth)(t.map((function(t){return t[e]})))}})))),sortModel:[],onSortModelChange:function(e){var n=e[0],o=(S.idx+1)%2,i=(null==n?void 0:n.field)||S.field;A({idx:o,field:i}),r(i?D(t).sort((function(e,t){var r=(0,l.getStr)(e[i]),n=(0,l.getStr)(t[i]);return 1===o?r.localeCompare(n):n.localeCompare(r)})):t)}})))};function V(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return u}}(e,t)||W(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function W(e,t){if(e){if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?q(e,t):void 0}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r