New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@nightingale-elements/nightingale-interpro-track

Package Overview
Dependencies
Maintainers
4
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nightingale-elements/nightingale-interpro-track - npm Package Compare versions

Comparing version 4.0.22-alpha.0 to 4.0.23-alpha.0

2

dist/index.js

@@ -16,3 +16,3 @@ import{bindEvents as t,contrastingColor as e,getColor as n}from"@nightingale-elements/nightingale-new-core";import r,{DefaultLayout as i}from"@nightingale-elements/nightingale-track";function a(t,e,n,r){var i,a=arguments.length,o=a<3?e:null===r?r=Object.getOwnPropertyDescriptor(e,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,n,r);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(o=(a<3?i(o):a>3?i(e,n,o):i(e,n))||o);return a>3&&o&&Object.defineProperty(e,n,o),o}function o(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)}function s(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n

* SPDX-License-Identifier: BSD-3-Clause
*/}var h;null===(h=window.HTMLSlotElement)||void 0===h||h.prototype.assignedElements;var c={value:()=>{}};function f(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new d(r)}function d(t){this._=t}function p(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function v(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function g(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=c,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}d.prototype=f.prototype={constructor:d,on:function(t,e){var n,r=this._,i=p(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=g(r[n],t.name,e);else if(null==e)for(n in r)r[n]=g(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=v(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new d(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var y="http://www.w3.org/1999/xhtml",m={svg:"http://www.w3.org/2000/svg",xhtml:y,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),m.hasOwnProperty(e)?{space:m[e],local:t}:t}function w(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===y&&e.documentElement.namespaceURI===y?e.createElement(t):e.createElementNS(n,t)}}function b(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function x(t){var e=_(t);return(e.local?b:w)(e)}function k(){}function A(t){return null==t?k:function(){return this.querySelector(t)}}function $(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function S(){return[]}function j(t){return null==t?S:function(){return this.querySelectorAll(t)}}function E(t){return function(){return this.matches(t)}}function O(t){return function(e){return e.matches(t)}}var P=Array.prototype.find;function M(){return this.firstElementChild}var F=Array.prototype.filter;function N(){return Array.from(this.children)}function R(t){return new Array(t.length)}function C(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function T(t){return function(){return t}}function Y(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new C(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function q(t,e,n,r,i,a,o){var s,u,l,h=new Map,c=e.length,f=a.length,d=new Array(c);for(s=0;s<c;++s)(u=e[s])&&(d[s]=l=o.call(u,u.__data__,s,e)+"",h.has(l)?i[s]=u:h.set(l,u));for(s=0;s<f;++s)l=o.call(t,a[s],s,a)+"",(u=h.get(l))?(r[s]=u,u.__data__=a[s],h.delete(l)):n[s]=new C(t,a[s]);for(s=0;s<c;++s)(u=e[s])&&h.get(d[s])===u&&(i[s]=u)}function L(t){return t.__data__}function X(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function z(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function H(t){return function(){this.removeAttribute(t)}}function I(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W(t,e){return function(){this.setAttribute(t,e)}}function B(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function G(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function D(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function K(t,e,n){return function(){this.style.setProperty(t,e,n)}}function J(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Q(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function Z(t){return function(){delete this[t]}}function tt(t,e){return function(){this[t]=e}}function et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nt(t){return t.trim().split(/^|\s+/)}function rt(t){return t.classList||new it(t)}function it(t){this._node=t,this._names=nt(t.getAttribute("class")||"")}function at(t,e){for(var n=rt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ot(t,e){for(var n=rt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function st(t){return function(){at(this,t)}}function ut(t){return function(){ot(this,t)}}function lt(t,e){return function(){(e.apply(this,arguments)?at:ot)(this,t)}}function ht(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function dt(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function vt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function gt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(){return null}function _t(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function kt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function At(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function $t(t,e,n){var r=V(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function St(t,e){return function(){return $t(this,t,e)}}function jt(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}C.prototype={constructor:C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},it.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Et=[null];function Ot(t,e){this._groups=t,this._parents=e}function Pt(){return new Ot([[document.documentElement]],Et)}function Mt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ft(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nt(){}Ot.prototype=Pt.prototype={constructor:Ot,select:function(t){"function"!=typeof t&&(t=A(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,l=r[i]=new Array(u),h=0;h<u;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),l[h]=o);return new Ot(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return $(t.apply(this,arguments))}}(t):j(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,l=0;l<u;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Ot(r,i)},selectChild:function(t){return this.select(null==t?M:function(t){return function(){return P.call(this.children,t)}}("function"==typeof t?t:O(t)))},selectChildren:function(t){return this.selectAll(null==t?N:function(t){return function(){return F.call(this.children,t)}}("function"==typeof t?t:O(t)))},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,L);var n=e?q:Y,r=this._parents,i=this._groups;"function"!=typeof t&&(t=T(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++l){var h=r[l],c=i[l],f=c.length,d=X(t.call(h,h&&h.__data__,l,r)),p=d.length,v=s[l]=new Array(p),g=o[l]=new Array(p),y=u[l]=new Array(f);n(h,c,v,g,y,d,e);for(var m,_,w=0,b=0;w<p;++w)if(m=v[w]){for(w>=b&&(b=w+1);!(_=g[b])&&++b<p;);m._next=_||null}}return(o=new Ot(o,r))._enter=s,o._exit=u,o},enter:function(){return new Ot(this._enter||this._groups.map(R),this._parents)},exit:function(){return new Ot(this._exit||this._groups.map(R),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),u=0;u<o;++u)for(var l,h=n[u],c=r[u],f=h.length,d=s[u]=new Array(f),p=0;p<f;++p)(l=h[p]||c[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new Ot(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=z);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,l=i[a]=new Array(u),h=0;h<u;++h)(o=s[h])&&(l[h]=o);l.sort(e)}return new Ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?I:H:"function"==typeof e?n.local?D:G:n.local?B:W)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?U:"function"==typeof e?J:K)(t,e,n??"")):Q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Z:"function"==typeof e?et:tt)(t,e)):this.node()[t]},classed:function(t,e){var n=nt(t+"");if(arguments.length<2){for(var r=rt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?lt:e?st:ut)(n,e))},text:function(t){return arguments.length?this.each(null==t?ht:("function"==typeof t?ft:ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?vt:pt)(t)):this.node().innerHTML},raise:function(){return this.each(gt)},lower:function(){return this.each(yt)},append:function(t){var e="function"==typeof t?t:x(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:x(t),r=null==e?mt:"function"==typeof e?e:A(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(_t)},clone:function(t){return this.select(t?bt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=xt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?At:kt,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,h=s.length;l<h;++l)for(r=0,u=s[l];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?jt:St)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};var Rt=1/.7,Ct="\\s*([+-]?\\d+)\\s*",Tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qt=/^#([0-9a-f]{3,8})$/,Lt=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),Xt=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),zt=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${Tt}\\)$`),Ht=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${Tt}\\)$`),It=new RegExp(`^hsl\\(${Tt},${Yt},${Yt}\\)$`),Wt=new RegExp(`^hsla\\(${Tt},${Yt},${Yt},${Tt}\\)$`),Bt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Gt(){return this.rgb().formatHex()}function Dt(){return this.rgb().formatRgb()}function Vt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=qt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ut(e):3===n?new Zt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Kt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Kt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Lt.exec(t))?new Zt(e[1],e[2],e[3],1):(e=Xt.exec(t))?new Zt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zt.exec(t))?Kt(e[1],e[2],e[3],e[4]):(e=Ht.exec(t))?Kt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=It.exec(t))?ae(e[1],e[2]/100,e[3]/100,1):(e=Wt.exec(t))?ae(e[1],e[2]/100,e[3]/100,e[4]):Bt.hasOwnProperty(t)?Ut(Bt[t]):"transparent"===t?new Zt(NaN,NaN,NaN,0):null}function Ut(t){return new Zt(t>>16&255,t>>8&255,255&t,1)}function Kt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Zt(t,e,n,r)}function Jt(t){return t instanceof Nt||(t=Vt(t)),t?new Zt((t=t.rgb()).r,t.g,t.b,t.opacity):new Zt}function Qt(t,e,n,r){return 1===arguments.length?Jt(t):new Zt(t,e,n,r??1)}function Zt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function te(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function ee(){const t=ne(this.opacity);return`${1===t?"rgb(":"rgba("}${re(this.r)}, ${re(this.g)}, ${re(this.b)}${1===t?")":`, ${t})`}`}function ne(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function re(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return((t=re(t))<16?"0":"")+t.toString(16)}function ae(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new se(t,e,n,r)}function oe(t){if(t instanceof se)return new se(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=Vt(t)),!t)return new se;if(t instanceof se)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new se(o,s,u,t.opacity)}function se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ue(t){return(t=(t||0)%360)<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function he(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Mt(Nt,Vt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Gt,formatHex:Gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oe(this).formatHsl()},formatRgb:Dt,toString:Dt}),Mt(Zt,Qt,Ft(Nt,{brighter(t){return t=null==t?Rt:Math.pow(Rt,t),new Zt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Zt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Zt(re(this.r),re(this.g),re(this.b),ne(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:te,formatHex:te,formatHex8:function(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ee,toString:ee})),Mt(se,(function(t,e,n,r){return 1===arguments.length?oe(t):new se(t,e,n,r??1)}),Ft(Nt,{brighter(t){return t=null==t?Rt:Math.pow(Rt,t),new se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Zt(he(t>=240?t-240:t+120,i,r),he(t,i,r),he(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new se(ue(this.h),le(this.s),le(this.l),ne(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ne(this.opacity);return`${1===t?"hsl(":"hsla("}${ue(this.h)}, ${100*le(this.s)}%, ${100*le(this.l)}%${1===t?")":`, ${t})`}`}}));var ce=t=>()=>t;function fe(t){return 1==(t=+t)?de:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ce(isNaN(e)?n:e)}}function de(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ce(isNaN(t)?e:t)}var pe=function t(e){var n=fe(e);function r(t,e){var r=n((t=Qt(t)).r,(e=Qt(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=de(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ve(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ge=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ye=new RegExp(ge.source,"g");function me(t,e){var n,r,i,a=ge.lastIndex=ye.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=ge.exec(t))&&(r=ye.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:ve(n,r)})),a=ye.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}var _e,we=180/Math.PI,be={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xe(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*we,skewX:Math.atan(u)*we,scaleX:o,scaleY:s}}function ke(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:ve(t,i)},{i:u-2,x:ve(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ve(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ve(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ve(t,n)},{i:s-2,x:ve(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Ae,$e,Se=ke((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?be:xe(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),je=ke((function(t){return null==t?be:(_e||(_e=document.createElementNS("http://www.w3.org/2000/svg","g")),_e.setAttribute("transform",t),(t=_e.transform.baseVal.consolidate())?xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):be)}),", ",")",")"),Ee=0,Oe=0,Pe=0,Me=0,Fe=0,Ne=0,Re="object"==typeof performance&&performance.now?performance:Date,Ce="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Te(){return Fe||(Ce(Ye),Fe=Re.now()+Ne)}function Ye(){Fe=0}function qe(){this._call=this._time=this._next=null}function Le(t,e,n){var r=new qe;return r.restart(t,e,n),r}function Xe(){Fe=(Me=Re.now())+Ne,Ee=Oe=0;try{!function(){Te(),++Ee;for(var t,e=Ae;e;)(t=Fe-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ee}()}finally{Ee=0,function(){var t,e,n=Ae,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ae=e);$e=t,He(r)}(),Fe=0}}function ze(){var t=Re.now(),e=t-Me;e>1e3&&(Ne-=e,Me=t)}function He(t){Ee||(Oe&&(Oe=clearTimeout(Oe)),t-Fe>24?(t<1/0&&(Oe=setTimeout(Xe,t-Re.now()-Ne)),Pe&&(Pe=clearInterval(Pe))):(Pe||(Me=Re.now(),Pe=setInterval(ze,1e3)),Ee=1,Ce(Xe)))}function Ie(t,e,n){var r=new qe;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}qe.prototype=Le.prototype={constructor:qe,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Te():+n)+(null==e?0:+e),this._next||$e===this||($e?$e._next=this:Ae=this,$e=this),this._call=t,this._time=n,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var We=f("start","end","cancel","interrupt"),Be=[];function Ge(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,h,c,f;if(1!==n.state)return u();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Ie(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Ie((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(c=n.tween.length),l=0,h=-1;l<c;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Le(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:We,tween:Be,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function De(t,e){var n=Ue(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Ve(t,e){var n=Ue(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Ue(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ke(t,e){var n,r;return function(){var i=Ve(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Je(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Ve(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}a.tween=i}}function Qe(t,e,n){var r=t._id;return t.each((function(){var t=Ve(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Ue(t,r).value[e]}}function Ze(t,e){var n;return("number"==typeof e?ve:e instanceof Vt?pe:(n=Vt(e))?(e=n,pe):me)(t,e)}function tn(t){return function(){this.removeAttribute(t)}}function en(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function an(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function on(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function sn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function un(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ln(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&un(t,i)),n}return i._value=e,i}function hn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sn(t,i)),n}return i._value=e,i}function cn(t,e){return function(){De(this,t).delay=+e.apply(this,arguments)}}function fn(t,e){return e=+e,function(){De(this,t).delay=e}}function dn(t,e){return function(){Ve(this,t).duration=+e.apply(this,arguments)}}function pn(t,e){return e=+e,function(){Ve(this,t).duration=e}}function vn(t,e){if("function"!=typeof e)throw new Error;return function(){Ve(this,t).ease=e}}function gn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?De:Ve;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yn=Pt.prototype.constructor;function mn(t){return function(){this.style.removeProperty(t)}}function _n(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wn(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&_n(t,a,n)),r}return a._value=e,a}function bn(t){return function(e){this.textContent=t.call(this,e)}}function xn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&bn(r)),e}return r._value=t,r}var kn=0;function An(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function $n(){return++kn}var Sn=Pt.prototype;An.prototype={constructor:An,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=A(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,l=r[o],h=l.length,c=a[o]=new Array(h),f=0;f<h;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),c[f]=u,Ge(c[f],e,n,f,c,Ue(s,n)));return new An(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,l=r[s],h=l.length,c=0;c<h;++c)if(u=l[c]){for(var f,d=t.call(u,u.__data__,c,l),p=Ue(u,n),v=0,g=d.length;v<g;++v)(f=d[v])&&Ge(f,e,n,v,d,p);a.push(d),o.push(u)}return new An(a,o,e,n)},selectChild:Sn.selectChild,selectChildren:Sn.selectChildren,filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new An(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],h=n[s],c=l.length,f=o[s]=new Array(c),d=0;d<c;++d)(u=l[d]||h[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new An(o,this._parents,this._name,this._id)},selection:function(){return new yn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=$n(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var h=Ue(o,e);Ge(o,t,n,l,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new An(r,this._parents,t,n)},call:Sn.call,nodes:Sn.nodes,node:Sn.node,size:Sn.size,empty:Sn.empty,each:Sn.each,on:function(t,e){var n=this._id;return arguments.length<2?Ue(this.node(),n).on.on(t):this.each(gn(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?je:Ze;return this.attrTween(t,"function"==typeof e?(n.local?on:an)(n,r,Qe(this,"attr."+t,e)):null==e?(n.local?en:tn)(n):(n.local?rn:nn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?ln:hn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Se:Ze;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Q(this,t),o=(this.style.removeProperty(t),Q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,mn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Q(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Q(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Qe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Ve(this,t),l=u.on,h=null==u.value[o]?a||(a=mn(e)):void 0;l===n&&i===h||(r=(n=l).copy()).on(s,i=h),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,wn(t,e,n??""))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Ue(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ke:Je)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?cn:fn)(e,t)):Ue(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?dn:pn)(e,t)):Ue(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(vn(e,t)):Ue(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Ve(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Ve(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Sn[Symbol.iterator]};var jn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function En(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function On(t,e,n){this.k=t,this.x=e,this.y=n}Pt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Pt.prototype.transition=function(t){var e,n;t instanceof An?(e=t._id,t=t._name):(e=$n(),(n=jn).time=Te(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)(o=s[l])&&Ge(o,t,e,l,s,n||En(o,e));return new An(r,this._parents,t,e)},On.prototype={constructor:On,scale:function(t){return 1===t?this:new On(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new On(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new On(1,0,0),On.prototype;var Pn=Array.isArray,Mn="object"==typeof global&&global&&global.Object===Object&&global,Fn="object"==typeof self&&self&&self.Object===Object&&self,Nn=Mn||Fn||Function("return this")(),Rn=Nn.Symbol,Cn=Object.prototype,Tn=Cn.hasOwnProperty,Yn=Cn.toString,qn=Rn?Rn.toStringTag:void 0;var Ln=Object.prototype.toString;var Xn=Rn?Rn.toStringTag:void 0;function zn(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Xn&&Xn in Object(t)?function(t){var e=Tn.call(t,qn),n=t[qn];try{t[qn]=void 0;var r=!0}catch(t){}var i=Yn.call(t);return r&&(e?t[qn]=n:delete t[qn]),i}(t):function(t){return Ln.call(t)}(t)}function Hn(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==zn(t)}var In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wn=/^\w*$/;function Bn(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Gn,Dn=Nn["__core-js_shared__"],Vn=(Gn=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||""))?"Symbol(src)_1."+Gn:"";var Un=Function.prototype.toString;var Kn=/^\[object .+?Constructor\]$/,Jn=Function.prototype,Qn=Object.prototype,Zn=Jn.toString,tr=Qn.hasOwnProperty,er=RegExp("^"+Zn.call(tr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nr(t){if(!Bn(t)||(e=t,Vn&&Vn in e))return!1;var e,n=function(t){if(!Bn(t))return!1;var e=zn(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?er:Kn;return n.test(function(t){if(null!=t){try{return Un.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function rr(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return nr(n)?n:void 0}var ir=rr(Object,"create");var ar=Object.prototype.hasOwnProperty;var or=Object.prototype.hasOwnProperty;function sr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ur(t,e){for(var n,r,i=t.length;i--;)if((n=t[i][0])===(r=e)||n!=n&&r!=r)return i;return-1}sr.prototype.clear=function(){this.__data__=ir?ir(null):{},this.size=0},sr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},sr.prototype.get=function(t){var e=this.__data__;if(ir){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ar.call(e,t)?e[t]:void 0},sr.prototype.has=function(t){var e=this.__data__;return ir?void 0!==e[t]:or.call(e,t)},sr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ir&&void 0===e?"__lodash_hash_undefined__":e,this};var lr=Array.prototype.splice;function hr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}hr.prototype.clear=function(){this.__data__=[],this.size=0},hr.prototype.delete=function(t){var e=this.__data__,n=ur(e,t);return!(n<0)&&(n==e.length-1?e.pop():lr.call(e,n,1),--this.size,!0)},hr.prototype.get=function(t){var e=this.__data__,n=ur(e,t);return n<0?void 0:e[n][1]},hr.prototype.has=function(t){return ur(this.__data__,t)>-1},hr.prototype.set=function(t,e){var n=this.__data__,r=ur(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var cr=rr(Nn,"Map");function fr(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function dr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dr.prototype.clear=function(){this.size=0,this.__data__={hash:new sr,map:new(cr||hr),string:new sr}},dr.prototype.delete=function(t){var e=fr(this,t).delete(t);return this.size-=e?1:0,e},dr.prototype.get=function(t){return fr(this,t).get(t)},dr.prototype.has=function(t){return fr(this,t).has(t)},dr.prototype.set=function(t,e){var n=fr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function pr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(pr.Cache||dr),n}pr.Cache=dr;var vr,gr,yr,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_r=/\\(\\)?/g,wr=(vr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mr,(function(t,n,r,i){e.push(r?i.replace(_r,"$1"):n||t)})),e},gr=pr(vr,(function(t){return 500===yr.size&&yr.clear(),t})),yr=gr.cache,gr),br=wr;var xr=Rn?Rn.prototype:void 0,kr=xr?xr.toString:void 0;function Ar(t){if("string"==typeof t)return t;if(Pn(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Ar)+"";if(Hn(t))return kr?kr.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function $r(t,e){return Pn(t)?t:function(t,e){if(Pn(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Hn(t))||Wn.test(t)||!In.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:br(function(t){return null==t?"":Ar(t)}(t))}var Sr,jr,Er,Or;function Pr(t){if("string"==typeof t||Hn(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Mr(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=$r(e,t)).length;null!=t&&n<r;)t=t[Pr(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}class Fr extends i{constructor({expanded:t,padding:e,...n}){super(n),Sr.add(this),jr.set(this,new Map),Er.set(this,new Map),this.maxYPos=0,this.expanded=!1,this.padding=1,this.expanded=t,this.padding=e}init(t,e){var n;let r=0;if(s(this,jr,new Map,"f"),s(this,Er,new Map,"f"),this.maxYPos=0,!t)return;const i={};for(let a=0;a<t.length;a++){const s=t[a],u=(null===(n=null==s?void 0:s.residues)||void 0===n?void 0:n.length)||(null==e?void 0:e.length);o(this,jr,"f").set(s.accession,u&&!this.expanded?16:14),o(this,Er,"f").set(s.accession,this.padding),r=(o(this,jr,"f").get(s.accession)||0)+2*this.padding,this.maxYPos=Math.max(this.maxYPos,r),s.accession in i||(i[s.accession]={}),s.residues&&(r=o(this,Sr,"m",Or).call(this,s.residues,s.accession,this.expanded?r:o(this,Er,"f").get(s.accession)||0,a,3,s.locations,i,this.expanded))}if(e)for(let t=0;t<e.length;t++){const n=e[t];o(this,jr,"f").has(n.accession)||(o(this,jr,"f").set(n.accession,10),o(this,Er,"f").set(n.accession,(this.expanded?this.maxYPos:3)+this.padding),r+=this.expanded?2*this.padding+(o(this,jr,"f").get(n.accession)||14):0,this.maxYPos=Math.max(this.maxYPos,r)),n.accession in i||(i[n.accession]={}),n.residues&&(r=o(this,Sr,"m",Or).call(this,n.residues,n.accession,n.expanded?r:o(this,Er,"f").get(n.accession)||0,t,3,n.locations,i,this.expanded&&n.expanded))}this.maxYPos+=this.padding}static filterOutResidueFragmentsOutOfLocation(t,e){t.locations.forEach((t=>t.fragments=t.fragments.filter((t=>e.some((e=>e.fragments.some((e=>t.start>=e.start&&t.end<=e.end)))))))),t.locations=t.locations.filter((t=>t.fragments.length))}static getAccFromFeature(t){let e="";return"string"==typeof t?e=t:t.accession&&(e=t.accession),e}getFeatureYPos(t){const e=Fr.getAccFromFeature(t);return o(this,Er,"f").get(e)||0}getFeatureHeight(t){const e=Fr.getAccFromFeature(t);return o(this,jr,"f").get(e)||0}}jr=new WeakMap,Er=new WeakMap,Sr=new WeakSet,Or=function(t,e,n,r,i,a,s={},u=!0){for(let l=0;l<t.length;l++){const h=t[l];Fr.filterOutResidueFragmentsOutOfLocation(h,a||[]),h.accession in s[e]||(s[e][h.accession]={});for(let t=0;t<h.locations.length;t++){const a=h.locations[t].description;a in s[e][h.accession]||(s[e][h.accession][a]={height:u?10:(o(this,jr,"f").get(e)||14)-2*i,yPos:u?this.maxYPos+this.padding:n+i},n=u?this.maxYPos+2*this.padding+10:n),o(this,jr,"f").set(`${h.accession}_${r}_${l}_${t}`,s[e][h.accession][a].height),o(this,Er,"f").set(`${h.accession}_${r}_${l}_${t}`,s[e][h.accession][a].yPos),this.maxYPos=Math.max(this.maxYPos,n)}}return u?n:this.maxYPos+2*this.padding};const Nr=(t,e)=>{let n={value:1,...t};const r=[];for(const t of e)n?n.end<t.start?(r.push(n),n=null,r.push(t)):n.start<t.start&&n.end>=t.end?(r.push({start:n.start,end:t.start-1,value:n.value}),r.push({start:t.start,end:t.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),n=t.end===n.end?null:{start:t.end+1,end:n.end,value:n.value}):t.start<n.start&&t.end>n.end?(r.push({start:t.start,end:n.start-1,value:t.value}),r.push({start:n.start,end:n.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),r.push({start:n.end+1,end:t.end,value:t.value}),n=null):t.end>=n.start&&t.end<=n.end?(t.start<n.start&&r.push({start:t.start,end:n.start-1,value:t.value}),r.push({start:n.start,end:t.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),n=t.end<n.end?{start:t.end+1,end:n.end,value:n.value}:null):n.end>=t.start&&n.end<t.end?(r.push({start:n.start,end:t.start-1,value:n.value}),r.push({start:t.start,end:n.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),r.push({start:n.end+1,end:t.end,value:t.value}),n=null):r.push(t):r.push(t);return n&&r.push(n),r},Rr=t=>t.selectAll("g.residues-group").data((t=>{var e;return(null===(e=t.residues)||void 0===e?void 0:e.map(((e,n)=>({...e,feature:t,i:n}))))||[]})).enter().append("g").attr("class","residues-group").selectAll("g.residues-locations").data((t=>t.locations.map(((e,n)=>({...e,accession:t.accession,feature:t.feature,location:e,i:t.i,j:n}))))).enter().append("g").attr("class","residues-locations"),Cr=({baseG:e,getResidueShape:n,getResidueTransform:r,getResidueFill:i,element:a})=>e.selectAll("path.residue").data((t=>t.fragments.map((e=>({...e,accession:t.accession,feature:{...t.feature,currentResidue:{...e,description:t.location.description}},location:t.location,k:t.feature.k,i:t.i,j:t.j}))))).enter().append("path").attr("class","feature rectangle residue").attr("d",n).attr("transform",r).attr("fill",i).attr("stroke","transparent").call(t,a),Tr=({baseG:t,expanded:e,getResidueShape:n,getResidueTransform:r,getResidueFill:i})=>{const a=t.selectAll("path.residue"),o=new Set(a.data().map((t=>{var e,n;return`${null===(e=t.feature)||void 0===e?void 0:e.accession}-${null===(n=t.location)||void 0===n?void 0:n.description}`}))).size;a.attr("d",n).attr("transform",r).style("pointer-events",(t=>e||t.feature&&t.feature.expanded?"auto":"none")).style("stroke",(()=>e?null:"none")).style("opacity",(()=>e?null:.8/o)).attr("fill",i)};var Yr,qr,Lr,Xr,zr,Hr,Ir,Wr;let Br=Wr=class extends r{constructor(){super(),this.expanded=!1,this["show-label"]=!1,this.label=null,this.layout=void 0,Yr.set(this,void 0),qr.set(this,void 0),Lr.set(this,!1),Xr.set(this,void 0),zr.set(this,void 0),Hr.set(this,void 0),Ir.set(this,void 0),this["margin-top"]=2,this["margin-bottom"]=2}createTrack(){this.layoutObj&&(this.layoutObj.expanded=this.expanded,s(this,Xr,void 0,"f"),super.createTrack())}connectedCallback(){super.connectedCallback(),s(this,Lr,!1,"f")}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),"expanded"===t&&e!==n&&o(this,Yr,"f"))for(const t of o(this,Yr,"f"))t.expanded=!e}set contributors(t){s(this,Yr,Wr.normalizeLocations(t),"f"),s(this,qr,((t,e=100,n=!0)=>{let r=[];return n&&(r=Nr({start:1,end:e,value:0},r)),t.forEach((t=>{var e;return null===(e=t.locations)||void 0===e?void 0:e.forEach((t=>t.fragments.forEach((t=>{r=Nr(t,r)}))))})),r})(o(this,Yr,"f"),this.length),"f"),this.data&&this.createTrack()}getLayout(){return new Fr({layoutHeight:this.height,expanded:this.expanded,padding:(this["margin-top"]+this["margin-bottom"])/2})}createFeatures(){var e,n,r,i,a,u;if(!this.seqG)return;null===(e=this.layoutObj)||void 0===e||e.init(this.data,o(this,Yr,"f")),this.data.forEach(((t,e)=>t.k=e)),s(this,zr,this.seqG.selectAll("g.feature-group").data(this.data).enter().append("g").attr("class","feature-group").attr("id",(t=>`g_${t.accession}`)),"f");const l=o(this,zr,"f").selectAll("g.location-group").data((t=>{var e;return(null===(e=t.locations)||void 0===e?void 0:e.map((e=>({...e,feature:t}))))||[]})).enter().append("g").attr("class","location-group").style("cursor",o(this,Yr,"f")?"pointer":"default");if(l.selectAll("line.cover").data((t=>[t.fragments.reduce(((e,n)=>({start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature})),{start:1/0,end:-1/0})])).enter().append("line").attr("class","cover"),l.selectAll("path.feature").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("path").attr("class",(t=>`${this.getShape(t)} feature`)).on("click.expanded",(()=>{this.expanded?this.removeAttribute("expanded"):this.setAttribute("expanded","expanded")})).call(t,this),l.selectAll("text.feature-label").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("text").attr("class","feature-label").attr("dominant-baseline","middle").attr("text-anchor","middle").style("cursor","inherit").style("pointer-events","none"),s(this,Hr,Rr(o(this,zr,"f")),"f"),Cr({baseG:o(this,Hr,"f"),getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>this.getResidueFill(t,this.expanded),element:this}),o(this,Yr,"f")){o(this,Yr,"f").forEach(((t,e)=>t.k=e)),o(this,Xr,"f")||s(this,Xr,null===(n=this.svg)||void 0===n?void 0:n.append("g").attr("class","children-features"),"f");const e=null===(r=o(this,Xr,"f"))||void 0===r?void 0:r.append("g").attr("class","children-group"),a=null==e?void 0:e.selectAll("g.child-group").data(o(this,Yr,"f")).enter().append("g").attr("class","child-group");if(!a)return;const u=a.selectAll("g.child-location-group").data((t=>(t.expanded=this.expanded,(t.locations||[]).map((e=>({...e,feature:t})))))).enter().append("g").attr("class",((t,e)=>`child-location-group clg-${e}`));null==u||u.selectAll("line.cover").data((t=>[t.fragments.reduce(((e,n)=>({start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature})),{start:1/0,end:-1/0})])).enter().append("line").attr("class","cover"),null==u||u.selectAll("path.child-fragment").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("path").attr("class",(t=>`${this.getShape(t)} child-fragment feature`)).call(t,this).on("click.expanded",((t,e)=>{e.feature.expanded=!e.feature.expanded,this.refresh()})),u.selectAll("text.child-label").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("text").attr("class","child-label").attr("dominant-baseline","middle").attr("text-anchor","middle").style("cursor","default").style("pointer-events","none"),s(this,Ir,Rr(a),"f"),Cr({baseG:o(this,Ir,"f"),getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>{var e;return this.getResidueFill(t,null===(e=t.feature)||void 0===e?void 0:e.expanded)},element:this}),(null===(i=o(this,qr,"f"))||void 0===i?void 0:i.length)&&(({element:t,coverage:e})=>{var n,r,i;t.accession=(null===(r=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[0])||void 0===r?void 0:r.accession)||"_";const a=null===(i=t.svg)||void 0===i?void 0:i.append("defs").append("mask").attr("id",`mask-${t.accession}`);null==a||a.selectAll("rect").data(e).enter().append("rect").attr("y",0).attr("height",t.height)})({element:this,coverage:o(this,qr,"f")})}null===(a=this.svg)||void 0===a||a.attr("height",(null===(u=this.layoutObj)||void 0===u?void 0:u.maxYPos)||0),s(this,Lr,!0,"f")}getResidueShape(t){var e;return this.featureShape.getFeatureShape(this.getSingleBaseWidth(),(null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(`${t.accession}_${t.k}_${t.i}_${t.j}`))||0,t.end&&t.start?t.end-t.start+1:1,"rectangle")}getResidueTransform(t){var e;return`translate(${this.getXFromSeqPosition(t.start||1)},${this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(`${t.accession}_${t.k}_${t.i}_${t.j}`))||0)})`}getResidueFill(t,e){return e?this.getFeatureColor(t):"white"}getTextLabel(t){var e,n;return(null===(e=this.label)||void 0===e?void 0:e.length)?this.label.startsWith(".")?Mr(t,this.label.slice(1),null):this.label:(null===(n=null==t?void 0:t.feature)||void 0===n?void 0:n.accession)||null}refreshLabels(t,r=2){t.attr("x",(t=>{const e=Gr(this["display-start"],t.start),n=Dr(this["display-end"],t.end,this.length);return this.getXFromSeqPosition(e+(n-e)/2||1)})).attr("y",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("fill",((t,r,i)=>{var a;const o=null===(a=i[r].parentElement)||void 0===a?void 0:a.querySelector("path.feature");return o?e(n(o,"fill")):null})).attr("font-size",(t=>{var e;return((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(t.feature))||2)-r})).text((t=>this["show-label"]?this.getTextLabel(t):null)).each(function(t,e,n,r,i){function a(a){var o,s,u;const l=function(t){return"string"==typeof t?new Ot([[document.querySelector(t)]],[document.documentElement]):new Ot([[t]],Et)}(this),h=Gr(t,a.start),c=Dr(e,a.end,n),f=r(c)-r(h),d=i(a.feature)/2;let p=(null===(s=null===(o=l.node())||void 0===o?void 0:o.getComputedTextLength)||void 0===s?void 0:s.call(o))||0,v=l.text();for(;p>f-2*d&&v.length>0;)v=v.slice(0,-1),l.text(v.length?v+"…":""),p=(null===(u=l.node())||void 0===u?void 0:u.getComputedTextLength())||0}return a}(this["display-start"],this["display-end"],this.length,(t=>this.getXFromSeqPosition(t)),(t=>{var e;return(null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(t))||0})))}refreshFeatures(t,e=!0){const n=new Set(t.data().map((t=>{var e;return null===(e=t.feature)||void 0===e?void 0:e.accession}))).size;t.attr("d",(t=>{var n;return this.featureShape.getFeatureShape(this.getSingleBaseWidth(),(null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature||""))||0,t.end&&t.start?t.end-t.start+1:1,e?this.getShape(t.shape?t:t.feature):"rectangle")})).attr("fill",(t=>e?this.getFeatureColor(t.feature):"white")).attr("opacity",e?1:.8/n).style("stroke",(t=>e?this.getFeatureColor(t.feature):"none")).attr("transform",(t=>{var e;return`translate(${this.getXFromSeqPosition(t.start||1)},${this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)})`})).style("pointer-events",e?"auto":"none")}refreshCoverLine(t,e=!0){t.attr("x1",(t=>this.getXFromSeqPosition(t.start||1))).attr("x2",(t=>this.getXFromSeqPosition((t.end||0)+1))).attr("y1",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("y2",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("stroke",(t=>this.getFeatureColor(t.feature))).attr("visibility",e?"visible":"hidden")}refresh(){var t,e,n,r,i,a,s,u;if(o(this,Lr,"f")&&this.layoutObj){if(this.layoutObj.expanded=this.expanded,this.layoutObj.init(this.data,o(this,Yr,"f")),this.height=this.layoutObj.maxYPos,this.refreshCoverLine(null===(t=o(this,zr,"f"))||void 0===t?void 0:t.selectAll("g.location-group line.cover")),this.refreshFeatures(null===(e=o(this,zr,"f"))||void 0===e?void 0:e.selectAll("g.location-group path.feature")),this.refreshLabels(null===(n=o(this,zr,"f"))||void 0===n?void 0:n.selectAll("g.location-group text.feature-label")),o(this,Hr,"f")&&Tr({baseG:o(this,Hr,"f"),expanded:this.expanded,getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>this.getResidueFill(t,this.expanded)}),o(this,Yr,"f")){const t=null===(r=o(this,Xr,"f"))||void 0===r?void 0:r.select("g.children-group");null==t||t.attr("visibility",this.expanded?"visible":"hidden");const e=null==t?void 0:t.selectAll("g.child-group"),n=null==e?void 0:e.selectAll("g.child-location-group"),u=null==n?void 0:n.selectAll("line.cover"),l=null==n?void 0:n.selectAll("path.child-fragment");this.refreshCoverLine(u,this.expanded),this.refreshFeatures(l,this.expanded),this.refreshLabels(null==e?void 0:e.selectAll("g.child-location-group text.child-label"),0),null===(i=o(this,Ir,"f"))||void 0===i||i.attr("visibility",(()=>this.expanded?"visible":"hidden")),o(this,Ir,"f")&&Tr({baseG:o(this,Ir,"f"),expanded:this.expanded,getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>{var e;return this.getResidueFill(t,null===(e=t.feature)||void 0===e?void 0:e.expanded)}}),(null===(a=o(this,qr,"f"))||void 0===a?void 0:a.length)&&(({element:t,featuresG:e,contributorsLength:n})=>{var r;null==e||e.attr("mask",t.expanded?null:`url(#mask-${t.accession})`),null===(r=t.svg)||void 0===r||r.selectAll("defs mask rect").attr("x",(e=>t.getXFromSeqPosition(e.start))).attr("width",(e=>t.getSingleBaseWidth()*(e.end-e.start+1))).attr("fill","white").attr("opacity",(t=>((t.value||0)/(n||1)+.3)/1.3))})({element:this,featuresG:o(this,zr,"f"),contributorsLength:null===(s=o(this,Yr,"f"))||void 0===s?void 0:s.length})}null===(u=this.svg)||void 0===u||u.attr("height",this.layoutObj.maxYPos),this.updateHighlight(),this.renderMarginOnGroup(this.margins)}}};function Gr(t,e){const n=t&&t>0?t:0;return Math.max(e||0,n)}function Dr(t,e,n){const r=t&&t>0?t:n||0;return Math.min(e||0,r)}Yr=new WeakMap,qr=new WeakMap,Lr=new WeakMap,Xr=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Ir=new WeakMap,a([l({type:Boolean})],Br.prototype,"expanded",void 0),a([l({type:Boolean})],Br.prototype,"show-label",void 0),a([l({type:String})],Br.prototype,"label",void 0),Br=Wr=a([(t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:r}=e;return{kind:n,elements:r,finisher(e){customElements.define(t,e)}}})(t,e))("nightingale-interpro-track")],Br);var Vr=Br;export{Vr as default};
*/}var h;null===(h=window.HTMLSlotElement)||void 0===h||h.prototype.assignedElements;var c={value:()=>{}};function f(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new d(r)}function d(t){this._=t}function p(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function g(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function v(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=c,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}d.prototype=f.prototype={constructor:d,on:function(t,e){var n,r=this._,i=p(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=v(r[n],t.name,e);else if(null==e)for(n in r)r[n]=v(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=g(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new d(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var y="http://www.w3.org/1999/xhtml",m={svg:"http://www.w3.org/2000/svg",xhtml:y,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),m.hasOwnProperty(e)?{space:m[e],local:t}:t}function w(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===y&&e.documentElement.namespaceURI===y?e.createElement(t):e.createElementNS(n,t)}}function b(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function x(t){var e=_(t);return(e.local?b:w)(e)}function k(){}function A(t){return null==t?k:function(){return this.querySelector(t)}}function $(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function S(){return[]}function j(t){return null==t?S:function(){return this.querySelectorAll(t)}}function E(t){return function(){return this.matches(t)}}function O(t){return function(e){return e.matches(t)}}var P=Array.prototype.find;function M(){return this.firstElementChild}var F=Array.prototype.filter;function N(){return Array.from(this.children)}function R(t){return new Array(t.length)}function C(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function T(t){return function(){return t}}function Y(t,e,n,r,i,a){for(var o,s=0,u=e.length,l=a.length;s<l;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new C(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function q(t,e,n,r,i,a,o){var s,u,l,h=new Map,c=e.length,f=a.length,d=new Array(c);for(s=0;s<c;++s)(u=e[s])&&(d[s]=l=o.call(u,u.__data__,s,e)+"",h.has(l)?i[s]=u:h.set(l,u));for(s=0;s<f;++s)l=o.call(t,a[s],s,a)+"",(u=h.get(l))?(r[s]=u,u.__data__=a[s],h.delete(l)):n[s]=new C(t,a[s]);for(s=0;s<c;++s)(u=e[s])&&h.get(d[s])===u&&(i[s]=u)}function L(t){return t.__data__}function X(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function z(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function H(t){return function(){this.removeAttribute(t)}}function I(t){return function(){this.removeAttributeNS(t.space,t.local)}}function W(t,e){return function(){this.setAttribute(t,e)}}function B(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function G(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function D(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function V(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function U(t){return function(){this.style.removeProperty(t)}}function K(t,e,n){return function(){this.style.setProperty(t,e,n)}}function J(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Q(t,e){return t.style.getPropertyValue(e)||V(t).getComputedStyle(t,null).getPropertyValue(e)}function Z(t){return function(){delete this[t]}}function tt(t,e){return function(){this[t]=e}}function et(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function nt(t){return t.trim().split(/^|\s+/)}function rt(t){return t.classList||new it(t)}function it(t){this._node=t,this._names=nt(t.getAttribute("class")||"")}function at(t,e){for(var n=rt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ot(t,e){for(var n=rt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function st(t){return function(){at(this,t)}}function ut(t){return function(){ot(this,t)}}function lt(t,e){return function(){(e.apply(this,arguments)?at:ot)(this,t)}}function ht(){this.textContent=""}function ct(t){return function(){this.textContent=t}}function ft(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function dt(){this.innerHTML=""}function pt(t){return function(){this.innerHTML=t}}function gt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function vt(){this.nextSibling&&this.parentNode.appendChild(this)}function yt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function mt(){return null}function _t(){var t=this.parentNode;t&&t.removeChild(this)}function wt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function bt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function xt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function kt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function At(t,e,n){return function(){var r,i=this.__on,a=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var o=0,s=i.length;o<s;++o)if((r=i[o]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=a,r.options=n),void(r.value=e);this.addEventListener(t.type,a,n),r={type:t.type,name:t.name,value:e,listener:a,options:n},i?i.push(r):this.__on=[r]}}function $t(t,e,n){var r=V(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function St(t,e){return function(){return $t(this,t,e)}}function jt(t,e){return function(){return $t(this,t,e.apply(this,arguments))}}C.prototype={constructor:C,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},it.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Et=[null];function Ot(t,e){this._groups=t,this._parents=e}function Pt(){return new Ot([[document.documentElement]],Et)}function Mt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ft(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Nt(){}Ot.prototype=Pt.prototype={constructor:Ot,select:function(t){"function"!=typeof t&&(t=A(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,l=r[i]=new Array(u),h=0;h<u;++h)(a=s[h])&&(o=t.call(a,a.__data__,h,s))&&("__data__"in a&&(o.__data__=a.__data__),l[h]=o);return new Ot(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return $(t.apply(this,arguments))}}(t):j(t);for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,l=0;l<u;++l)(o=s[l])&&(r.push(t.call(o,o.__data__,l,s)),i.push(o));return new Ot(r,i)},selectChild:function(t){return this.select(null==t?M:function(t){return function(){return P.call(this.children,t)}}("function"==typeof t?t:O(t)))},selectChildren:function(t){return this.selectAll(null==t?N:function(t){return function(){return F.call(this.children,t)}}("function"==typeof t?t:O(t)))},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new Ot(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,L);var n=e?q:Y,r=this._parents,i=this._groups;"function"!=typeof t&&(t=T(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),l=0;l<a;++l){var h=r[l],c=i[l],f=c.length,d=X(t.call(h,h&&h.__data__,l,r)),p=d.length,g=s[l]=new Array(p),v=o[l]=new Array(p),y=u[l]=new Array(f);n(h,c,g,v,y,d,e);for(var m,_,w=0,b=0;w<p;++w)if(m=g[w]){for(w>=b&&(b=w+1);!(_=v[b])&&++b<p;);m._next=_||null}}return(o=new Ot(o,r))._enter=s,o._exit=u,o},enter:function(){return new Ot(this._enter||this._groups.map(R),this._parents)},exit:function(){return new Ot(this._exit||this._groups.map(R),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),u=0;u<o;++u)for(var l,h=n[u],c=r[u],f=h.length,d=s[u]=new Array(f),p=0;p<f;++p)(l=h[p]||c[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new Ot(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=z);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,l=i[a]=new Array(u),h=0;h<u;++h)(o=s[h])&&(l[h]=o);l.sort(e)}return new Ot(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?I:H:"function"==typeof e?n.local?D:G:n.local?B:W)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?U:"function"==typeof e?J:K)(t,e,n??"")):Q(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Z:"function"==typeof e?et:tt)(t,e)):this.node()[t]},classed:function(t,e){var n=nt(t+"");if(arguments.length<2){for(var r=rt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?lt:e?st:ut)(n,e))},text:function(t){return arguments.length?this.each(null==t?ht:("function"==typeof t?ft:ct)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?dt:("function"==typeof t?gt:pt)(t)):this.node().innerHTML},raise:function(){return this.each(vt)},lower:function(){return this.each(yt)},append:function(t){var e="function"==typeof t?t:x(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:x(t),r=null==e?mt:"function"==typeof e?e:A(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(_t)},clone:function(t){return this.select(t?bt:wt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=xt(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?At:kt,r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,h=s.length;l<h;++l)for(r=0,u=s[l];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?jt:St)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],a=0,o=i.length;a<o;++a)(r=i[a])&&(yield r)}};var Rt=1/.7,Ct="\\s*([+-]?\\d+)\\s*",Tt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",qt=/^#([0-9a-f]{3,8})$/,Lt=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),Xt=new RegExp(`^rgb\\(${Yt},${Yt},${Yt}\\)$`),zt=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${Tt}\\)$`),Ht=new RegExp(`^rgba\\(${Yt},${Yt},${Yt},${Tt}\\)$`),It=new RegExp(`^hsl\\(${Tt},${Yt},${Yt}\\)$`),Wt=new RegExp(`^hsla\\(${Tt},${Yt},${Yt},${Tt}\\)$`),Bt={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function Gt(){return this.rgb().formatHex()}function Dt(){return this.rgb().formatRgb()}function Vt(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=qt.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Ut(e):3===n?new Zt(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Kt(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Kt(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Lt.exec(t))?new Zt(e[1],e[2],e[3],1):(e=Xt.exec(t))?new Zt(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=zt.exec(t))?Kt(e[1],e[2],e[3],e[4]):(e=Ht.exec(t))?Kt(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=It.exec(t))?ae(e[1],e[2]/100,e[3]/100,1):(e=Wt.exec(t))?ae(e[1],e[2]/100,e[3]/100,e[4]):Bt.hasOwnProperty(t)?Ut(Bt[t]):"transparent"===t?new Zt(NaN,NaN,NaN,0):null}function Ut(t){return new Zt(t>>16&255,t>>8&255,255&t,1)}function Kt(t,e,n,r){return r<=0&&(t=e=n=NaN),new Zt(t,e,n,r)}function Jt(t){return t instanceof Nt||(t=Vt(t)),t?new Zt((t=t.rgb()).r,t.g,t.b,t.opacity):new Zt}function Qt(t,e,n,r){return 1===arguments.length?Jt(t):new Zt(t,e,n,r??1)}function Zt(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function te(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}`}function ee(){const t=ne(this.opacity);return`${1===t?"rgb(":"rgba("}${re(this.r)}, ${re(this.g)}, ${re(this.b)}${1===t?")":`, ${t})`}`}function ne(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function re(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ie(t){return((t=re(t))<16?"0":"")+t.toString(16)}function ae(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new se(t,e,n,r)}function oe(t){if(t instanceof se)return new se(t.h,t.s,t.l,t.opacity);if(t instanceof Nt||(t=Vt(t)),!t)return new se;if(t instanceof se)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new se(o,s,u,t.opacity)}function se(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ue(t){return(t=(t||0)%360)<0?t+360:t}function le(t){return Math.max(0,Math.min(1,t||0))}function he(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Mt(Nt,Vt,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Gt,formatHex:Gt,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oe(this).formatHsl()},formatRgb:Dt,toString:Dt}),Mt(Zt,Qt,Ft(Nt,{brighter(t){return t=null==t?Rt:Math.pow(Rt,t),new Zt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Zt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Zt(re(this.r),re(this.g),re(this.b),ne(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:te,formatHex:te,formatHex8:function(){return`#${ie(this.r)}${ie(this.g)}${ie(this.b)}${ie(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:ee,toString:ee})),Mt(se,(function(t,e,n,r){return 1===arguments.length?oe(t):new se(t,e,n,r??1)}),Ft(Nt,{brighter(t){return t=null==t?Rt:Math.pow(Rt,t),new se(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new se(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Zt(he(t>=240?t-240:t+120,i,r),he(t,i,r),he(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new se(ue(this.h),le(this.s),le(this.l),ne(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=ne(this.opacity);return`${1===t?"hsl(":"hsla("}${ue(this.h)}, ${100*le(this.s)}%, ${100*le(this.l)}%${1===t?")":`, ${t})`}`}}));var ce=t=>()=>t;function fe(t){return 1==(t=+t)?de:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):ce(isNaN(e)?n:e)}}function de(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):ce(isNaN(t)?e:t)}var pe=function t(e){var n=fe(e);function r(t,e){var r=n((t=Qt(t)).r,(e=Qt(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=de(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ge(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ve=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ye=new RegExp(ve.source,"g");function me(t,e){var n,r,i,a=ve.lastIndex=ye.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=ve.exec(t))&&(r=ye.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:ge(n,r)})),a=ye.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}var _e,we=180/Math.PI,be={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function xe(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*we,skewX:Math.atan(u)*we,scaleX:o,scaleY:s}}function ke(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:ge(t,i)},{i:u-2,x:ge(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ge(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ge(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ge(t,n)},{i:s-2,x:ge(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var Ae,$e,Se=ke((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?be:xe(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),je=ke((function(t){return null==t?be:(_e||(_e=document.createElementNS("http://www.w3.org/2000/svg","g")),_e.setAttribute("transform",t),(t=_e.transform.baseVal.consolidate())?xe((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):be)}),", ",")",")"),Ee=0,Oe=0,Pe=0,Me=0,Fe=0,Ne=0,Re="object"==typeof performance&&performance.now?performance:Date,Ce="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Te(){return Fe||(Ce(Ye),Fe=Re.now()+Ne)}function Ye(){Fe=0}function qe(){this._call=this._time=this._next=null}function Le(t,e,n){var r=new qe;return r.restart(t,e,n),r}function Xe(){Fe=(Me=Re.now())+Ne,Ee=Oe=0;try{!function(){Te(),++Ee;for(var t,e=Ae;e;)(t=Fe-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ee}()}finally{Ee=0,function(){var t,e,n=Ae,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Ae=e);$e=t,He(r)}(),Fe=0}}function ze(){var t=Re.now(),e=t-Me;e>1e3&&(Ne-=e,Me=t)}function He(t){Ee||(Oe&&(Oe=clearTimeout(Oe)),t-Fe>24?(t<1/0&&(Oe=setTimeout(Xe,t-Re.now()-Ne)),Pe&&(Pe=clearInterval(Pe))):(Pe||(Me=Re.now(),Pe=setInterval(ze,1e3)),Ee=1,Ce(Xe)))}function Ie(t,e,n){var r=new qe;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}qe.prototype=Le.prototype={constructor:qe,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Te():+n)+(null==e?0:+e),this._next||$e===this||($e?$e._next=this:Ae=this,$e=this),this._call=t,this._time=n,He()},stop:function(){this._call&&(this._call=null,this._time=1/0,He())}};var We=f("start","end","cancel","interrupt"),Be=[];function Ge(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}function o(a){var l,h,c,f;if(1!==n.state)return u();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Ie(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Ie((function(){3===n.state&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(c=n.tween.length),l=0,h=-1;l<c;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++h]=f);r.length=h+1}}function s(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Le(a,0,n.time)}(t,n,{name:e,index:r,group:i,on:We,tween:Be,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function De(t,e){var n=Ue(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Ve(t,e){var n=Ue(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Ue(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Ke(t,e){var n,r;return function(){var i=Ve(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Je(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Ve(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}a.tween=i}}function Qe(t,e,n){var r=t._id;return t.each((function(){var t=Ve(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Ue(t,r).value[e]}}function Ze(t,e){var n;return("number"==typeof e?ge:e instanceof Vt?pe:(n=Vt(e))?(e=n,pe):me)(t,e)}function tn(t){return function(){this.removeAttribute(t)}}function en(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function rn(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function an(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function on(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function sn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function un(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ln(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&un(t,i)),n}return i._value=e,i}function hn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sn(t,i)),n}return i._value=e,i}function cn(t,e){return function(){De(this,t).delay=+e.apply(this,arguments)}}function fn(t,e){return e=+e,function(){De(this,t).delay=e}}function dn(t,e){return function(){Ve(this,t).duration=+e.apply(this,arguments)}}function pn(t,e){return e=+e,function(){Ve(this,t).duration=e}}function gn(t,e){if("function"!=typeof e)throw new Error;return function(){Ve(this,t).ease=e}}function vn(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?De:Ve;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yn=Pt.prototype.constructor;function mn(t){return function(){this.style.removeProperty(t)}}function _n(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wn(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&_n(t,a,n)),r}return a._value=e,a}function bn(t){return function(e){this.textContent=t.call(this,e)}}function xn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&bn(r)),e}return r._value=t,r}var kn=0;function An(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function $n(){return++kn}var Sn=Pt.prototype;An.prototype={constructor:An,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=A(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,l=r[o],h=l.length,c=a[o]=new Array(h),f=0;f<h;++f)(s=l[f])&&(u=t.call(s,s.__data__,f,l))&&("__data__"in s&&(u.__data__=s.__data__),c[f]=u,Ge(c[f],e,n,f,c,Ue(s,n)));return new An(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=j(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,l=r[s],h=l.length,c=0;c<h;++c)if(u=l[c]){for(var f,d=t.call(u,u.__data__,c,l),p=Ue(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Ge(f,e,n,g,d,p);a.push(d),o.push(u)}return new An(a,o,e,n)},selectChild:Sn.selectChild,selectChildren:Sn.selectChildren,filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,u=r[i]=[],l=0;l<s;++l)(a=o[l])&&t.call(a,a.__data__,l,o)&&u.push(a);return new An(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,l=e[s],h=n[s],c=l.length,f=o[s]=new Array(c),d=0;d<c;++d)(u=l[d]||h[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new An(o,this._parents,this._name,this._id)},selection:function(){return new yn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=$n(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)if(o=s[l]){var h=Ue(o,e);Ge(o,t,n,l,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new An(r,this._parents,t,n)},call:Sn.call,nodes:Sn.nodes,node:Sn.node,size:Sn.size,empty:Sn.empty,each:Sn.each,on:function(t,e){var n=this._id;return arguments.length<2?Ue(this.node(),n).on.on(t):this.each(vn(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?je:Ze;return this.attrTween(t,"function"==typeof e?(n.local?on:an)(n,r,Qe(this,"attr."+t,e)):null==e?(n.local?en:tn)(n):(n.local?rn:nn)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?ln:hn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Se:Ze;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Q(this,t),o=(this.style.removeProperty(t),Q(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,mn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Q(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Q(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Qe(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Ve(this,t),l=u.on,h=null==u.value[o]?a||(a=mn(e)):void 0;l===n&&i===h||(r=(n=l).copy()).on(s,i=h),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Q(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,wn(t,e,n??""))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=e??""}}(Qe(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,xn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=Ue(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Ke:Je)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?cn:fn)(e,t)):Ue(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?dn:pn)(e,t)):Ue(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(gn(e,t)):Ue(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;Ve(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Ve(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&a()}))},[Symbol.iterator]:Sn[Symbol.iterator]};var jn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function En(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function On(t,e,n){this.k=t,this.x=e,this.y=n}Pt.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}(this,t)}))},Pt.prototype.transition=function(t){var e,n;t instanceof An?(e=t._id,t=t._name):(e=$n(),(n=jn).time=Te(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,l=0;l<u;++l)(o=s[l])&&Ge(o,t,e,l,s,n||En(o,e));return new An(r,this._parents,t,e)},On.prototype={constructor:On,scale:function(t){return 1===t?this:new On(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new On(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new On(1,0,0),On.prototype;var Pn=Array.isArray,Mn="object"==typeof global&&global&&global.Object===Object&&global,Fn="object"==typeof self&&self&&self.Object===Object&&self,Nn=Mn||Fn||Function("return this")(),Rn=Nn.Symbol,Cn=Object.prototype,Tn=Cn.hasOwnProperty,Yn=Cn.toString,qn=Rn?Rn.toStringTag:void 0;var Ln=Object.prototype.toString;var Xn=Rn?Rn.toStringTag:void 0;function zn(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Xn&&Xn in Object(t)?function(t){var e=Tn.call(t,qn),n=t[qn];try{t[qn]=void 0;var r=!0}catch(t){}var i=Yn.call(t);return r&&(e?t[qn]=n:delete t[qn]),i}(t):function(t){return Ln.call(t)}(t)}function Hn(t){return"symbol"==typeof t||function(t){return null!=t&&"object"==typeof t}(t)&&"[object Symbol]"==zn(t)}var In=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wn=/^\w*$/;function Bn(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Gn,Dn=Nn["__core-js_shared__"],Vn=(Gn=/[^.]+$/.exec(Dn&&Dn.keys&&Dn.keys.IE_PROTO||""))?"Symbol(src)_1."+Gn:"";var Un=Function.prototype.toString;var Kn=/^\[object .+?Constructor\]$/,Jn=Function.prototype,Qn=Object.prototype,Zn=Jn.toString,tr=Qn.hasOwnProperty,er=RegExp("^"+Zn.call(tr).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function nr(t){if(!Bn(t)||(e=t,Vn&&Vn in e))return!1;var e,n=function(t){if(!Bn(t))return!1;var e=zn(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}(t)?er:Kn;return n.test(function(t){if(null!=t){try{return Un.call(t)}catch(t){}try{return t+""}catch(t){}}return""}(t))}function rr(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return nr(n)?n:void 0}var ir=rr(Object,"create");var ar=Object.prototype.hasOwnProperty;var or=Object.prototype.hasOwnProperty;function sr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ur(t,e){for(var n,r,i=t.length;i--;)if((n=t[i][0])===(r=e)||n!=n&&r!=r)return i;return-1}sr.prototype.clear=function(){this.__data__=ir?ir(null):{},this.size=0},sr.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},sr.prototype.get=function(t){var e=this.__data__;if(ir){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ar.call(e,t)?e[t]:void 0},sr.prototype.has=function(t){var e=this.__data__;return ir?void 0!==e[t]:or.call(e,t)},sr.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ir&&void 0===e?"__lodash_hash_undefined__":e,this};var lr=Array.prototype.splice;function hr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}hr.prototype.clear=function(){this.__data__=[],this.size=0},hr.prototype.delete=function(t){var e=this.__data__,n=ur(e,t);return!(n<0)&&(n==e.length-1?e.pop():lr.call(e,n,1),--this.size,!0)},hr.prototype.get=function(t){var e=this.__data__,n=ur(e,t);return n<0?void 0:e[n][1]},hr.prototype.has=function(t){return ur(this.__data__,t)>-1},hr.prototype.set=function(t,e){var n=this.__data__,r=ur(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var cr=rr(Nn,"Map");function fr(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function dr(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}dr.prototype.clear=function(){this.size=0,this.__data__={hash:new sr,map:new(cr||hr),string:new sr}},dr.prototype.delete=function(t){var e=fr(this,t).delete(t);return this.size-=e?1:0,e},dr.prototype.get=function(t){return fr(this,t).get(t)},dr.prototype.has=function(t){return fr(this,t).has(t)},dr.prototype.set=function(t,e){var n=fr(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function pr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(pr.Cache||dr),n}pr.Cache=dr;var gr,vr,yr,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,_r=/\\(\\)?/g,wr=(gr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mr,(function(t,n,r,i){e.push(r?i.replace(_r,"$1"):n||t)})),e},vr=pr(gr,(function(t){return 500===yr.size&&yr.clear(),t})),yr=vr.cache,vr),br=wr;var xr=Rn?Rn.prototype:void 0,kr=xr?xr.toString:void 0;function Ar(t){if("string"==typeof t)return t;if(Pn(t))return function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}(t,Ar)+"";if(Hn(t))return kr?kr.call(t):"";var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function $r(t,e){return Pn(t)?t:function(t,e){if(Pn(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Hn(t))||Wn.test(t)||!In.test(t)||null!=e&&t in Object(e)}(t,e)?[t]:br(function(t){return null==t?"":Ar(t)}(t))}var Sr,jr,Er,Or;function Pr(t){if("string"==typeof t||Hn(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e}function Mr(t,e,n){var r=null==t?void 0:function(t,e){for(var n=0,r=(e=$r(e,t)).length;null!=t&&n<r;)t=t[Pr(e[n++])];return n&&n==r?t:void 0}(t,e);return void 0===r?n:r}class Fr extends i{constructor({expanded:t,padding:e,...n}){super(n),Sr.add(this),jr.set(this,new Map),Er.set(this,new Map),this.maxYPos=0,this.expanded=!1,this.padding=1,this.expanded=t,this.padding=e}init(t,e){var n;let r=0;if(s(this,jr,new Map,"f"),s(this,Er,new Map,"f"),this.maxYPos=0,!t)return;const i={};for(let a=0;a<t.length;a++){const s=t[a],u=(null===(n=null==s?void 0:s.residues)||void 0===n?void 0:n.length)||(null==e?void 0:e.length);o(this,jr,"f").set(s.accession,u&&!this.expanded?16:14),o(this,Er,"f").set(s.accession,this.padding),r=(o(this,jr,"f").get(s.accession)||0)+2*this.padding,this.maxYPos=Math.max(this.maxYPos,r),s.accession in i||(i[s.accession]={}),s.residues&&(r=o(this,Sr,"m",Or).call(this,s.residues,s.accession,this.expanded?r:o(this,Er,"f").get(s.accession)||0,a,3,s.locations,i,this.expanded))}if(e)for(let t=0;t<e.length;t++){const n=e[t];o(this,jr,"f").has(n.accession)||(o(this,jr,"f").set(n.accession,10),o(this,Er,"f").set(n.accession,(this.expanded?this.maxYPos:3)+this.padding),r+=this.expanded?2*this.padding+(o(this,jr,"f").get(n.accession)||14):0,this.maxYPos=Math.max(this.maxYPos,r)),n.accession in i||(i[n.accession]={}),n.residues&&(r=o(this,Sr,"m",Or).call(this,n.residues,n.accession,n.expanded?r:o(this,Er,"f").get(n.accession)||0,t,3,n.locations,i,this.expanded&&n.expanded))}this.maxYPos+=this.padding}static filterOutResidueFragmentsOutOfLocation(t,e){t.locations.forEach((t=>t.fragments=t.fragments.filter((t=>e.some((e=>e.fragments.some((e=>t.start>=e.start&&t.end<=e.end)))))))),t.locations=t.locations.filter((t=>t.fragments.length))}static getAccFromFeature(t){let e="";return"string"==typeof t?e=t:t.accession&&(e=t.accession),e}getFeatureYPos(t){const e=Fr.getAccFromFeature(t);return o(this,Er,"f").get(e)||0}getFeatureHeight(t){const e=Fr.getAccFromFeature(t);return o(this,jr,"f").get(e)||0}}jr=new WeakMap,Er=new WeakMap,Sr=new WeakSet,Or=function(t,e,n,r,i,a,s={},u=!0){for(let l=0;l<t.length;l++){const h=t[l];Fr.filterOutResidueFragmentsOutOfLocation(h,a||[]),h.accession in s[e]||(s[e][h.accession]={});for(let t=0;t<h.locations.length;t++){const a=h.locations[t].description;a in s[e][h.accession]||(s[e][h.accession][a]={height:u?10:(o(this,jr,"f").get(e)||14)-2*i,yPos:u?this.maxYPos+this.padding:n+i},n=u?this.maxYPos+2*this.padding+10:n),o(this,jr,"f").set(`${h.accession}_${r}_${l}_${t}`,s[e][h.accession][a].height),o(this,Er,"f").set(`${h.accession}_${r}_${l}_${t}`,s[e][h.accession][a].yPos),this.maxYPos=Math.max(this.maxYPos,n)}}return u?n:this.maxYPos+2*this.padding};const Nr=(t,e)=>{let n={value:1,...t};const r=[];for(const t of e)n?n.end<t.start?(r.push(n),n=null,r.push(t)):n.start<t.start&&n.end>=t.end?(r.push({start:n.start,end:t.start-1,value:n.value}),r.push({start:t.start,end:t.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),n=t.end===n.end?null:{start:t.end+1,end:n.end,value:n.value}):t.start<n.start&&t.end>n.end?(r.push({start:t.start,end:n.start-1,value:t.value}),r.push({start:n.start,end:n.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),r.push({start:n.end+1,end:t.end,value:t.value}),n=null):t.end>=n.start&&t.end<=n.end?(t.start<n.start&&r.push({start:t.start,end:n.start-1,value:t.value}),r.push({start:n.start,end:t.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),n=t.end<n.end?{start:t.end+1,end:n.end,value:n.value}:null):n.end>=t.start&&n.end<t.end?(r.push({start:n.start,end:t.start-1,value:n.value}),r.push({start:t.start,end:n.end,value:(t.value||0)+((null==n?void 0:n.value)||0)}),r.push({start:n.end+1,end:t.end,value:t.value}),n=null):r.push(t):r.push(t);return n&&r.push(n),r},Rr=t=>t.selectAll("g.residues-group").data((t=>{var e;return(null===(e=t.residues)||void 0===e?void 0:e.map(((e,n)=>({...e,feature:t,i:n}))))||[]})).enter().append("g").attr("class","residues-group").selectAll("g.residues-locations").data((t=>t.locations.map(((e,n)=>({...e,accession:t.accession,feature:t.feature,location:e,i:t.i,j:n}))))).enter().append("g").attr("class","residues-locations"),Cr=({baseG:e,getResidueShape:n,getResidueTransform:r,getResidueFill:i,element:a})=>e.selectAll("path.residue").data((t=>t.fragments.map((e=>({...e,accession:t.accession,feature:{...t.feature,currentResidue:{...e,description:t.location.description}},location:t.location,k:t.feature.k,i:t.i,j:t.j}))))).enter().append("path").attr("class","feature rectangle residue").attr("d",n).attr("transform",r).attr("fill",i).attr("stroke","transparent").call(t,a),Tr=({baseG:t,expanded:e,getResidueShape:n,getResidueTransform:r,getResidueFill:i})=>{const a=t.selectAll("path.residue"),o=new Set(a.data().map((t=>{var e,n;return`${null===(e=t.feature)||void 0===e?void 0:e.accession}-${null===(n=t.location)||void 0===n?void 0:n.description}`}))).size;a.attr("d",n).attr("transform",r).style("pointer-events",(t=>e||t.feature&&t.feature.expanded?"auto":"none")).style("stroke",(()=>e?null:"none")).style("opacity",(()=>e?null:.8/o)).attr("fill",i)};var Yr,qr,Lr,Xr,zr,Hr,Ir,Wr;let Br=Wr=class extends r{constructor(){super(),this.expanded=!1,this["show-label"]=!1,this.label=null,this.layout=void 0,Yr.set(this,void 0),qr.set(this,void 0),Lr.set(this,!1),Xr.set(this,void 0),zr.set(this,void 0),Hr.set(this,void 0),Ir.set(this,void 0),this["margin-top"]=2,this["margin-bottom"]=2}createTrack(){this.layoutObj&&(this.layoutObj.expanded=this.expanded,s(this,Xr,void 0,"f"),super.createTrack())}connectedCallback(){super.connectedCallback(),s(this,Lr,!1,"f")}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),"expanded"===t&&e!==n&&o(this,Yr,"f"))for(const t of o(this,Yr,"f"))t.expanded=!e}set contributors(t){s(this,Yr,Wr.normalizeLocations(t),"f"),s(this,qr,((t,e=100,n=!0)=>{let r=[];return n&&(r=Nr({start:1,end:e,value:0},r)),t.forEach((t=>{var e;return null===(e=t.locations)||void 0===e?void 0:e.forEach((t=>t.fragments.forEach((t=>{r=Nr(t,r)}))))})),r})(o(this,Yr,"f"),this.length),"f"),this.data&&this.createTrack()}getLayout(){return new Fr({layoutHeight:this.height,expanded:this.expanded,padding:(this["margin-top"]+this["margin-bottom"])/2})}createFeatures(){var e,n,r,i,a,u;if(!this.seqG)return;null===(e=this.layoutObj)||void 0===e||e.init(this.data,o(this,Yr,"f")),this.data.forEach(((t,e)=>t.k=e)),s(this,zr,this.seqG.selectAll("g.feature-group").data(this.data).enter().append("g").attr("class","feature-group").attr("id",(t=>`g_${t.accession}`)),"f");const l=o(this,zr,"f").selectAll("g.location-group").data((t=>{var e;return(null===(e=t.locations)||void 0===e?void 0:e.map((e=>({...e,feature:t}))))||[]})).enter().append("g").attr("class","location-group").style("cursor",o(this,Yr,"f")?"pointer":"default");if(l.selectAll("line.cover").data((t=>[t.fragments.reduce(((e,n)=>({start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature})),{start:1/0,end:-1/0})])).enter().append("line").attr("class","cover"),l.selectAll("path.feature").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("path").attr("class",(t=>`${this.getShape(t)} feature`)).on("click.expanded",(()=>{this.expanded?this.removeAttribute("expanded"):this.setAttribute("expanded","expanded")})).call(t,this),l.selectAll("text.feature-label").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("text").attr("class","feature-label").attr("dominant-baseline","middle").attr("text-anchor","middle").style("cursor","inherit").style("pointer-events","none"),s(this,Hr,Rr(o(this,zr,"f")),"f"),Cr({baseG:o(this,Hr,"f"),getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>this.getResidueFill(t,this.expanded),element:this}),o(this,Yr,"f")){o(this,Yr,"f").forEach(((t,e)=>t.k=e)),o(this,Xr,"f")||s(this,Xr,null===(n=this.svg)||void 0===n?void 0:n.append("g").attr("class","children-features"),"f");const e=null===(r=o(this,Xr,"f"))||void 0===r?void 0:r.append("g").attr("class","children-group"),a=null==e?void 0:e.selectAll("g.child-group").data(o(this,Yr,"f")).enter().append("g").attr("class","child-group");if(!a)return;const u=a.selectAll("g.child-location-group").data((t=>(t.expanded=this.expanded,(t.locations||[]).map((e=>({...e,feature:t})))))).enter().append("g").attr("class",((t,e)=>`child-location-group clg-${e}`));null==u||u.selectAll("line.cover").data((t=>[t.fragments.reduce(((e,n)=>({start:Math.min(e.start,n.start),end:Math.max(e.end,n.end),feature:t.feature})),{start:1/0,end:-1/0})])).enter().append("line").attr("class","cover"),null==u||u.selectAll("path.child-fragment").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("path").attr("class",(t=>`${this.getShape(t)} child-fragment feature`)).call(t,this).on("click.expanded",((t,e)=>{e.feature.expanded=!e.feature.expanded,this.refresh()})),u.selectAll("text.child-label").data((t=>t.fragments.map((e=>({...e,feature:t.feature,fragments:t.fragments}))))).enter().append("text").attr("class","child-label").attr("dominant-baseline","middle").attr("text-anchor","middle").style("cursor","default").style("pointer-events","none"),s(this,Ir,Rr(a),"f"),Cr({baseG:o(this,Ir,"f"),getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>{var e;return this.getResidueFill(t,null===(e=t.feature)||void 0===e?void 0:e.expanded)},element:this}),(null===(i=o(this,qr,"f"))||void 0===i?void 0:i.length)&&(({element:t,coverage:e})=>{var n,r,i;t.accession=(null===(r=null===(n=null==t?void 0:t.data)||void 0===n?void 0:n[0])||void 0===r?void 0:r.accession)||"_";const a=null===(i=t.svg)||void 0===i?void 0:i.append("defs").append("mask").attr("id",`mask-${t.accession}`);null==a||a.selectAll("rect").data(e).enter().append("rect").attr("y",0).attr("height",t.height)})({element:this,coverage:o(this,qr,"f")})}null===(a=this.svg)||void 0===a||a.attr("height",((null===(u=this.layoutObj)||void 0===u?void 0:u.maxYPos)||0)+this["margin-bottom"]),s(this,Lr,!0,"f")}getResidueShape(t){var e;return this.featureShape.getFeatureShape(this.getSingleBaseWidth(),(null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(`${t.accession}_${t.k}_${t.i}_${t.j}`))||0,t.end&&t.start?t.end-t.start+1:1,"rectangle")}getResidueTransform(t){var e;return`translate(${this.getXFromSeqPosition(t.start||1)},${this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(`${t.accession}_${t.k}_${t.i}_${t.j}`))||0)})`}getResidueFill(t,e){return e?this.getFeatureColor(t):"white"}getTextLabel(t){var e,n;return(null===(e=this.label)||void 0===e?void 0:e.length)?this.label.startsWith(".")?Mr(t,this.label.slice(1),null):this.label:(null===(n=null==t?void 0:t.feature)||void 0===n?void 0:n.accession)||null}refreshLabels(t,r=2){t.attr("x",(t=>{const e=Gr(this["display-start"],t.start),n=Dr(this["display-end"],t.end,this.length);return this.getXFromSeqPosition(e+(n-e)/2||1)})).attr("y",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("fill",((t,r,i)=>{var a;const o=null===(a=i[r].parentElement)||void 0===a?void 0:a.querySelector("path.feature");return o?e(n(o,"fill")):null})).attr("font-size",(t=>{var e;return((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(t.feature))||2)-r})).text((t=>this["show-label"]?this.getTextLabel(t):null)).each(function(t,e,n,r,i){function a(a){var o,s,u;const l=function(t){return"string"==typeof t?new Ot([[document.querySelector(t)]],[document.documentElement]):new Ot([[t]],Et)}(this),h=Gr(t,a.start),c=Dr(e,a.end,n),f=r(c)-r(h),d=i(a.feature)/2;let p=(null===(s=null===(o=l.node())||void 0===o?void 0:o.getComputedTextLength)||void 0===s?void 0:s.call(o))||0,g=l.text();for(;p>f-2*d&&g.length>0;)g=g.slice(0,-1),l.text(g.length?g+"…":""),p=(null===(u=l.node())||void 0===u?void 0:u.getComputedTextLength())||0}return a}(this["display-start"],this["display-end"],this.length,(t=>this.getXFromSeqPosition(t)),(t=>{var e;return(null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureHeight(t))||0})))}refreshFeatures(t,e=!0){const n=new Set(t.data().map((t=>{var e;return null===(e=t.feature)||void 0===e?void 0:e.accession}))).size;t.attr("d",(t=>{var n;return this.featureShape.getFeatureShape(this.getSingleBaseWidth(),(null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature||""))||0,t.end&&t.start?t.end-t.start+1:1,e?this.getShape(t.shape?t:t.feature):"rectangle")})).attr("fill",(t=>e?this.getFeatureColor(t.feature):"white")).attr("opacity",e?1:.8/n).style("stroke",(t=>e?this.getFeatureColor(t.feature):"none")).attr("transform",(t=>{var e;return`translate(${this.getXFromSeqPosition(t.start||1)},${this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)})`})).style("pointer-events",e?"auto":"none")}refreshCoverLine(t,e=!0){t.attr("x1",(t=>this.getXFromSeqPosition(t.start||1))).attr("x2",(t=>this.getXFromSeqPosition((t.end||0)+1))).attr("y1",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("y2",(t=>{var e,n;return this["margin-top"]+((null===(e=this.layoutObj)||void 0===e?void 0:e.getFeatureYPos(t.feature))||0)+((null===(n=this.layoutObj)||void 0===n?void 0:n.getFeatureHeight(t.feature))||0)/2})).attr("stroke",(t=>this.getFeatureColor(t.feature))).attr("visibility",e?"visible":"hidden")}refresh(){var t,e,n,r,i,a,s,u;if(o(this,Lr,"f")&&this.layoutObj){if(this.layoutObj.expanded=this.expanded,this.layoutObj.init(this.data,o(this,Yr,"f")),this.height=this.layoutObj.maxYPos,this.refreshCoverLine(null===(t=o(this,zr,"f"))||void 0===t?void 0:t.selectAll("g.location-group line.cover")),this.refreshFeatures(null===(e=o(this,zr,"f"))||void 0===e?void 0:e.selectAll("g.location-group path.feature")),this.refreshLabels(null===(n=o(this,zr,"f"))||void 0===n?void 0:n.selectAll("g.location-group text.feature-label")),o(this,Hr,"f")&&Tr({baseG:o(this,Hr,"f"),expanded:this.expanded,getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>this.getResidueFill(t,this.expanded)}),o(this,Yr,"f")){const t=null===(r=o(this,Xr,"f"))||void 0===r?void 0:r.select("g.children-group");null==t||t.attr("visibility",this.expanded?"visible":"hidden");const e=null==t?void 0:t.selectAll("g.child-group"),n=null==e?void 0:e.selectAll("g.child-location-group"),u=null==n?void 0:n.selectAll("line.cover"),l=null==n?void 0:n.selectAll("path.child-fragment");this.refreshCoverLine(u,this.expanded),this.refreshFeatures(l,this.expanded),this.refreshLabels(null==e?void 0:e.selectAll("g.child-location-group text.child-label"),0),null===(i=o(this,Ir,"f"))||void 0===i||i.attr("visibility",(()=>this.expanded?"visible":"hidden")),o(this,Ir,"f")&&Tr({baseG:o(this,Ir,"f"),expanded:this.expanded,getResidueShape:t=>this.getResidueShape(t),getResidueTransform:t=>this.getResidueTransform(t),getResidueFill:t=>{var e;return this.getResidueFill(t,null===(e=t.feature)||void 0===e?void 0:e.expanded)}}),(null===(a=o(this,qr,"f"))||void 0===a?void 0:a.length)&&(({element:t,featuresG:e,contributorsLength:n})=>{var r;null==e||e.attr("mask",t.expanded?null:`url(#mask-${t.accession})`),null===(r=t.svg)||void 0===r||r.selectAll("defs mask rect").attr("x",(e=>t.getXFromSeqPosition(e.start))).attr("width",(e=>t.getSingleBaseWidth()*(e.end-e.start+1))).attr("height",t.height).attr("fill","white").attr("opacity",(t=>((t.value||0)/(n||1)+.3)/1.3))})({element:this,featuresG:o(this,zr,"f"),contributorsLength:null===(s=o(this,Yr,"f"))||void 0===s?void 0:s.length})}null===(u=this.svg)||void 0===u||u.attr("height",this.layoutObj.maxYPos+this["margin-bottom"]),this.updateHighlight(),this.renderMarginOnGroup(this.margins)}}};function Gr(t,e){const n=t&&t>0?t:0;return Math.max(e||0,n)}function Dr(t,e,n){const r=t&&t>0?t:n||0;return Math.min(e||0,r)}Yr=new WeakMap,qr=new WeakMap,Lr=new WeakMap,Xr=new WeakMap,zr=new WeakMap,Hr=new WeakMap,Ir=new WeakMap,a([l({type:Boolean})],Br.prototype,"expanded",void 0),a([l({type:Boolean})],Br.prototype,"show-label",void 0),a([l({type:String})],Br.prototype,"label",void 0),Br=Wr=a([(t=>e=>"function"==typeof e?((t,e)=>(customElements.define(t,e),e))(t,e):((t,e)=>{const{kind:n,elements:r}=e;return{kind:n,elements:r,finisher(e){customElements.define(t,e)}}})(t,e))("nightingale-interpro-track")],Br);var Vr=Br;export{Vr as default};
//# sourceMappingURL=index.js.map
{
"name": "@nightingale-elements/nightingale-interpro-track",
"version": "4.0.22-alpha.0",
"version": "4.0.23-alpha.0",
"description": "Interpro extension of the track type.",

@@ -36,7 +36,7 @@ "files": [

"@nightingale-elements/nightingale-new-core": "^4.0.21-alpha.0",
"@nightingale-elements/nightingale-track": "^4.0.21-alpha.0",
"@nightingale-elements/nightingale-track": "^4.0.23-alpha.0",
"d3": "7.8.2",
"lodash-es": "^4.17.15"
},
"gitHead": "4735e8f43424806b7f2a9a06c8553c0d943915cb"
"gitHead": "89c5875546d474e580621db2e253e7acb22bb5e8"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc