// Version 1.36.2 react-force-graph - https://github.com/vasturiano/react-force-graph !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],n):n((t=t||self).ForceGraph={},t.React)}(this,(function(t,n){"use strict";var e="default"in n?n.default:n;function r(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function i(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);n(t[n]=e,t),{})};function u(t){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function s(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||l(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(t){return function(t){if(Array.isArray(t))return f(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||l(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function l(t,n){if(t){if("string"==typeof t)return f(t,n);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?f(t,n):void 0}}function f(t,n){(null==n||n>t.length)&&(n=t.length);for(var e=0,r=new Array(n);e=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),p.hasOwnProperty(n)?{space:p[n],local:t}:t}function y(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===h&&n.documentElement.namespaceURI===h?n.createElement(t):n.createElementNS(e,t)}}function g(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function v(t){var n=d(t);return(n.local?g:y)(n)}function m(){}function _(t){return null==t?m:function(){return this.querySelector(t)}}function b(){return[]}function x(t){return null==t?b:function(){return this.querySelectorAll(t)}}function w(t){return function(){return this.matches(t)}}function k(t){return new Array(t.length)}function z(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}z.prototype={constructor:z,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function A(t,n,e,r,i,o){for(var a,u=0,s=n.length,c=o.length;un?1:t>=n?0:NaN}function M(t){return function(){this.removeAttribute(t)}}function E(t){return function(){this.removeAttributeNS(t.space,t.local)}}function C(t,n){return function(){this.setAttribute(t,n)}}function T(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function j(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function N(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function P(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function R(t){return function(){this.style.removeProperty(t)}}function I(t,n,e){return function(){this.style.setProperty(t,n,e)}}function D(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function U(t,n){return t.style.getPropertyValue(n)||P(t).getComputedStyle(t,null).getPropertyValue(n)}function F(t){return function(){delete this[t]}}function L(t,n){return function(){this[t]=n}}function q(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function B(t){return t.trim().split(/^|\s+/)}function H(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=B(t.getAttribute("class")||"")}function $(t,n){for(var e=H(t),r=-1,i=n.length;++r=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var st={},ct=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(st={mouseenter:"mouseover",mouseleave:"mouseout"}));function lt(t,n,e){return t=ft(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function ft(t,n,e){return function(r){var i=ct;ct=r;try{t.call(this,this.__data__,n,e)}finally{ct=i}}}function ht(t){return t.trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return e>=0&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}}))}function pt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r=b&&(b=_+1);!(m=g[b])&&++b=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=S);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o1?this.each((null==n?R:"function"==typeof n?D:I)(t,n,null==e?"":e)):U(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?F:"function"==typeof n?q:L)(t,n)):this.node()[t]},classed:function(t,n){var e=B(t+"");if(arguments.length<2){for(var r=H(this.node()),i=-1,o=e.length;++i=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function Tt(t,n){for(var e,r=0,i=t.length;r0)for(var e,r,i=new Array(e),o=0;o>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?sn(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?sn(n>>12&15|n>>8&240,n>>8&15|n>>4&240,n>>4&15|240&n,((15&n)<<4|15&n)/255):null):(n=Zt.exec(t))?new fn(n[1],n[2],n[3],1):(n=Qt.exec(t))?new fn(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=Jt.exec(t))?sn(n[1],n[2],n[3],n[4]):(n=Kt.exec(t))?sn(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=tn.exec(t))?yn(n[1],n[2]/100,n[3]/100,1):(n=nn.exec(t))?yn(n[1],n[2]/100,n[3]/100,n[4]):en.hasOwnProperty(t)?un(en[t]):"transparent"===t?new fn(NaN,NaN,NaN,0):null}function un(t){return new fn(t>>16&255,t>>8&255,255&t,1)}function sn(t,n,e,r){return r<=0&&(t=n=e=NaN),new fn(t,n,e,r)}function cn(t){return t instanceof $t||(t=an(t)),t?new fn((t=t.rgb()).r,t.g,t.b,t.opacity):new fn}function ln(t,n,e,r){return 1===arguments.length?cn(t):new fn(t,n,e,null==r?1:r)}function fn(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function hn(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)}function pn(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function dn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function yn(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new vn(t,n,e,r)}function gn(t){if(t instanceof vn)return new vn(t.h,t.s,t.l,t.opacity);if(t instanceof $t||(t=an(t)),!t)return new vn;if(t instanceof vn)return t;var n=(t=t.rgb()).r/255,e=t.g/255,r=t.b/255,i=Math.min(n,e,r),o=Math.max(n,e,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=n===o?(e-r)/u+6*(e0&&s<1?0:a,new vn(a,u,s,t.opacity)}function vn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function mn(t,n,e){return 255*(t<60?n+(e-n)*t/60:t<180?e:t<240?n+(e-n)*(240-t)/60:n)}function _n(t){return function(){return t}}function bn(t){return 1==(t=+t)?xn:function(n,e){return e-n?function(t,n,e){return t=Math.pow(t,e),n=Math.pow(n,e)-t,e=1/e,function(r){return Math.pow(t+r*n,e)}}(n,e,t):_n(isNaN(n)?e:n)}}function xn(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):_n(isNaN(t)?n:t)}Ht($t,an,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:rn,formatHex:rn,formatHsl:function(){return gn(this).formatHsl()},formatRgb:on,toString:on}),Ht(fn,ln,Vt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new fn(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new fn(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:hn,formatHex:hn,formatRgb:pn,toString:pn})),Ht(vn,(function(t,n,e,r){return 1===arguments.length?gn(t):new vn(t,n,e,null==r?1:r)}),Vt($t,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vn(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),n=isNaN(t)||isNaN(this.s)?0:this.s,e=this.l,r=e+(e<.5?e:1-e)*n,i=2*e-r;return new fn(mn(t>=240?t-240:t+120,i,r),mn(t,i,r),mn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var wn=function t(n){var e=bn(n);function r(t,n){var r=e((t=ln(t)).r,(n=ln(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),a=xn(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=a(n),t+""}}return r.gamma=t,r}(1);function kn(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}}var zn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,An=new RegExp(zn.source,"g");function On(t,n){var e,r,i,o=zn.lastIndex=An.lastIndex=0,a=-1,u=[],s=[];for(t+="",n+="";(e=zn.exec(t))&&(r=An.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),u[a]?u[a]+=i:u[++a]=i),(e=e[0])===(r=r[0])?u[a]?u[a]+=r:u[++a]=r:(u[++a]=null,s.push({i:a,x:kn(e,r)})),o=An.lastIndex;return o180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:kn(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,a.rotate,u,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:kn(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,a.skewX,u,s),function(t,n,e,r,o,a){if(t!==e||n!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:kn(t,e)},{i:u-2,x:kn(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,u,s),o=a=null,function(t){for(var n,e=-1,r=s.length;++e=0&&n._call.call(null,t),n=n._next;--Bn}()}finally{Bn=0,function(){var t,n,e=Ln,r=1/0;for(;e;)e._call?(r>e._time&&(r=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:Ln=n);qn=t,ee(r)}(),Gn=0}}function ne(){var t=Yn.now(),n=t-$n;n>1e3&&(Xn-=n,$n=t)}function ee(t){Bn||(Hn&&(Hn=clearTimeout(Hn)),t-Gn>24?(t<1/0&&(Hn=setTimeout(te,t-Yn.now()-Xn)),Vn&&(Vn=clearInterval(Vn))):(Vn||($n=Yn.now(),Vn=setInterval(ne,1e3)),Bn=1,Wn(te)))}function re(t,n,e){var r=new Jn;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}Jn.prototype=Kn.prototype={constructor:Jn,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Zn():+e)+(null==n?0:+n),this._next||qn===this||(qn?qn._next=this:Ln=this,qn=this),this._call=t,this._time=e,ee()},stop:function(){this._call&&(this._call=null,this._time=1/0,ee())}};var ie=Mt("start","end","cancel","interrupt"),oe=[];function ae(t,n,e,r,i,o){var a=t.__transition;if(a){if(e in a)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var c,l,f,h;if(1!==e.state)return u();for(c in i)if((h=i[c]).name===e.name){if(3===h.state)return re(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[c]):+c0)throw new Error("too late; already scheduled");return e}function se(t,n){var e=ce(t,n);if(e.state>3)throw new Error("too late; already running");return e}function ce(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function le(t,n){var e,r,i,o=t.__transition,a=!0;if(o){for(i in n=null==n?null:n+"",o)(e=o[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete o[i]):a=!1;a&&delete t.__transition}}function fe(t,n){var e,r;return function(){var i=se(this,t),o=i.tween;if(o!==e)for(var a=0,u=(r=e=o).length;a=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?ue:se;return function(){var a=o(this,t),u=a.on;u!==r&&(i=(r=u).copy()).on(n,e),a.on=i}}var Te=xt.prototype.constructor;function je(t){return function(){this.style.removeProperty(t)}}function Ne(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function Pe(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&Ne(t,o,e)),r}return o._value=n,o}function Re(t){return function(n){this.textContent=t.call(this,n)}}function Ie(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&Re(r)),n}return r._value=t,r}var De=0;function Ue(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Fe(){return++De}var Le=xt.prototype;Ue.prototype=function(t){return xt().transition(t)}.prototype={constructor:Ue,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;ar?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function er(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e=i)&&(e=i)}return e}function rr(t,n){let e;if(void 0===n)for(const n of t)null!=n&&(e>n||void 0===e&&n>=n)&&(e=n);else{let r=-1;for(let i of t)null!=(i=n(i,++r,t))&&(e>i||void 0===e&&i>=i)&&(e=i)}return e}Xe.prototype=$e.prototype;var ir="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function or(t,n,e){return t(e={path:n,exports:{},require:function(t,n){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==n&&e.path)}},e.exports),e.exports}var ar=/^\s+|\s+$/g,ur=/^[-+]0x[0-9a-f]+$/i,sr=/^0b[01]+$/i,cr=/^0o[0-7]+$/i,lr=parseInt,fr="object"==typeof ir&&ir&&ir.Object===Object&&ir,hr="object"==typeof self&&self&&self.Object===Object&&self,pr=fr||hr||Function("return this")(),dr=Object.prototype.toString,yr=Math.max,gr=Math.min,vr=function(){return pr.Date.now()};function mr(t,n,e){var r,i,o,a,u,s,c=0,l=!1,f=!1,h=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function p(n){var e=r,o=i;return r=i=void 0,c=n,a=t.apply(o,e)}function d(t){return c=t,u=setTimeout(g,n),l?p(t):a}function y(t){var e=t-s;return void 0===s||e>=n||e<0||f&&t-c>=o}function g(){var t=vr();if(y(t))return v(t);u=setTimeout(g,function(t){var e=n-(t-s);return f?gr(e,o-(t-c)):e}(t))}function v(t){return u=void 0,h&&r?p(t):(r=i=void 0,a)}function m(){var t=vr(),e=y(t);if(r=arguments,i=this,s=t,e){if(void 0===u)return d(s);if(f)return u=setTimeout(g,n),p(s)}return void 0===u&&(u=setTimeout(g,n)),a}return n=br(n)||0,_r(e)&&(l=!!e.leading,o=(f="maxWait"in e)?yr(br(e.maxWait)||0,n):o,h="trailing"in e?!!e.trailing:h),m.cancel=function(){void 0!==u&&clearTimeout(u),c=0,r=s=i=u=void 0},m.flush=function(){return void 0===u?a:v(vr())},m}function _r(t){var n=typeof t;return!!t&&("object"==n||"function"==n)}function br(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==dr.call(t)}(t))return NaN;if(_r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=_r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ar,"");var e=sr.test(t);return e||cr.test(t)?lr(t.slice(2),e?2:8):ur.test(t)?NaN:+t}var xr,wr,kr=function(t,n,e){var r=!0,i=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return _r(e)&&(r="leading"in e?!!e.leading:r,i="trailing"in e?!!e.trailing:i),mr(t,n,{leading:r,maxWait:n,trailing:i})},zr="undefined"==typeof self&&"undefined"!=typeof process&&process.hrtime?function(){var t=process.hrtime();return 1e3*t[0]+t[1]/1e6}:"undefined"!=typeof self&&void 0!==self.performance&&void 0!==self.performance.now?self.performance.now.bind(self.performance):void 0!==Date.now?Date.now:function(){return(new Date).getTime()},Ar=function(){function t(){this._tweens={},this._tweensAddedDuringUpdate={}}return t.prototype.getAll=function(){var t=this;return Object.keys(this._tweens).map((function(n){return t._tweens[n]}))},t.prototype.removeAll=function(){this._tweens={}},t.prototype.add=function(t){this._tweens[t.getId()]=t,this._tweensAddedDuringUpdate[t.getId()]=t},t.prototype.remove=function(t){delete this._tweens[t.getId()],delete this._tweensAddedDuringUpdate[t.getId()]},t.prototype.update=function(t,n){var e=Object.keys(this._tweens);if(0===e.length)return!1;for(t=void 0!==t?t:zr();e.length>0;){this._tweensAddedDuringUpdate={};for(var r=0;r1?o(t[e],t[e-1],e-r):o(t[i],t[i+1>e?e:i+1],r-i)},Bezier:function(t,n){for(var e=0,r=t.length-1,i=Math.pow,o=Sr.Utils.Bernstein,a=0;a<=r;a++)e+=i(1-n,r-a)*i(n,a)*t[a]*o(r,a);return e},CatmullRom:function(t,n){var e=t.length-1,r=e*n,i=Math.floor(r),o=Sr.Utils.CatmullRom;return t[0]===t[e]?(n<0&&(i=Math.floor(r=e*(1+n))),o(t[(i-1+e)%e],t[i],t[(i+1)%e],t[(i+2)%e],r-i)):n<0?t[0]-(o(t[0],t[0],t[1],t[1],-r)-t[0]):n>1?t[e]-(o(t[e],t[e],t[e-1],t[e-1],r-e)-t[e]):o(t[i?i-1:0],t[i],t[e1;e--)n*=e;return xr[t]=n,n}),CatmullRom:function(t,n,e,r,i){var o=.5*(e-t),a=.5*(r-n),u=i*i;return(2*n-2*e+o+a)*(i*u)+(-3*n+3*e-2*o-a)*u+o*i+n}}},Mr=function(){function t(){}return t.nextId=function(){return t._nextId++},t._nextId=0,t}(),Er=function(){function t(t,n){void 0===n&&(n=Tr),this._object=t,this._group=n,this._isPaused=!1,this._pauseStart=0,this._valuesStart={},this._valuesEnd={},this._valuesStartRepeat={},this._duration=1e3,this._initialRepeat=0,this._repeat=0,this._yoyo=!1,this._isPlaying=!1,this._reversed=!1,this._delayTime=0,this._startTime=0,this._easingFunction=Tr.Easing.Linear.None,this._interpolationFunction=Tr.Interpolation.Linear,this._chainedTweens=[],this._onStartCallbackFired=!1,this._id=Tr.nextId(),this._isChainStopped=!1}return t.prototype.getId=function(){return this._id},t.prototype.isPlaying=function(){return this._isPlaying},t.prototype.isPaused=function(){return this._isPaused},t.prototype.to=function(t,n){for(var e in t)this._valuesEnd[e]=t[e];return void 0!==n&&(this._duration=n),this},t.prototype.duration=function(t){return this._duration=t,this},t.prototype.start=function(t){if(this._isPlaying)return this;if(this._group.add(this),this._repeat=this._initialRepeat,this._reversed)for(var n in this._reversed=!1,this._valuesStartRepeat)this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._isPlaying=!0,this._isPaused=!1,this._onStartCallbackFired=!1,this._isChainStopped=!1,this._startTime=void 0!==t?"string"==typeof t?Tr.now()+parseFloat(t):t:Tr.now(),this._startTime+=this._delayTime,this._setupProperties(this._object,this._valuesStart,this._valuesEnd,this._valuesStartRepeat),this},t.prototype._setupProperties=function(t,n,e,r){for(var i in e){var o=t[i],a=Array.isArray(o),u=a?"array":typeof o,s=!a&&Array.isArray(e[i]);if("undefined"!==u&&"function"!==u){if(s){var c=e[i];if(0===c.length)continue;c=c.map(this._handleRelativeValue.bind(this,o)),e[i]=[o].concat(c)}if("object"!==u&&!a||!o||s)void 0===n[i]&&(n[i]=o),a||(n[i]*=1),r[i]=s?e[i].slice().reverse():n[i]||0;else{for(var l in n[i]=a?[]:{},o)n[i][l]=o[l];r[i]=a?[]:{},this._setupProperties(o,n[i],e[i],r[i])}}}},t.prototype.stop=function(){return this._isChainStopped||(this._isChainStopped=!0,this.stopChainedTweens()),this._isPlaying?(this._group.remove(this),this._isPlaying=!1,this._isPaused=!1,this._onStopCallback&&this._onStopCallback(this._object),this):this},t.prototype.end=function(){return this.update(1/0),this},t.prototype.pause=function(t){return this._isPaused||!this._isPlaying||(this._isPaused=!0,this._pauseStart=void 0===t?Tr.now():t,this._group.remove(this)),this},t.prototype.resume=function(t){return this._isPaused&&this._isPlaying?(this._isPaused=!1,this._startTime+=(void 0===t?Tr.now():t)-this._pauseStart,this._pauseStart=0,this._group.add(this),this):this},t.prototype.stopChainedTweens=function(){for(var t=0,n=this._chainedTweens.length;tthis._startTime+this._duration&&!this._isPlaying)return!1;if(this.isPlaying||this.start(t),t1?1:e;var r=this._easingFunction(e);if(this._updateProperties(this._object,this._valuesStart,this._valuesEnd,r),this._onUpdateCallback&&this._onUpdateCallback(this._object,e),1===e){if(this._repeat>0){for(n in isFinite(this._repeat)&&this._repeat--,this._valuesStartRepeat)this._yoyo||"string"!=typeof this._valuesEnd[n]||(this._valuesStartRepeat[n]=this._valuesStartRepeat[n]+parseFloat(this._valuesEnd[n])),this._yoyo&&this._swapEndStartRepeatValues(n),this._valuesStart[n]=this._valuesStartRepeat[n];return this._yoyo&&(this._reversed=!this._reversed),void 0!==this._repeatDelayTime?this._startTime=t+this._repeatDelayTime:this._startTime=t+this._delayTime,this._onRepeatCallback&&this._onRepeatCallback(this._object),!0}this._onCompleteCallback&&this._onCompleteCallback(this._object);for(var i=0,o=this._chainedTweens.length;i=0?r=setTimeout(s,n-c):(r=null,e||(u=t.apply(o,i),o=i=null))}null==n&&(n=100);var c=function(){o=this,i=arguments,a=Date.now();var c=e&&!r;return r||(r=setTimeout(s,n)),c&&(u=t.apply(o,i),o=i=null),u};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(u=t.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}jr.debounce=jr;var Nr=jr;function Pr(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}var Rr=function t(n,e){var r=e.default,i=void 0===r?null:r,o=e.triggerUpdate,a=void 0===o||o,u=e.onChange,s=void 0===u?function(t,n){}:u;!function(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=n,this.defaultVal=i,this.triggerUpdate=a,this.onChange=s};function Ir(t){var n=t.stateInit,e=void 0===n?function(){return{}}:n,r=t.props,i=void 0===r?{}:r,o=t.methods,a=void 0===o?{}:o,u=t.aliases,s=void 0===u?{}:u,c=t.init,l=void 0===c?function(){}:c,f=t.update,h=void 0===f?function(){}:f,p=Object.keys(i).map((function(t){return new Rr(t,i[t])}));return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Object.assign({},e instanceof Function?e(t):e,{initialised:!1}),r={};function i(n){return o(n,t),u(),i}var o=function(t,e){l.call(i,t,n,e),n.initialised=!0},u=Nr((function(){n.initialised&&(h.call(i,n,r),r={})}),1);return p.forEach((function(t){i[t.name]=function(t){var e=t.name,o=t.triggerUpdate,a=void 0!==o&&o,s=t.onChange,c=void 0===s?function(t,n){}:s,l=t.defaultVal,f=void 0===l?null:l;return function(t){var o=n[e];if(!arguments.length)return o;var s=void 0===t?f:t;return n[e]=s,c.call(i,s,n,o),!r.hasOwnProperty(e)&&(r[e]=o),a&&u(),i}}(t)})),Object.keys(a).forEach((function(t){i[t]=function(){for(var e,r=arguments.length,o=new Array(r),u=0;u1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}if(t=C(t,360),n=C(n,100),e=C(e,100),0===n)r=i=o=e;else{var u=e<.5?e*(1+n):e+n-e*n,s=2*e-u;r=a(s,u,t+1/3),i=a(s,u,t),o=a(s,u,t-1/3)}return{r:255*r,g:255*i,b:255*o}}(t.h,s,l),f=!0,h="hsl"),t.hasOwnProperty("a")&&(o=t.a));var p,d,y;return o=E(o),{ok:f,format:t.format||h,r:a(255,u(i.r,0)),g:a(255,u(i.g,0)),b:a(255,u(i.b,0)),a:o}}(t);this._originalInput=t,this._r=l.r,this._g=l.g,this._b=l.b,this._a=l.a,this._roundA=o(100*this._a)/100,this._format=s.format||l.format,this._gradientType=s.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=l.ok,this._tc_id=i++}function l(t,n,e){t=C(t,255),n=C(n,255),e=C(e,255);var r,i,o=u(t,n,e),s=a(t,n,e),c=(o+s)/2;if(o==s)r=i=0;else{var l=o-s;switch(i=c>.5?l/(2-o-s):l/(o+s),o){case t:r=(n-e)/l+(n>1)+720)%360;--n;)r.h=(r.h+i)%360,o.push(c(r));return o}function O(t,n){n=n||6;for(var e=c(t).toHsv(),r=e.h,i=e.s,o=e.v,a=[],u=1/n;n--;)a.push(c({h:r,s:i,v:o})),o=(o+u)%1;return a}c.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,r,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=E(t),this._roundA=o(100*this._a)/100,this},toHsv:function(){var t=f(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=f(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.v);return 1==this._a?"hsv("+n+", "+e+"%, "+r+"%)":"hsva("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var t=l(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=l(this._r,this._g,this._b),n=o(360*t.h),e=o(100*t.s),r=o(100*t.l);return 1==this._a?"hsl("+n+", "+e+"%, "+r+"%)":"hsla("+n+", "+e+"%, "+r+"%, "+this._roundA+")"},toHex:function(t){return h(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,n,e,r,i){var a=[N(o(t).toString(16)),N(o(n).toString(16)),N(o(e).toString(16)),N(R(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*C(this._r,255))+"%",g:o(100*C(this._g,255))+"%",b:o(100*C(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%)":"rgba("+o(100*C(this._r,255))+"%, "+o(100*C(this._g,255))+"%, "+o(100*C(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(M[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var n="#"+p(this._r,this._g,this._b,this._a),e=n,r=this._gradientType?"GradientType = 1, ":"";if(t){var i=c(t);e="#"+p(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+n+",endColorstr="+e+")"},toString:function(t){var n=!!t;t=t||this._format;var e=!1,r=this._a<1&&this._a>=0;return n||!r||"hex"!==t&&"hex6"!==t&&"hex3"!==t&&"hex4"!==t&&"hex8"!==t&&"name"!==t?("rgb"===t&&(e=this.toRgbString()),"prgb"===t&&(e=this.toPercentageRgbString()),"hex"!==t&&"hex6"!==t||(e=this.toHexString()),"hex3"===t&&(e=this.toHexString(!0)),"hex4"===t&&(e=this.toHex8String(!0)),"hex8"===t&&(e=this.toHex8String()),"name"===t&&(e=this.toName()),"hsl"===t&&(e=this.toHslString()),"hsv"===t&&(e=this.toHsvString()),e||this.toHexString()):"name"===t&&0===this._a?this.toName():this.toRgbString()},clone:function(){return c(this.toString())},_applyModification:function(t,n){var e=t.apply(null,[this].concat([].slice.call(n)));return this._r=e._r,this._g=e._g,this._b=e._b,this.setAlpha(e._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(_,arguments)},desaturate:function(){return this._applyModification(d,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(g,arguments)},spin:function(){return this._applyModification(b,arguments)},_applyCombination:function(t,n){return t.apply(null,[this].concat([].slice.call(n)))},analogous:function(){return this._applyCombination(A,arguments)},complement:function(){return this._applyCombination(x,arguments)},monochromatic:function(){return this._applyCombination(O,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(k,arguments)}},c.fromRatio=function(t,n){if("object"==typeof t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]="a"===r?t[r]:P(t[r]));t=e}return c(t,n)},c.equals=function(t,n){return!(!t||!n)&&c(t).toRgbString()==c(n).toRgbString()},c.random=function(){return c.fromRatio({r:s(),g:s(),b:s()})},c.mix=function(t,n,e){e=0===e?0:e||50;var r=c(t).toRgb(),i=c(n).toRgb(),o=e/100;return c({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})}, // =4.5;break;case"AAlarge":i=o>=3;break;case"AAAsmall":i=o>=7}return i},c.mostReadable=function(t,n,e){var r,i,o,a,u=null,s=0;i=(e=e||{}).includeFallbackColors,o=e.level,a=e.size;for(var l=0;ls&&(s=r,u=c(n[l]));return c.isReadable(t,u,{level:o,size:a})||!i?u:(e.includeFallbackColors=!1,c.mostReadable(t,["#fff","#000"],e))};var S=c.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},M=c.hexNames=function(t){var n={};for(var e in t)t.hasOwnProperty(e)&&(n[t[e]]=e);return n}(S);function E(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function C(t,e){(function(t){return"string"==typeof t&&-1!=t.indexOf(".")&&1===parseFloat(t)})(t)&&(t="100%");var r=function(t){return"string"==typeof t&&-1!=t.indexOf("%")}(t);return t=a(e,u(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function T(t){return a(1,u(0,t))}function j(t){return parseInt(t,16)}function N(t){return 1==t.length?"0"+t:""+t}function P(t){return t<=1&&(t=100*t+"%"),t}function R(t){return n.round(255*parseFloat(t)).toString(16)}function I(t){return j(t)/255}var D,U,F,L=(U="[\\s|\\(]+("+(D="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",F="[\\s|\\(]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")[,|\\s]+("+D+")\\s*\\)?",{CSS_UNIT:new RegExp(D),rgb:new RegExp("rgb"+U),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+U),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+U),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function q(t){return!!L.CSS_UNIT.exec(t)}t.exports?t.exports=c:window.tinycolor=c}(Math)}));function Fr(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function Lr(t,n){for(var e=0;e0&&void 0!==arguments[0]?arguments[0]:6;Fr(this,t),this.csBits=n,this.registry=["__reserved for background__"]}var n,e,r;return n=t,(e=[{key:"register",value:function(t){if(this.registry.length>=Math.pow(2,24-this.csBits))return null;var n,e=this.registry.length,r=Hr(e,this.csBits),i=(n=e+(r<<24-this.csBits),"#".concat(Math.min(n,Math.pow(2,24)).toString(16).padStart(6,"0")));return this.registry.push(t),i}},{key:"lookup",value:function(t){var n,e,r,i,o="string"==typeof t?(n=Ur(t).toRgb(),e=n.r,r=n.g,i=n.b,Br(e,r,i)):Br.apply(void 0,qr(t));if(!o)return null;var a=o&Math.pow(2,24-this.csBits)-1,u=o>>24-this.csBits&Math.pow(2,this.csBits)-1;return Hr(a,this.csBits)!==u||a>=this.registry.length?null:this.registry[a]}}])&&Lr(n.prototype,e),r&&Lr(n,r),t}();function $r(t,n,e){var r;function i(){var i,o,a=r.length,u=0,s=0,c=0;for(i=0;i=(i=(f+h)/2))?f=i:h=i,r=c,!(c=c[u=+a]))return r[u]=l,t;if(n===(o=+t._x.call(null,c.data)))return l.next=c,r?r[u]=l:t._root=l,t;do{r=r?r[u]=new Array(2):t._root=new Array(2),(a=n>=(i=(f+h)/2))?f=i:h=i}while((u=+a)==(s=+(o>=i)));return r[s]=c,r[u]=l,t}function Xr(t,n,e){this.node=t,this.x0=n,this.x1=e}function Yr(t){return t[0]}function Wr(t,n){var e=new Zr(null==n?Yr:n,NaN,NaN);return null==t?e:e.addAll(t)}function Zr(t,n,e){this._x=t,this._x0=n,this._x1=e,this._root=void 0}function Qr(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}var Jr=Wr.prototype=Zr.prototype;function Kr(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,a,u,s,c,l,f,h,p=t._root,d={data:r},y=t._x0,g=t._y0,v=t._x1,m=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((c=n>=(o=(y+v)/2))?y=o:v=o,(l=e>=(a=(g+m)/2))?g=a:m=a,i=p,!(p=p[f=l<<1|c]))return i[f]=d,t;if(u=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===u&&e===s)return d.next=p,i?i[f]=d:t._root=d,t;do{i=i?i[f]=new Array(4):t._root=new Array(4),(c=n>=(o=(y+v)/2))?y=o:v=o,(l=e>=(a=(g+m)/2))?g=a:m=a}while((f=l<<1|c)==(h=(s>=a)<<1|u>=o));return i[h]=p,i[f]=d,t}function ti(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function ni(t){return t[0]}function ei(t){return t[1]}function ri(t,n,e){var r=new ii(null==n?ni:n,null==e?ei:e,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function ii(t,n,e,r,i,o){this._x=t,this._y=n,this._x0=e,this._y0=r,this._x1=i,this._y1=o,this._root=void 0}function oi(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}Jr.copy=function(){var t,n,e=new Zr(this._x,this._x0,this._x1),r=this._root;if(!r)return e;if(!r.length)return e._root=Qr(r),e;for(t=[{source:r,target:e._root=new Array(2)}];r=t.pop();)for(var i=0;i<2;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(2)}):r.target[i]=Qr(n));return e},Jr.add=function(t){var n=+this._x.call(null,t);return Gr(this.cover(n),n,t)},Jr.addAll=function(t){var n,e,r=t.length,i=new Array(r),o=1/0,a=-1/0;for(n=0;na&&(a=e));for(at||t>e))return this;var r,i,o=e-n,a=this._root;switch(i=+(t<(n+e)/2)){case 0:do{(r=new Array(2))[i]=a,a=r}while(t>(e=n+(o*=2)));break;case 1:do{(r=new Array(2))[i]=a,a=r}while((n=e-(o*=2))>t)}this._root&&this._root.length&&(this._root=a)}return this._x0=n,this._x1=e,this},Jr.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},Jr.extent=function(t){return arguments.length?this.cover(+t[0][0]).cover(+t[1][0]):isNaN(this._x0)?void 0:[[this._x0],[this._x1]]},Jr.find=function(t,n){var e,r,i,o,a,u=this._x0,s=this._x1,c=[],l=this._root;for(l&&c.push(new Xr(l,u,s)),null==n?n=1/0:(u=t-n,s=t+n);o=c.pop();)if(!(!(l=o.node)||(r=o.x0)>s||(i=o.x1)=f))&&(o=c[c.length-1],c[c.length-1]=c[c.length-1-a],c[c.length-1-a]=o)}else{var h=Math.abs(t-+this._x.call(null,l.data));h=(a=(f+h)/2))?f=a:h=a,n=l,!(l=l[s=+u]))return this;if(!l.length)break;n[s+1&1]&&(e=n,c=s)}for(;l.data!==t;)if(r=l,!(l=l.next))return this;return(i=l.next)&&delete l.next,r?(i?r.next=i:delete r.next,this):n?(i?n[s]=i:delete n[s],(l=n[0]||n[1])&&l===(n[1]||n[0])&&!l.length&&(e?e[c]=l:this._root=l),this):(this._root=i,this)},Jr.removeAll=function(t){for(var n=0,e=t.length;n=(a=(_+w)/2))?_=a:w=a,(p=e>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+z)/2))?x=s:z=s,o=v,!(v=v[y=d<<2|p<<1|h]))return o[y]=m,t;if(c=+t._x.call(null,v.data),l=+t._y.call(null,v.data),f=+t._z.call(null,v.data),n===c&&e===l&&r===f)return m.next=v,o?o[y]=m:t._root=m,t;do{o=o?o[y]=new Array(8):t._root=new Array(8),(h=n>=(a=(_+w)/2))?_=a:w=a,(p=e>=(u=(b+k)/2))?b=u:k=u,(d=r>=(s=(x+z)/2))?x=s:z=s}while((y=d<<2|p<<1|h)==(g=(f>=s)<<2|(l>=u)<<1|c>=a));return o[g]=v,o[y]=m,t}function si(t,n,e,r,i,o,a){this.node=t,this.x0=n,this.y0=e,this.z0=r,this.x1=i,this.y1=o,this.z1=a}function ci(t){return t[0]}function li(t){return t[1]}function fi(t){return t[2]}function hi(t,n,e,r){var i=new pi(null==n?ci:n,null==e?li:e,null==r?fi:r,NaN,NaN,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function pi(t,n,e,r,i,o,a,u,s){this._x=t,this._y=n,this._z=e,this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=u,this._z1=s,this._root=void 0}function di(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}ai.copy=function(){var t,n,e=new ii(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return e;if(!r.length)return e._root=oi(r),e;for(t=[{source:r,target:e._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(n=r.source[i])&&(n.length?t.push({source:n,target:r.target[i]=new Array(4)}):r.target[i]=oi(n));return e},ai.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Kr(this.cover(n,e),n,e,t)},ai.addAll=function(t){var n,e,r,i,o=t.length,a=new Array(o),u=new Array(o),s=1/0,c=1/0,l=-1/0,f=-1/0;for(e=0;el&&(l=r),if&&(f=i));if(s>l||c>f)return this;for(this.cover(s,c).cover(l,f),e=0;et||t>=i||r>n||n>=o;)switch(u=(nh||(o=s.y0)>p||(a=s.x1)=v)<<1|t>=g)&&(s=d[d.length-1],d[d.length-1]=d[d.length-1-c],d[d.length-1-c]=s)}else{var m=t-+this._x.call(null,y.data),_=n-+this._y.call(null,y.data),b=m*m+_*_;if(b=(u=(d+g)/2))?d=u:g=u,(l=a>=(s=(y+v)/2))?y=s:v=s,n=p,!(p=p[f=l<<1|c]))return this;if(!p.length)break;(n[f+1&3]||n[f+2&3]||n[f+3&3])&&(e=n,h=f)}for(;p.data!==t;)if(r=p,!(p=p.next))return this;return(i=p.next)&&delete p.next,r?(i?r.next=i:delete r.next,this):n?(i?n[f]=i:delete n[f],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[h]=p:this._root=p),this):(this._root=i,this)},ai.removeAll=function(t){for(var n=0,e=t.length;n1&&(g=f.y+f.vy-c.y-c.vy||vi()),i>2&&(v=f.z+f.vz-c.z-c.vz||vi()),y*=h=((h=Math.sqrt(y*y+g*g+v*v))-e[d])/h*r*n[d],g*=h,v*=h,f.vx-=y*(p=a[d]),i>1&&(f.vy-=g*p),i>2&&(f.vz-=v*p),c.vx+=y*(p=1-p),i>1&&(c.vy+=g*p),i>2&&(c.vz+=v*p)}function h(){if(r){var i,s,c=r.length,l=t.length,f=new Map(r.map((t,n)=>[u(t,n,r),t]));for(i=0,o=new Array(c);ip&&(p=r),id&&(d=i),oy&&(y=o));for(pt||t>a||i>n||n>u||o>e||e>s))return this;var c,l,f=a-r,h=this._root;switch(l=(e<(o+s)/2)<<2|(n<(i+u)/2)<<1|t<(r+a)/2){case 0:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),s=o+f,t>(a=r+f)||n>u||e>s);break;case 1:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),s=o+f,(r=a-f)>t||n>u||e>s);break;case 2:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),s=o+f,t>(a=r+f)||i>n||e>s);break;case 3:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),s=o+f,(r=a-f)>t||i>n||e>s);break;case 4:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),o=s-f,t>(a=r+f)||n>u||o>e);break;case 5:do{(c=new Array(8))[l]=h,h=c}while(u=i+(f*=2),o=s-f,(r=a-f)>t||n>u||o>e);break;case 6:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),o=s-f,t>(a=r+f)||i>n||o>e);break;case 7:do{(c=new Array(8))[l]=h,h=c}while(i=u-(f*=2),o=s-f,(r=a-f)>t||i>n||o>e)}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=i,this._z0=o,this._x1=a,this._y1=u,this._z1=s,this},yi.data=function(){var t=[];return this.visit((function(n){if(!n.length)do{t.push(n.data)}while(n=n.next)})),t},yi.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1],+t[0][2]).cover(+t[1][0],+t[1][1],+t[1][2]):isNaN(this._x0)?void 0:[[this._x0,this._y0,this._z0],[this._x1,this._y1,this._z1]]},yi.find=function(t,n,e,r){var i,o,a,u,s,c,l,f,h,p=this._x0,d=this._y0,y=this._z0,g=this._x1,v=this._y1,m=this._z1,_=[],b=this._root;for(b&&_.push(new si(b,p,d,y,g,v,m)),null==r?r=1/0:(p=t-r,d=n-r,y=e-r,g=t+r,v=n+r,m=e+r,r*=r);f=_.pop();)if(!(!(b=f.node)||(o=f.x0)>g||(a=f.y0)>v||(u=f.z0)>m||(s=f.x1)=k)<<2|(n>=w)<<1|t>=x)&&(f=_[_.length-1],_[_.length-1]=_[_.length-1-h],_[_.length-1-h]=f)}else{var z=t-+this._x.call(null,b.data),A=n-+this._y.call(null,b.data),O=e-+this._z.call(null,b.data),S=z*z+A*A+O*O;if(S=(s=(v+b)/2))?v=s:b=s,(h=a>=(c=(m+x)/2))?m=c:x=c,(p=u>=(l=(_+w)/2))?_=l:w=l,n=g,!(g=g[d=p<<2|h<<1|f]))return this;if(!g.length)break;(n[d+1&7]||n[d+2&7]||n[d+3&7]||n[d+4&7]||n[d+5&7]||n[d+6&7]||n[d+7&7])&&(e=n,y=d)}for(;g.data!==t;)if(r=g,!(g=g.next))return this;return(i=g.next)&&delete g.next,r?(i?r.next=i:delete r.next,this):n?(i?n[d]=i:delete n[d],(g=n[0]||n[1]||n[2]||n[3]||n[4]||n[5]||n[6]||n[7])&&g===(n[7]||n[6]||n[5]||n[4]||n[3]||n[2]||n[1]||n[0])&&!g.length&&(e?e[y]=g:this._root=g),this):(this._root=i,this)},yi.removeAll=function(t){for(var n=0,e=t.length;n1&&(null==l.fy?l.y+=l.vy*=s:(l.y=l.fy,l.vy=0)),r>2&&(null==l.fz?l.z+=l.vz*=s:(l.z=l.fz,l.vz=0));return e}function d(){for(var n,e=0,i=t.length;e1&&isNaN(n.y)||r>2&&isNaN(n.z)){var o=10*(r>2?Math.cbrt(e):r>1?Math.sqrt(e):e),a=e*zi,u=e*Ai;1===r?n.x=o:2===r?(n.x=o*Math.cos(a),n.y=o*Math.sin(a)):(n.x=o*Math.sin(a)*Math.cos(u),n.y=o*Math.cos(a),n.z=o*Math.sin(a)*Math.sin(u))}(isNaN(n.vx)||r>1&&isNaN(n.vy)||r>2&&isNaN(n.vz))&&(n.vx=0,r>1&&(n.vy=0),r>2&&(n.vz=0))}}function y(n){return n.initialize&&n.initialize(t,r),n}return null==t&&(t=[]),d(),e={tick:p,restart:function(){return l.restart(h),e},stop:function(){return l.stop(),e},numDimensions:function(t){return arguments.length?(r=Math.min(3,Math.max(1,Math.round(t))),c.forEach(y),e):r},nodes:function(n){return arguments.length?(t=n,d(),c.forEach(y),e):t},alpha:function(t){return arguments.length?(i=+t,e):i},alphaMin:function(t){return arguments.length?(o=+t,e):o},alphaDecay:function(t){return arguments.length?(a=+t,e):+a},alphaTarget:function(t){return arguments.length?(u=+t,e):u},velocityDecay:function(t){return arguments.length?(s=1-t,e):1-s},force:function(t,n){return arguments.length>1?(null==n?c.delete(t):c.set(t,y(n)),e):c.get(t)},find:function(){var n,e,i,o,a,u,s=Array.prototype.slice.call(arguments),c=s.shift()||0,l=(r>1?s.shift():null)||0,f=(r>2?s.shift():null)||0,h=s.shift()||1/0,p=0,d=t.length;for(h*=h,p=0;p1?(f.on(t,n),e):f.on(t)}}}function Si(){var t,n,e,r,i,o=gi(-30),a=1,u=1/0,s=.81;function c(i){var o,a=t.length,u=(1===n?Wr(t,xi):2===n?ri(t,xi,wi):3===n?hi(t,xi,wi,ki):null).visitAfter(f);for(r=i,o=0;o1&&(t.y=a/l),n>2&&(t.z=u/l)}else{(e=t).x=e.data.x,n>1&&(e.y=e.data.y),n>2&&(e.z=e.data.z);do{c+=i[e.data.index]}while(e=e.next)}t.value=c}function h(t,o,c,l,f){if(!t.value)return!0;var h=[c,l,f][n-1],p=t.x-e.x,d=n>1?t.y-e.y:0,y=n>2?t.z-e.z:0,g=h-o,v=p*p+d*d+y*y;if(g*g/s1&&0===d&&(v+=(d=vi())*d),n>2&&0===y&&(v+=(y=vi())*y),v1&&(e.vy+=d*t.value*r/v),n>2&&(e.vz+=y*t.value*r/v)),!0;if(!(t.length||v>=u)){(t.data!==e||t.next)&&(0===p&&(v+=(p=vi())*p),n>1&&0===d&&(v+=(d=vi())*d),n>2&&0===y&&(v+=(y=vi())*y),v1&&(e.vy+=d*g),n>2&&(e.vz+=y*g))}while(t=t.next)}}return c.initialize=function(e,r){t=e,n=r,l()},c.strength=function(t){return arguments.length?(o="function"==typeof t?t:gi(+t),l(),c):o},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(u=t*t,c):Math.sqrt(u)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c}var Mi=or((function(t){!function(){var n=Math.abs,e=Math.cos,r=Math.sin,i=Math.acos,o=Math.atan2,a=Math.sqrt,u=Math.pow,s=function(t){return t<0?-u(-t,1/3):u(t,1/3)},c=Math.PI,l=2*c,f=c/2,h=Number.MAX_SAFE_INTEGER||9007199254740991,p=Number.MIN_SAFE_INTEGER||-9007199254740991,d={x:0,y:0,z:0},y={Tvalues:[-.06405689286260563,.06405689286260563,-.1911188674736163,.1911188674736163,-.3150426796961634,.3150426796961634,-.4337935076260451,.4337935076260451,-.5454214713888396,.5454214713888396,-.6480936519369755,.6480936519369755,-.7401241915785544,.7401241915785544,-.820001985973903,.820001985973903,-.8864155270044011,.8864155270044011,-.9382745520027328,.9382745520027328,-.9747285559713095,.9747285559713095,-.9951872199970213,.9951872199970213],Cvalues:[.12793819534675216,.12793819534675216,.1258374563468283,.1258374563468283,.12167047292780339,.12167047292780339,.1155056680537256,.1155056680537256,.10744427011596563,.10744427011596563,.09761865210411388,.09761865210411388,.08619016153195327,.08619016153195327,.0733464814110803,.0733464814110803,.05929858491543678,.05929858491543678,.04427743881741981,.04427743881741981,.028531388628933663,.028531388628933663,.0123412297999872,.0123412297999872],arcfn:function(t,n){var e=n(t),r=e.x*e.x+e.y*e.y;return void 0!==e.z&&(r+=e.z*e.z),a(r)},compute:function(t,n,e){if(0===t)return n[0];var r=n.length-1;if(1===t)return n[r];var i=n,o=1-t;if(0===r)return n[0];if(1===r)return h={x:o*i[0].x+t*i[1].x,y:o*i[0].y+t*i[1].y},e&&(h.z=o*i[0].z+t*i[1].z),h;if(r<4){var a,u,s,c=o*o,l=t*t,f=0;2===r?(i=[i[0],i[1],i[2],d],a=c,u=o*t*2,s=l):3===r&&(a=c*o,u=c*t*3,s=o*l*3,f=t*l);var h={x:a*i[0].x+u*i[1].x+s*i[2].x+f*i[3].x,y:a*i[0].y+u*i[1].y+s*i[2].y+f*i[3].y};return e&&(h.z=a*i[0].z+u*i[1].z+s*i[2].z+f*i[3].z),h}for(var p=JSON.parse(JSON.stringify(n));p.length>1;){for(var y=0;y1;i--,o--){for(var a,u=[],s=0;so.x.min&&(n=o.x.min),e>o.y.min&&(e=o.y.min),r0&&(a.c1=n,a.c2=r,a.s1=t,a.s2=e,o.push(a))}}))})),o},makeshape:function(t,n,e){var r=n.points.length,i=t.points.length,o=y.makeline(n.points[r-1],t.points[0]),a=y.makeline(t.points[i-1],n.points[0]),u={startcap:o,forward:t,back:n,endcap:a,bbox:y.findbbox([o,t,n,a])},s=y;return u.intersections=function(t){return s.shapeintersections(u,u.bbox,t,t.bbox,e)},u},getminmax:function(t,n,e){if(!e)return{min:0,max:0};var r,i,o=h,a=p;-1===e.indexOf(0)&&(e=[0].concat(e)),-1===e.indexOf(1)&&e.push(1);for(var u=0,s=e.length;ua&&(a=i[n]);return{min:o,mid:(o+a)/2,max:a,size:a-o}},align:function(t,n){var i=n.p1.x,a=n.p1.y,u=-o(n.p2.y-a,n.p2.x-i);return t.map((function(t){return{x:(t.x-i)*e(u)-(t.y-a)*r(u),y:(t.x-i)*r(u)+(t.y-a)*e(u)}}))},roots:function(t,n){n=n||{p1:{x:0,y:0},p2:{x:1,y:0}};var r=t.length-1,o=y.align(t,n),u=function(t){return 0<=t&&t<=1};if(2===r){if(0!==(g=(v=o[0].y)-2*(m=o[1].y)+(_=o[2].y))){var c=-a(m*m-v*_),f=-v+m;return[-(c+f)/g,-(-c+f)/g].filter(u)}return m!==_&&0===g?[(2*m-_)/(2*m-2*_)].filter(u):[]}var h=o[0].y,p=o[1].y,d=o[2].y,g=3*p-h-3*d+o[3].y,v=3*h-6*p+3*d,m=-3*h+3*p,_=h;if(y.approximately(g,0)){if(y.approximately(v,0))return y.approximately(m,0)?[]:[-_/m].filter(u);var b=2*v;return[((x=a(m*m-4*v*_))-m)/b,(-m-x)/b].filter(u)}var x,w,k=(o=(3*(m/=g)-(v/=g)*v)/3)/3,z=(x=(2*v*v*v-9*v*m+27*(_/=g))/27)/2,A=z*z+k*k*k;if(A<0){var O=-o/3,S=a(O*O*O),M=-x/(2*S),E=i(M<-1?-1:M>1?1:M),C=2*s(S);return[C*e(E/3)-v/3,C*e((E+l)/3)-v/3,C*e((E+2*l)/3)-v/3].filter(u)}if(0===A)return[2*(w=z<0?s(-z):-s(z))-v/3,-w-v/3].filter(u);var T=a(A);return[(w=s(-z+T))-s(z+T)-v/3].filter(u)},droots:function(t){if(3===t.length){var n=t[0],e=t[1],r=t[2],i=n-2*e+r;if(0!==i){var o=-a(e*e-n*r),u=-n+e;return[-(o+u)/i,-(-o+u)/i]}return e!==r&&0===i?[(2*e-r)/(2*(e-r))]:[]}if(2===t.length)return(n=t[0])!==(e=t[1])?[n/(n-e)]:[]},curvature:function(t,e,r,i){var o,s,c,l,f,h,p=y.derive(e),d=p[0],g=p[1],v=y.compute(t,d),m=y.compute(t,g),_=v.x*v.x+v.y*v.y;if(r?(o=a(u(v.y*m.z-m.y*v.z,2)+u(v.z*m.x-m.z*v.x,2)+u(v.x*m.y-m.x*v.y,2)),s=u(_+v.z*v.z,1.5)):(o=v.x*m.y-v.y*m.x,s=u(_,1.5)),0===o||0===s)return{k:0,r:0};if(f=o/s,h=s/o,!i){var b=y.curvature(t-.001,e,r,!0).k,x=y.curvature(t+.001,e,r,!0).k;l=(x-f+(f-b))/2,c=(n(x-f)+n(f-b))/2}return{k:f,r:h,dk:l,adk:c}},inflections:function(t){if(t.length<4)return[];var n=y.align(t,{p1:t[0],p2:t.slice(-1)[0]}),e=n[2].x*n[1].y,r=n[3].x*n[1].y,i=n[1].x*n[2].y,o=18*(-3*e+2*r+3*i-(f=n[3].x*n[2].y)),a=18*(3*e-r-3*i),u=18*(i-e);if(y.approximately(o,0)){if(!y.approximately(a,0)){var s=-u/a;if(0<=s&&s<=1)return[s]}return[]}var c=a*a-4*o*u,l=Math.sqrt(c),f=2*o;return y.approximately(f,0)?[]:[(l-a)/f,-(a+l)/f].filter((function(t){return 0<=t&&t<=1}))},bboxoverlap:function(t,e){var r,i,o,a,u,s=["x","y"],c=s.length;for(r=0;r=u)return!1;return!0},expandbox:function(t,n){n.x.mint.x.max&&(t.x.max=n.x.max),n.y.max>t.y.max&&(t.y.max=n.y.max),n.z&&n.z.max>t.z.max&&(t.z.max=n.z.max),t.x.mid=(t.x.min+t.x.max)/2,t.y.mid=(t.y.min+t.y.max)/2,t.z&&(t.z.mid=(t.z.min+t.z.max)/2),t.x.size=t.x.max-t.x.min,t.y.size=t.y.max-t.y.min,t.z&&(t.z.size=t.z.max-t.z.min)},pairiteration:function(t,n,e){var r=t.bbox(),i=n.bbox(),o=1e5,a=e||.5;if(r.x.size+r.y.sizeE||E>C)&&(M+=l),M>C&&(a=C,C=M,M=a)):C2)for(a=0;a4){if(1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");o=!0}}else if(6!==a&&8!==a&&9!==a&&12!==a&&1!==arguments.length)throw new Error("Only new Bezier(point[]) is accepted for 4th and higher order curves");var u=!o&&(9===a||12===a)||t&&t[0]&&void 0!==t[0].z;this._3d=u;for(var s=[],c=0,f=u?3:2;c1e-4)return void(t._linear=!1);t._linear=!0}(this),this._t1=0,this._t2=1,this.update()},p=Ni;function d(t,n,e,r,i){void 0===i&&(i=.5);var o=l.projectionratio(i,t),a=1-o,u={x:o*n.x+a*r.x,y:o*n.y+a*r.y},s=l.abcratio(i,t);return{A:{x:e.x+(e.x-u.x)/s,y:e.y+(e.y-u.y)/s},B:e,C:u}}h.SVGtoBeziers=function(t){return p(h,t)},h.quadraticFromPoints=function(t,n,e,r){if(void 0===r&&(r=.5),0===r)return new h(n,n,e);if(1===r)return new h(t,n,n);var i=d(2,t,n,e,r);return new h(t,i.A,e)},h.cubicFromPoints=function(t,n,e,r,i){void 0===r&&(r=.5);var o=d(3,t,n,e,r);void 0===i&&(i=l.dist(n,o.C));var a=i*(1-r)/r,u=l.dist(t,e),s=(e.x-t.x)/u,c=(e.y-t.y)/u,f=i*s,p=i*c,y=a*s,g=a*c,v=n.x-f,m=n.y-p,_=n.x+y,b=n.y+g,x=o.A,w=x.x+(v-x.x)/(1-r),k=x.y+(m-x.y)/(1-r),z=x.x+(_-x.x)/r,A=x.y+(b-x.y)/r,O={x:t.x+(w-t.x)/r,y:t.y+(k-t.y)/r},S={x:e.x+(z-e.x)/(1-r),y:e.y+(A-e.y)/(1-r)};return new h(t,O,S,e)};var y=function(){return l};h.getUtils=y,h.PolyBezier=f,h.prototype={getUtils:y,valueOf:function(){return this.toString()},toString:function(){return l.pointsToString(this.points)},toSVG:function(t){if(this._3d)return!1;for(var n=this.points,e=["M",n[0].x,n[0].y,2===this.order?"Q":"C"],r=1,i=n.length;r0},length:function(){return l.length(this.derivative.bind(this))},_lut:[],getLUT:function(t){if(this.verify(),t=t||100,this._lut.length===t)return this._lut;this._lut=[],t--;for(var n=0;n<=t;n++)this._lut.push(this.compute(n/t));return this._lut},on:function(t,n){n=n||5;for(var e,r=this.getLUT(),i=[],o=0,a=0;a1;){for(r=[],a=0,u=e.length-1;a=0&&t<=1})),i=i.concat(r[e].sort(l.numberSort))}.bind(this)),i=i.sort(l.numberSort).filter((function(t,n){return i.indexOf(t)===n})),r.values=i,r},bbox:function(){var t=this.extrema(),n={};return this.dims.forEach(function(e){n[e]=l.getminmax(this,e,t[e])}.bind(this)),n},overlaps:function(t){var n=this.bbox(),e=t.bbox();return l.bboxoverlap(n,e)},offset:function(t,n){if(void 0!==n){var e=this.get(t),r=this.normal(t),i={c:e,n:r,x:e.x+r.x*n,y:e.y+r.y*n};return this._3d&&(i.z=e.z+r.z*n),i}if(this._linear){var o=this.normal(0),a=this.points.map((function(n){var e={x:n.x+t*o.x,y:n.y+t*o.y};return n.z&&r.z&&(e.z=n.z+t*o.z),e}));return[new h(a)]}return this.reduce().map((function(n){return n._linear?n.offset(t)[0]:n.scale(t)}))},simple:function(){if(3===this.order){var t=l.angle(this.points[0],this.points[3],this.points[1]),e=l.angle(this.points[0],this.points[3],this.points[2]);if(t>0&&e<0||t<0&&e>0)return!1}var r=this.normal(0),i=this.normal(1),o=r.x*i.x+r.y*i.y;return this._3d&&(o+=r.z*i.z),n(a(o))1,u.endcap.virtual=o0&&(i=i.concat(n))})),i},arcs:function(t){t=t||.5;return this._iterate(t,[])},_error:function(t,e,r,i){var o=(i-r)/4,a=this.get(r+o),u=this.get(i-o),s=l.dist(t,e),c=l.dist(t,a),f=l.dist(t,u);return n(c-s)+n(f-s)},_iterate:function(t,n){var e,r=0,a=1;do{e=0,a=1;var u,s,c,f,h,p=this.get(r),d=!1,y=!1,g=a,v=1;do{if(y=d,f=c,g=(r+a)/2,u=this.get(g),s=this.get(a),(c=l.getccenter(p,u,s)).interval={start:r,end:a},d=this._error(c,p,r,a)<=t,(h=y&&!d)||(v=a),d){if(a>=1){if(c.interval.end=v=1,f=c,a>1){var m={x:c.x+c.r*i(c.e),y:c.y+c.r*o(c.e)};c.e+=l.angle({x:c.x,y:c.y},m,this.get(1))}break}a+=(a-r)/2}else a=g}while(!h&&e++<100);if(e>=100)break;f=f||c,n.push(f),r=v}while(a<1);return n}},t.exports=h}()})),Ri=Pi;function Ii(t,n){if(null==t)return{};var e,r,i=function(t,n){if(null==t)return{};var e,r,i={},o=Object.keys(t);for(r=0;r=0||(i[e]=t[e]);return i}(t,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(t,e)&&(i[e]=t[e])}return i}function Di(t,n){return function(t){if(Array.isArray(t))return t}(t)||function(t,n){if(!(Symbol.iterator in Object(t))&&"[object Arguments]"!==Object.prototype.toString.call(t))return;var e=[],r=!0,i=!1,o=void 0;try{for(var a,u=t[Symbol.iterator]();!(r=(a=u.next()).done)&&(e.push(a.value),!n||e.length!==n);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return e}(t,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Ui(t){return function(t){if(Array.isArray(t)){for(var n=0,e=new Array(t.length);nt.length)&&(n=t.length);for(var e=0,r=new Array(n);et.cooldownTicks||new Date-t.startTickTime>t.cooldownTime||t.d3AlphaMin>0&&t.forceLayout.alpha()0){var a=Math.atan2(r.y-e.y,r.x-e.x),u=i*n,s={x:(e.x+r.x)/2+u*Math.cos(a-Math.PI/2),y:(e.y+r.y)/2+u*Math.sin(a-Math.PI/2)};t.__controlPoints=[s.x,s.y]}else{var c=70*n;t.__controlPoints=[r.x,r.y-c,r.x+c,r.y]}}));var l=[],f=[],h=c;if(t.linkCanvasObject){var p=[],d=[];c.forEach((function(t){return({before:l,after:f,replace:p}[a(t)]||d).push(t)})),h=[].concat(Qi(l),f,d),l=l.concat(p)}u.save(),l.forEach((function(n){return t.linkCanvasObject(n,u,t.globalScale)})),u.restore();var y=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],e=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=(n instanceof Array?n.length?n:[void 0]:[n]).map((function(t){return{keyAccessor:t,isProp:!(t instanceof Function)}})),o=t.reduce((function(t,n){var r=t,o=n;return i.forEach((function(t,n){var a,u=t.keyAccessor;if(t.isProp){var s=o,c=s[u],l=Ii(s,[u].map(Fi));a=c,o=l}else a=u(o,n);n+11&&void 0!==arguments[1]?arguments[1]:1;r===i.length?Object.keys(n).forEach((function(t){return n[t]=e(n[t])})):Object.values(n).forEach((function(n){return t(n,r+1)}))}(o);var a=o;return r&&(a=[],function t(n){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];e.length===i.length?a.push({keys:e,vals:n}):Object.entries(n).forEach((function(n){var r=Di(n,2),i=r[0],o=r[1];return t(o,[].concat(Ui(e),[i]))}))}(o),n instanceof Array&&0===n.length&&1===a.length&&(a[0].keys=[])),a}(h,[e,r,i]);u.save(),Object.entries(y).forEach((function(n){var e=Zi(n,2),r=e[0],o=e[1],a=r&&"undefined"!==r?r:"rgba(0,0,0,0.15)";Object.entries(o).forEach((function(n){var e=Zi(n,2),r=e[0],o=e[1],c=(r||1)/t.globalScale+s;Object.entries(o).forEach((function(t){var n=Zi(t,2),e=(n[0],n[1]),r=i(e[0]);u.beginPath(),e.forEach((function(t){var n=t.source,e=t.target;if(n&&e&&n.hasOwnProperty("x")&&e.hasOwnProperty("x")){u.moveTo(n.x,n.y);var r=t.__controlPoints;r?u[2===r.length?"quadraticCurveTo":"bezierCurveTo"].apply(u,Qi(r).concat([e.x,e.y])):u.lineTo(e.x,e.y)}})),u.strokeStyle=a,u.lineWidth=c,u.setLineDash(r||[]),u.stroke()}))}))})),u.restore(),u.save(),f.forEach((function(n){return t.linkCanvasObject(n,u,t.globalScale)})),u.restore()}(),!t.isShadow&&(n=Dr(t.linkDirectionalArrowLength),e=Dr(t.linkDirectionalArrowRelPos),r=Dr(t.linkVisibility),i=Dr(t.linkDirectionalArrowColor||t.linkColor),o=Dr(t.nodeVal),(a=t.ctx).save(),t.graphData.links.filter(r).forEach((function(r){var u=n(r);if(u&&!(u<0)){var s=r.source,c=r.target;if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=Math.sqrt(Math.max(0,o(s)||1))*t.nodeRelSize,f=Math.sqrt(Math.max(0,o(c)||1))*t.nodeRelSize,h=Math.min(1,Math.max(0,e(r))),p=i(r)||"rgba(0,0,0,0.28)",d=u/1.6/2,y=r.__controlPoints&&Wi(Ri,[s.x,s.y].concat(Qi(r.__controlPoints),[c.x,c.y])),g=y?function(t){return y.get(t)}:function(t){return{x:s.x+(c.x-s.x)*t||0,y:s.y+(c.y-s.y)*t||0}},v=y?y.length():Math.sqrt(Math.pow(c.x-s.x,2)+Math.pow(c.y-s.y,2)),m=l+u+(v-l-f-u)*h,_=g(m/v),b=g((m-u)/v),x=g((m-.8*u)/v),w=Math.atan2(_.y-b.y,_.x-b.x)-Math.PI/2;a.beginPath(),a.moveTo(_.x,_.y),a.lineTo(b.x+d*Math.cos(w),b.y+d*Math.sin(w)),a.lineTo(x.x,x.y),a.lineTo(b.x-d*Math.cos(w),b.y-d*Math.sin(w)),a.fillStyle=p,a.fill()}}})),a.restore()),!t.isShadow&&function(){var n=Dr(t.linkDirectionalParticles),e=Dr(t.linkDirectionalParticleSpeed),r=Dr(t.linkDirectionalParticleWidth),i=Dr(t.linkVisibility),o=Dr(t.linkDirectionalParticleColor||t.linkColor),a=t.ctx;a.save(),t.graphData.links.filter(i).forEach((function(i){var u=n(i);if(i.hasOwnProperty("__photons")&&i.__photons.length){var s=i.source,c=i.target;if(s&&c&&s.hasOwnProperty("x")&&c.hasOwnProperty("x")){var l=e(i),f=i.__photons||[],h=Math.max(0,r(i)/2)/Math.sqrt(t.globalScale),p=o(i)||"rgba(0,0,0,0.28)";a.fillStyle=p;var d=i.__controlPoints?Wi(Ri,[s.x,s.y].concat(Qi(i.__controlPoints),[c.x,c.y])):null,y=0,g=!1;f.forEach((function(t){var n=!!t.__singleHop;if(t.hasOwnProperty("__progressRatio")||(t.__progressRatio=n?0:y/u),!n&&y++,t.__progressRatio+=l,t.__progressRatio>=1){if(n)return void(g=!0);t.__progressRatio=t.__progressRatio%1}var e=t.__progressRatio,r=d?d.get(e):{x:s.x+(c.x-s.x)*e||0,y:s.y+(c.y-s.y)*e||0};a.beginPath(),a.arc(r.x,r.y,h,0,2*Math.PI,!1),a.fill()})),g&&(i.__photons=i.__photons.filter((function(t){return!t.__singleHop||t.__progressRatio<=1})))}}})),a.restore()}(),function(){var n=Dr(t.nodeVisibility),e=Dr(t.nodeVal),r=Dr(t.nodeColor),i=Dr(t.nodeCanvasObjectMode),o=t.ctx,a=t.isShadow/t.globalScale,u=t.graphData.nodes.filter(n);o.save(),u.forEach((function(n){var u=i(n);if(!t.nodeCanvasObject||"before"!==u&&"replace"!==u||(t.nodeCanvasObject(n,o,t.globalScale,t.isShadow),"replace"!==u)){var s=Math.sqrt(Math.max(0,e(n)||1))*t.nodeRelSize+a;o.beginPath(),o.arc(n.x,n.y,s,0,2*Math.PI,!1),o.fillStyle=r(n)||"rgba(31, 120, 180, 0.92)",o.fill(),t.nodeCanvasObject&&"after"===u&&t.nodeCanvasObject(n,t.ctx,t.globalScale)}else o.restore()})),o.restore()}(),this},emitParticle:function(t,n){return n&&(!n.__photons&&(n.__photons=[]),n.__photons.push({__singleHop:!0})),this}},stateInit:function(){return{forceLayout:Oi().force("link",bi()).force("charge",Si()).force("center",$r()).force("dagRadial",null).stop(),engineRunning:!1}},init:function(t,n){n.ctx=t},update:function(t){if(t.engineRunning=!1,t.onUpdate(),null!==t.nodeAutoColorBy&&no(t.graphData.nodes,Dr(t.nodeAutoColorBy),t.nodeColor),null!==t.linkAutoColorBy&&no(t.graphData.links,Dr(t.linkAutoColorBy),t.linkColor),t.graphData.links.forEach((function(n){n.source=n[t.linkSource],n.target=n[t.linkTarget]})),!t.isShadow){var n=Dr(t.linkDirectionalParticles);t.graphData.links.forEach((function(t){var e=Math.round(Math.abs(n(t)));e?t.__photons=Qi(Array(e)).map((function(){return{}})):delete t.__photons}))}t.forceLayout.stop().alpha(1).nodes(t.graphData.nodes);var e=t.forceLayout.force("link");e&&e.id((function(n){return n[t.nodeId]})).links(t.graphData.links);var r=t.dagMode&&function(t,n){var e=t.nodes,r=t.links,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.nodeFilter,a=void 0===o?function(){return!0}:o,u=i.onLoopError,s=void 0===u?function(t){throw"Invalid DAG structure! Found cycle in node path: ".concat(t.join(" -> "),".")}:u,c={};e.forEach((function(t){return c[n(t)]={data:t,out:[],depth:-1,skip:!a(t)}})),r.forEach((function(t){var e=t.source,r=t.target,i=s(e),o=s(r);if(!c.hasOwnProperty(i))throw"Missing source node with id: ".concat(i);if(!c.hasOwnProperty(o))throw"Missing target node with id: ".concat(o);var a=c[i],u=c[o];function s(t){return"object"===Hi(t)?n(t):t}a.out.push(u)}));var l=[];h(Object.values(c));var f=Object.assign.apply(Object,[{}].concat(Qi(Object.entries(c).filter((function(t){return!Zi(t,2)[1].skip})).map((function(t){var n=Zi(t,2);return Vi({},n[0],n[1].depth)})))));return f;function h(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=0,o=t.length;ia.depth&&(a.depth=r,h(a.out,[].concat(Qi(e),[a]),r+(a.skip?0:1)))}}}(t.graphData,(function(n){return n[t.nodeId]}),{nodeFilter:t.dagNodeFilter,onLoopError:t.onDagError||void 0}),i=Math.max.apply(Math,Qi(Object.values(r||[]))),o=t.dagLevelDistance||t.graphData.nodes.length/(i||1)*2*(-1!==["radialin","radialout"].indexOf(t.dagMode)?.7:1);if(t.dagMode){var a=function(n,e){return function(a){return n?(r[a[t.nodeId]]-i/2)*o*(e?-1:1):void 0}},u=a(-1!==["lr","rl"].indexOf(t.dagMode),"rl"===t.dagMode),s=a(-1!==["td","bu"].indexOf(t.dagMode),"bu"===t.dagMode);t.graphData.nodes.filter(t.dagNodeFilter).forEach((function(t){t.fx=u(t),t.fy=s(t)}))}t.forceLayout.force("dagRadial",-1!==["radialin","radialout"].indexOf(t.dagMode)?function(t,n,e,r){var i,o,a,u,s=gi(.1);function c(t){for(var s=0,c=i.length;s1&&(l.vy+=h*y),o>2&&(l.vz+=p*y)}}function l(){if(i){var n,e=i.length;for(a=new Array(e),u=new Array(e),n=0;n0&&t.forceLayout.alpha()1?r-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:0,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=arguments.length,i=new Array(r>3?r-3:0),o=3;o1&&void 0!==arguments[1]?arguments[1]:function(){return!0},e=Dr(t.nodeVal),r=function(n){return Math.sqrt(Math.max(0,e(n)||1))*t.nodeRelSize},i=t.graphData.nodes.filter(n).map((function(t){return{x:t.x,y:t.y,r:r(t)}}));return i.length?{x:[rr(i,(function(t){return t.x-t.r})),er(i,(function(t){return t.x+t.r}))],y:[rr(i,(function(t){return t.y-t.r})),er(i,(function(t){return t.y+t.r}))]}:null},pauseAnimation:function(t){return t.animationFrameRequestId&&(cancelAnimationFrame(t.animationFrameRequestId),t.animationFrameRequestId=null),this},resumeAnimation:function(t){return t.animationFrameRequestId||this._animationCycle(),this},_destructor:function(){this.pauseAnimation(),this.graphData({nodes:[],links:[]})}},uo),stateInit:function(){return{lastSetZoom:1,forceGraph:new eo,shadowGraph:(new eo).cooldownTicks(0).nodeColor("__indexColor").linkColor("__indexColor").isShadow(!0),colorTracker:new Vr}},init:function(t,n){t.innerHTML="";var e=document.createElement("div");e.style.position="relative",t.appendChild(e),n.canvas=document.createElement("canvas"),n.backgroundColor&&(n.canvas.style.background=n.backgroundColor),e.appendChild(n.canvas),n.shadowCanvas=document.createElement("canvas");var r=n.canvas.getContext("2d"),i=n.shadowCanvas.getContext("2d");wt(n.canvas).call(function(){var t,n,e,r,i=Ft,o=Lt,a=qt,u=Bt,s={},c=Mt("start","drag","end"),l=0,f=0;function h(t){t.on("mousedown.drag",p).filter(u).on("touchstart.drag",g).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(){if(!r&&i.apply(this,arguments)){var a=_("mouse",o.apply(this,arguments),At,this,arguments);a&&(wt(ct.view).on("mousemove.drag",d,!0).on("mouseup.drag",y,!0),Rt(ct.view),Nt(),e=!1,t=ct.clientX,n=ct.clientY,a("start"))}}function d(){if(Pt(),!e){var r=ct.clientX-t,i=ct.clientY-n;e=r*r+i*i>f}s.mouse("drag")}function y(){wt(ct.view).on("mousemove.drag mouseup.drag",null),It(ct.view,e),Pt(),s.mouse("end")}function g(){if(i.apply(this,arguments)){var t,n,e=ct.changedTouches,r=o.apply(this,arguments),a=e.length;for(t=0;th}t.zoom("mouse",i(y(t.that.__zoom,t.mouse[0]=At(t.that),t.mouse[1]),t.extent,s))}function l(){r.on("mousemove.zoom mouseup.zoom",null),It(ct.view,t.moved),We(),t.end()}}function w(){if(e.apply(this,arguments)){var t=this.__zoom,n=At(this),o=t.invert(n),a=t.k*(ct.shiftKey?.5:2),u=i(y(d(t,a),n,o),r.apply(this,arguments),s);We(),c>0?wt(this).transition().duration(c).call(v,u,n):wt(this).call(p.transform,u)}}function k(){if(e.apply(this,arguments)){var n,r,i,o,a=ct.touches,u=a.length,s=m(this,arguments,ct.changedTouches.length===u);for(Ye(),r=0;r0&&a.y>0?i.getImageData(a.x*e,a.y*e,1,1):null,c=s?n.colorTracker.lookup(s.data):null;if(c!==n.hoverObj){var l=n.hoverObj,f=l?l.type:null,h=c?c.type:null;f&&f!==h&&n["on".concat(f,"Hover")](null,l.d),h&&n["on".concat(h,"Hover")](c.d,f===h?l.d:null);var p=c&&Dr(n["".concat(c.type.toLowerCase(),"Label")])(c.d)||"";o.style.visibility=p?"visible":"hidden",o.innerHTML=p,n.hoverObj=c}u()}lo(r,n.width,n.height);var d=Xe(n.canvas);n.forceGraph.globalScale(d.k).tickFrame(),Tr.update(),n.animationFrameRequestId=requestAnimationFrame(t)})()},update:function(t){}}),ho=or((function(t,n){!function(){var t="function"==typeof Symbol&&Symbol.for,e=t?Symbol.for("react.element"):60103,r=t?Symbol.for("react.portal"):60106,i=t?Symbol.for("react.fragment"):60107,o=t?Symbol.for("react.strict_mode"):60108,a=t?Symbol.for("react.profiler"):60114,u=t?Symbol.for("react.provider"):60109,s=t?Symbol.for("react.context"):60110,c=t?Symbol.for("react.async_mode"):60111,l=t?Symbol.for("react.concurrent_mode"):60111,f=t?Symbol.for("react.forward_ref"):60112,h=t?Symbol.for("react.suspense"):60113,p=t?Symbol.for("react.suspense_list"):60120,d=t?Symbol.for("react.memo"):60115,y=t?Symbol.for("react.lazy"):60116,g=t?Symbol.for("react.block"):60121,v=t?Symbol.for("react.fundamental"):60117,m=t?Symbol.for("react.responder"):60118,_=t?Symbol.for("react.scope"):60119;function b(t){if("object"==typeof t&&null!==t){var n=t.$$typeof;switch(n){case e:var p=t.type;switch(p){case c:case l:case i:case a:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case s:case f:case y:case d:case u:return g;default:return n}}case r:return n}}}var x=c,w=l,k=s,z=u,A=e,O=f,S=i,M=y,E=d,C=r,T=a,j=o,N=h,P=!1;function R(t){return b(t)===l}n.AsyncMode=x,n.ConcurrentMode=w,n.ContextConsumer=k,n.ContextProvider=z,n.Element=A,n.ForwardRef=O,n.Fragment=S,n.Lazy=M,n.Memo=E,n.Portal=C,n.Profiler=T,n.StrictMode=j,n.Suspense=N,n.isAsyncMode=function(t){return P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),R(t)||b(t)===c},n.isConcurrentMode=R,n.isContextConsumer=function(t){return b(t)===s},n.isContextProvider=function(t){return b(t)===u},n.isElement=function(t){return"object"==typeof t&&null!==t&&t.$$typeof===e},n.isForwardRef=function(t){return b(t)===f},n.isFragment=function(t){return b(t)===i},n.isLazy=function(t){return b(t)===y},n.isMemo=function(t){return b(t)===d},n.isPortal=function(t){return b(t)===r},n.isProfiler=function(t){return b(t)===a},n.isStrictMode=function(t){return b(t)===o},n.isSuspense=function(t){return b(t)===h},n.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===i||t===l||t===a||t===o||t===h||t===p||"object"==typeof t&&null!==t&&(t.$$typeof===y||t.$$typeof===d||t.$$typeof===u||t.$$typeof===s||t.$$typeof===f||t.$$typeof===v||t.$$typeof===m||t.$$typeof===_||t.$$typeof===g)},n.typeOf=b}()})),po=or((function(t){t.exports=ho})),yo=Object.getOwnPropertySymbols,go=Object.prototype.hasOwnProperty,vo=Object.prototype.propertyIsEnumerable;function mo(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var _o,bo=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var n={},e=0;e<10;e++)n["_"+String.fromCharCode(e)]=e;if("0123456789"!==Object.getOwnPropertyNames(n).map((function(t){return n[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,n){for(var e,r,i=mo(t),o=1;o>";return new o("Invalid "+i+" `"+a+"` of type `"+function(t){if(!t.constructor||!t.constructor.name)return"<>";return t.constructor.name}(n[e])+"` supplied to `"+r+"`, expected instance of `"+u+"`.")}return null}))},node:a((function(t,n,e,r,i){return s(t[n])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+e+"`, expected a ReactNode.")})),objectOf:function(t){return a((function(n,e,r,i,a){if("function"!=typeof t)return new o("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var u=n[e],s=c(u);if("object"!==s)return new o("Invalid "+i+" `"+a+"` of type `"+s+"` supplied to `"+r+"`, expected an object.");for(var l in u)if(So(u,l)){var f=t(u,l,r,i,a+"."+l,xo);if(f instanceof Error)return f}return null}))},oneOf:function(t){if(!Array.isArray(t))return Ao(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Mo;function n(n,e,r,a,u){for(var s=n[e],c=0;c>",l=l||u,f!==xo){if(n){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("undefined"!=typeof console){var p=s+":"+u;!e[p]&&r<3&&(Ao("You are manually calling a React.PropTypes validation function for the `"+l+"` prop on `"+s+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),e[p]=!0,r++)}}return null==a[u]?i?null===a[u]?new o("The "+c+" `"+l+"` is marked as required in `"+s+"`, but its value is `null`."):new o("The "+c+" `"+l+"` is marked as required in `"+s+"`, but its value is `undefined`."):null:t(a,u,s,c,l)}var a=i.bind(null,!1);return a.isRequired=i.bind(null,!0),a}function u(t){return a((function(n,e,r,i,a,u){var s=n[e];return c(s)!==t?new o("Invalid "+i+" `"+a+"` of type `"+l(s)+"` supplied to `"+r+"`, expected `"+t+"`."):null}))}function s(n){switch(typeof n){case"number":case"string":case"undefined":return!0;case"boolean":return!n;case"object":if(Array.isArray(n))return n.every(s);if(null===n||t(n))return!0;var r=function(t){var n=t&&(e&&t[e]||t["@@iterator"]);if("function"==typeof n)return n}(n);if(!r)return!1;var i,o=r.call(n);if(r!==n.entries){for(;!(i=o.next()).done;)if(!s(i.value))return!1}else for(;!(i=o.next()).done;){var a=i.value;if(a&&!s(a[1]))return!1}return!0;default:return!1}}function c(t){var n=typeof t;return Array.isArray(t)?"array":t instanceof RegExp?"object":function(t,n){return"symbol"===t||!!n&&("Symbol"===n["@@toStringTag"]||"function"==typeof Symbol&&n instanceof Symbol)}(n,t)?"symbol":n}function l(t){if(null==t)return""+t;var n=c(t);if("object"===n){if(t instanceof Date)return"date";if(t instanceof RegExp)return"regexp"}return n}function f(t){var n=l(t);switch(n){case"array":case"object":return"an "+n;case"boolean":case"date":case"regexp":return"a "+n;default:return n}}return o.prototype=Error.prototype,r.checkPropTypes=Oo,r.resetWarningCache=Oo.resetWarningCache,r.PropTypes=r,r},Co=or((function(t){var n=po;t.exports=Eo(n.isElement,!0)})),To={width:Co.number,height:Co.number,graphData:Co.shape({nodes:Co.arrayOf(Co.object).isRequired,links:Co.arrayOf(Co.object).isRequired}),backgroundColor:Co.string,nodeRelSize:Co.number,nodeId:Co.string,nodeLabel:Co.oneOfType([Co.string,Co.func]),nodeVal:Co.oneOfType([Co.number,Co.string,Co.func]),nodeVisibility:Co.oneOfType([Co.bool,Co.string,Co.func]),nodeColor:Co.oneOfType([Co.string,Co.func]),nodeAutoColorBy:Co.oneOfType([Co.string,Co.func]),linkSource:Co.string,linkTarget:Co.string,linkLabel:Co.oneOfType([Co.string,Co.func]),linkVisibility:Co.oneOfType([Co.bool,Co.string,Co.func]),linkHoverPrecision:Co.number,linkColor:Co.oneOfType([Co.string,Co.func]),linkAutoColorBy:Co.oneOfType([Co.string,Co.func]),linkWidth:Co.oneOfType([Co.number,Co.string,Co.func]),linkCurvature:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalArrowLength:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalArrowColor:Co.oneOfType([Co.string,Co.func]),linkDirectionalArrowRelPos:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticles:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleSpeed:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleWidth:Co.oneOfType([Co.number,Co.string,Co.func]),linkDirectionalParticleColor:Co.oneOfType([Co.string,Co.func]),dagMode:Co.oneOf(["td","bu","lr","rl","zin","zout","radialin","radialout"]),dagLevelDistance:Co.number,dagNodeFilter:Co.func,onDagError:Co.func,d3AlphaMin:Co.number,d3AlphaDecay:Co.number,d3VelocityDecay:Co.number,warmupTicks:Co.number,cooldownTicks:Co.number,cooldownTime:Co.number,onEngineTick:Co.func,onEngineStop:Co.func,getGraphBbox:Co.func},jo={zoomToFit:Co.func,onNodeClick:Co.func,onNodeRightClick:Co.func,onNodeHover:Co.func,onNodeDrag:Co.func,onNodeDragEnd:Co.func,onLinkClick:Co.func,onLinkRightClick:Co.func,onLinkHover:Co.func,onBackgroundClick:Co.func,onBackgroundRightClick:Co.func,enablePointerInteraction:Co.bool,enableNodeDrag:Co.bool},No=(Co.bool,Co.number,Co.number,Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.bool,Co.string,Co.func]),Co.number,Co.number,Co.oneOfType([Co.number,Co.string,Co.func]),Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.object,Co.string,Co.func]),Co.oneOfType([Co.bool,Co.string,Co.func]),Co.func,Co.number,Co.number,Co.oneOf(["d3","ngraph"]),Co.object,Co.oneOf([1,2,3]),Object.assign({},To,jo,{linkLineDash:Co.oneOfType([Co.arrayOf(Co.number),Co.string,Co.func]),nodeCanvasObject:Co.func,nodeCanvasObjectMode:Co.oneOfType([Co.string,Co.func]),linkCanvasObject:Co.func,linkCanvasObjectMode:Co.oneOfType([Co.string,Co.func]),enableZoomPanInteraction:Co.bool,onZoom:Co.func,onZoomEnd:Co.func}));const Po=function(t,r){var i="object"===u(r)?r:{wrapperElementType:r,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},l=i.wrapperElementType,f=void 0===l?"div":l,h=i.methodNames,p=void 0===h?[]:h,d=i.initPropNames,y=void 0===d?[]:d;return n.forwardRef((function(r,i){var u=n.useRef(),l=s(n.useState({}),2),h=l[0],d=l[1];n.useEffect((function(){return d(r)}));var g=n.useMemo((function(){var n=a(y.filter((function(t){return r.hasOwnProperty(t)})).map((function(t){return[t,r[t]]})));return t(n)}),[]);n.useLayoutEffect((function(){g(u.current)}),[]),n.useEffect((function(){return g._destructor instanceof Function?g._destructor:void 0}),[]);var v=n.useCallback((function(t){for(var n=arguments.length,e=new Array(n>1?n-1:0),r=1;r