d3-flame-graph
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -9,4 +9,4 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
else | ||
root["colorMapper"] = factory(); | ||
})(flamegraph, function() { | ||
root["flamegraph"] = root["flamegraph"] || {}, root["flamegraph"]["colorMapper"] = factory(); | ||
})(window, function() { | ||
return /******/ (function(modules) { // webpackBootstrap | ||
@@ -13,0 +13,0 @@ /******/ // The module cache |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.colorMapper=e():t.colorMapper=e()}(flamegraph,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";function n(t){if(t.highlight)return"rgb(230, 0, 230)";return`rgb(${function(t,e,r){const n=r,o=1-n;return[Math.round(t[0]*n+e[0]*o),Math.round(t[1]*n+e[1]*o),Math.round(t[2]*n+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`}function o(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,r=0;const n=e.split("`");return n.length>1&&(e=n[n.length-1]),e=e.split("(")[0],r=function(t){var e=0,r=0,n=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=n*(t.charCodeAt(o)%10),r+=9*n,n*=.7;r>0&&(e/=r)}return e}(e),"rgb("+(0+Math.round(55*(1-r)))+","+(0+Math.round(230*(1-r)))+","+(200+Math.round(55*r))+")"}function u(t,e){let r=e;const{v8_jit:n,javascript:o,optimized:u}=t.data.extras||{};if(n&&!o&&(r="#dadada"),o){let e=(u||0)/t.value,n=255,o=0,i=0;e<.4?(e*=2.5,n=240-200*e):e<.9?(e=2*(e-.4),n=0,i=200-200*e,o=100*e):(e=10*(e-.9),n=0,i=0,o=100+150*e),r=`rgb(${n} , ${o}, ${i})`}return r}r.r(e),r.d(e,"allocationColorMapper",(function(){return n})),r.d(e,"offCpuColorMapper",(function(){return o})),r.d(e,"nodeJsColorMapper",(function(){return u}))}])})); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.colorMapper=e():(t.flamegraph=t.flamegraph||{},t.flamegraph.colorMapper=e())}(window,(function(){return function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=0)}([function(t,e,r){"use strict";function n(t){if(t.highlight)return"rgb(230, 0, 230)";return`rgb(${function(t,e,r){const n=r,o=1-n;return[Math.round(t[0]*n+e[0]*o),Math.round(t[1]*n+e[1]*o),Math.round(t[2]*n+e[2]*o)]}([0,255,40],[196,245,233],t.data.value/t.value).join()})`}function o(t){if(t.highlight)return"#E600E6";let e=t.data.n||t.data.name,r=0;const n=e.split("`");return n.length>1&&(e=n[n.length-1]),e=e.split("(")[0],r=function(t){var e=0,r=0,n=1;if(t){for(var o=0;o<t.length&&!(o>6);o++)e+=n*(t.charCodeAt(o)%10),r+=9*n,n*=.7;r>0&&(e/=r)}return e}(e),"rgb("+(0+Math.round(55*(1-r)))+","+(0+Math.round(230*(1-r)))+","+(200+Math.round(55*r))+")"}function u(t,e){let r=e;const{v8_jit:n,javascript:o,optimized:u}=t.data.extras||{};if(n&&!o&&(r="#dadada"),o){let e=(u||0)/t.value,n=255,o=0,a=0;e<.4?(e*=2.5,n=240-200*e):e<.9?(e=2*(e-.4),n=0,a=200-200*e,o=100*e):(e=10*(e-.9),n=0,a=0,o=100+150*e),r=`rgb(${n} , ${o}, ${a})`}return r}r.r(e),r.d(e,"allocationColorMapper",(function(){return n})),r.d(e,"offCpuColorMapper",(function(){return o})),r.d(e,"nodeJsColorMapper",(function(){return u}))}])})); |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.tooltip=n():t.tooltip=n()}(flamegraph,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}({6:function(t,n,e){"use strict";function r(){}e.r(n),e.d(n,"defaultFlamegraphTooltip",(function(){return we}));var i=function(t){return null==t?r:function(){return this.querySelector(t)}};function o(){return[]}var u=function(t){return null==t?o:function(){return this.querySelectorAll(t)}},a=function(t){return function(){return this.matches(t)}},s=function(t){return new Array(t.length)};function l(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}l.prototype={constructor:l,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 c(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new l(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function f(t,n,e,r,i,o,u){var a,s,c,f={},h=n.length,p=o.length,d=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(d[a]=c="$"+u.call(s,s.__data__,a,n),c in f?i[a]=s:f[c]=s);for(a=0;a<p;++a)(s=f[c="$"+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],f[c]=null):e[a]=new l(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&f[d[a]]===s&&(i[a]=s)}function h(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var p="http://www.w3.org/1999/xhtml",d={svg:"http://www.w3.org/2000/svg",xhtml:p,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},v=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),d.hasOwnProperty(n)?{space:d[n],local:t}:t};function y(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,n){return function(){this.setAttribute(t,n)}}function m(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function b(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)}}var x=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function A(t){return function(){this.style.removeProperty(t)}}function N(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function E(t,n){return t.style.getPropertyValue(n)||x(t).getComputedStyle(t,null).getPropertyValue(n)}function M(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function P(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function O(t){return t.trim().split(/^|\s+/)}function j(t){return t.classList||new q(t)}function q(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function C(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function T(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function X(t){return function(){C(this,t)}}function R(t){return function(){T(this,t)}}function I(t,n){return function(){(n.apply(this,arguments)?C:T)(this,t)}}q.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L(){this.textContent=""}function D(t){return function(){this.textContent=t}}function H(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Y(){this.innerHTML=""}function $(t){return function(){this.innerHTML=t}}function B(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function z(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===p&&n.documentElement.namespaceURI===p?n.createElement(t):n.createElementNS(e,t)}}function F(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var G=function(t){var n=v(t);return(n.local?F:U)(n)};function J(){return null}function K(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function W(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var Z={},tt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function nt(t,n,e){return t=et(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function et(t,n,e){return function(r){var i=tt;tt=r;try{t.call(this,this.__data__,n,e)}finally{tt=i}}}function rt(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 it(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function ot(t,n,e){var r=Z.hasOwnProperty(t.type)?nt:et;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function ut(t,n,e){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function at(t,n){return function(){return ut(this,t,n)}}function st(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}var lt=[null];function ct(t,n){this._groups=t,this._parents=n}function ft(){return new ct([[document.documentElement]],lt)}ct.prototype=ft.prototype={constructor:ct,select:function(t){"function"!=typeof t&&(t=i(t));for(var n=this._groups,e=n.length,r=new Array(e),o=0;o<e;++o)for(var u,a,s=n[o],l=s.length,c=r[o]=new Array(l),f=0;f<l;++f)(u=s[f])&&(a=t.call(u,u.__data__,f,s))&&("__data__"in u&&(a.__data__=u.__data__),c[f]=a);return new ct(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ct(r,i)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new ct(r,this._parents)},data:function(t,n){if(!t)return y=new Array(this.size()),h=-1,this.each((function(t){y[++h]=t})),y;var e,r=n?f:c,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),h=0;h<u;++h){var p=i[h],d=o[h],v=d.length,y=t.call(p,p&&p.__data__,h,i),g=y.length,_=s[h]=new Array(g),m=a[h]=new Array(g);r(p,d,_,m,l[h]=new Array(v),y,n);for(var w,b,x=0,A=0;x<g;++x)if(w=_[x]){for(x>=A&&(A=x+1);!(b=m[A])&&++A<g;);w._next=b||null}}return(a=new ct(a,i))._enter=s,a._exit=l,a},enter:function(){return new ct(this._enter||this._groups.map(s),this._parents)},exit:function(){return new ct(this._exit||this._groups.map(s),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new ct(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=h);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new ct(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=v(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?g:y:"function"==typeof n?e.local?b:w:e.local?m:_)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?A:"function"==typeof n?k:N)(t,n,null==e?"":e)):E(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?M:"function"==typeof n?P:S)(t,n)):this.node()[t]},classed:function(t,n){var e=O(t+"");if(arguments.length<2){for(var r=j(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?I:n?X:R)(e,n))},text:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?H:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?B:$)(t)):this.node().innerHTML},raise:function(){return this.each(V)},lower:function(){return this.each(z)},append:function(t){var n="function"==typeof t?t:G(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:G(t),r=null==n?J:"function"==typeof n?n:i(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(K)},clone:function(t){return this.select(t?W:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=rt(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ot:it,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?st:at)(t,n))}};var ht=ft,pt={value:function(){}};function dt(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new vt(r)}function vt(t){this._=t}function yt(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=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 gt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function _t(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=pt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}vt.prototype=dt.prototype={constructor:vt,on:function(t,n){var e,r=this._,i=yt(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=_t(r[e],t.name,n);else if(null==n)for(e in r)r[e]=_t(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=gt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new vt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var mt,wt,bt=dt,xt=0,At=0,Nt=0,kt=0,Et=0,Mt=0,St="object"==typeof performance&&performance.now?performance:Date,Pt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ot(){return Et||(Pt(jt),Et=St.now()+Mt)}function jt(){Et=0}function qt(){this._call=this._time=this._next=null}function Ct(t,n,e){var r=new qt;return r.restart(t,n,e),r}function Tt(){Et=(kt=St.now())+Mt,xt=At=0;try{!function(){Ot(),++xt;for(var t,n=mt;n;)(t=Et-n._time)>=0&&n._call.call(null,t),n=n._next;--xt}()}finally{xt=0,function(){var t,n,e=mt,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:mt=n);wt=t,Rt(r)}(),Et=0}}function Xt(){var t=St.now(),n=t-kt;n>1e3&&(Mt-=n,kt=t)}function Rt(t){xt||(At&&(At=clearTimeout(At)),t-Et>24?(t<1/0&&(At=setTimeout(Tt,t-St.now()-Mt)),Nt&&(Nt=clearInterval(Nt))):(Nt||(kt=St.now(),Nt=setInterval(Xt,1e3)),xt=1,Pt(Tt)))}qt.prototype=Ct.prototype={constructor:qt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Ot():+e)+(null==n?0:+n),this._next||wt===this||(wt?wt._next=this:mt=this,wt=this),this._call=t,this._time=e,Rt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rt())}};var It=function(t,n,e){var r=new qt;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Lt=bt("start","end","cancel","interrupt"),Dt=[],Ht=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,f,h;if(1!==e.state)return a();for(l in i)if((h=i[l]).name===e.name){if(3===h.state)return It(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(It((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(s))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(f=e.tween.length),l=0,c=-1;l<f;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=h);r.length=c+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Ct((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Lt,tween:Dt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Yt(t,n){var e=Bt(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function $t(t,n){var e=Bt(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Bt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var Vt,zt,Ut,Ft,Gt=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Jt=180/Math.PI,Kt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Qt=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Jt,skewX:Math.atan(s)*Jt,scaleX:u,scaleY:a}};function Wt(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Gt(t,i)},{i:s-2,x:Gt(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Gt(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Gt(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Gt(t,e)},{i:a-2,x:Gt(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var Zt=Wt((function(t){return"none"===t?Kt:(Vt||(Vt=document.createElement("DIV"),zt=document.documentElement,Ut=document.defaultView),Vt.style.transform=t,t=Ut.getComputedStyle(zt.appendChild(Vt),null).getPropertyValue("transform"),zt.removeChild(Vt),t=t.slice(7,-1).split(","),Qt(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),tn=Wt((function(t){return null==t?Kt:(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",t),(t=Ft.transform.baseVal.consolidate())?(t=t.matrix,Qt(t.a,t.b,t.c,t.d,t.e,t.f)):Kt)}),", ",")",")");function nn(t,n){var e,r;return function(){var i=$t(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function en(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=$t(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function rn(t,n,e){var r=t._id;return t.each((function(){var t=$t(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Bt(t,r).value[n]}}var on=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function un(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function an(){}var sn="\\s*([+-]?\\d+)\\s*",ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fn=/^#([0-9a-f]{3,8})$/,hn=new RegExp("^rgb\\("+[sn,sn,sn]+"\\)$"),pn=new RegExp("^rgb\\("+[cn,cn,cn]+"\\)$"),dn=new RegExp("^rgba\\("+[sn,sn,sn,ln]+"\\)$"),vn=new RegExp("^rgba\\("+[cn,cn,cn,ln]+"\\)$"),yn=new RegExp("^hsl\\("+[ln,cn,cn]+"\\)$"),gn=new RegExp("^hsla\\("+[ln,cn,cn,ln]+"\\)$"),_n={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 mn(){return this.rgb().formatHex()}function wn(){return this.rgb().formatRgb()}function bn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=fn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?xn(n):3===e?new En(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new En(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new En(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=hn.exec(t))?new En(n[1],n[2],n[3],1):(n=pn.exec(t))?new En(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=dn.exec(t))?An(n[1],n[2],n[3],n[4]):(n=vn.exec(t))?An(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=yn.exec(t))?On(n[1],n[2]/100,n[3]/100,1):(n=gn.exec(t))?On(n[1],n[2]/100,n[3]/100,n[4]):_n.hasOwnProperty(t)?xn(_n[t]):"transparent"===t?new En(NaN,NaN,NaN,0):null}function xn(t){return new En(t>>16&255,t>>8&255,255&t,1)}function An(t,n,e,r){return r<=0&&(t=n=e=NaN),new En(t,n,e,r)}function Nn(t){return t instanceof an||(t=bn(t)),t?new En((t=t.rgb()).r,t.g,t.b,t.opacity):new En}function kn(t,n,e,r){return 1===arguments.length?Nn(t):new En(t,n,e,null==r?1:r)}function En(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Mn(){return"#"+Pn(this.r)+Pn(this.g)+Pn(this.b)}function Sn(){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 Pn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function On(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new qn(t,n,e,r)}function jn(t){if(t instanceof qn)return new qn(t.h,t.s,t.l,t.opacity);if(t instanceof an||(t=bn(t)),!t)return new qn;if(t instanceof qn)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),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new qn(u,a,s,t.opacity)}function qn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Cn(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 Tn(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}on(an,bn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHsl:function(){return jn(this).formatHsl()},formatRgb:wn,toString:wn}),on(En,kn,un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new En(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:Mn,formatHex:Mn,formatRgb:Sn,toString:Sn})),on(qn,(function(t,n,e,r){return 1===arguments.length?jn(t):new qn(t,n,e,null==r?1:r)}),un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qn(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 En(Cn(t>=240?t-240:t+120,i,r),Cn(t,i,r),Cn(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 Xn=function(t){return function(){return t}};function Rn(t,n){return function(e){return t+e*n}}function In(t){return 1==(t=+t)?Ln: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):Xn(isNaN(n)?e:n)}}function Ln(t,n){var e=n-t;return e?Rn(t,e):Xn(isNaN(t)?n:t)}var Dn=function t(n){var e=In(n);function r(t,n){var r=e((t=kn(t)).r,(n=kn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Ln(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=kn(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}Hn((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Tn((e-r/n)*n,u,i,o,a)}})),Hn((function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Tn((e-r/n)*n,i,o,u,a)}}));var Yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(Yn.source,"g");var Bn=function(t,n){var e,r,i,o=Yn.lastIndex=$n.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=Yn.exec(t))&&(r=$n.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Gt(e,r)})),o=$n.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},Vn=function(t,n){var e;return("number"==typeof n?Gt:n instanceof bn?Dn:(e=bn(n))?(n=e,Dn):Bn)(t,n)};function zn(t){return function(){this.removeAttribute(t)}}function Un(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function Gn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function Jn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function Kn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Qn(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Wn(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Zn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Wn(t,i)),e}return i._value=n,i}function te(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Qn(t,i)),e}return i._value=n,i}function ne(t,n){return function(){Yt(this,t).delay=+n.apply(this,arguments)}}function ee(t,n){return n=+n,function(){Yt(this,t).delay=n}}function re(t,n){return function(){$t(this,t).duration=+n.apply(this,arguments)}}function ie(t,n){return n=+n,function(){$t(this,t).duration=n}}function oe(t,n){if("function"!=typeof n)throw new Error;return function(){$t(this,t).ease=n}}function ue(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Yt:$t;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var ae=ht.prototype.constructor;function se(t){return function(){this.style.removeProperty(t)}}function le(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function ce(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&le(t,o,e)),r}return o._value=n,o}function fe(t){return function(n){this.textContent=t.call(this,n)}}function he(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&fe(r)),n}return r._value=t,r}var pe=0;function de(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ve(){return++pe}var ye=ht.prototype;de.prototype=function(t){return ht().transition(t)}.prototype={constructor:de,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=i(t));for(var r=this._groups,o=r.length,u=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],f=c.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=c[p])&&(l=t.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),h[p]=l,Ht(h[p],n,e,p,h,Bt(s,e)));return new de(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],f=c.length,h=0;h<f;++h)if(l=c[h]){for(var p,d=t.call(l,l.__data__,h,c),v=Bt(l,e),y=0,g=d.length;y<g;++y)(p=d[y])&&Ht(p,n,e,y,d,v);o.push(d),a.push(l)}return new de(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new de(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new de(u,this._parents,this._name,this._id)},selection:function(){return new ae(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=ve(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Bt(u,n);Ht(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new de(r,this._parents,t,e)},call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:function(t,n){var e=this._id;return arguments.length<2?Bt(this.node(),e).on.on(t):this.each(ue(e,t,n))},attr:function(t,n){var e=v(t),r="transform"===e?tn:Vn;return this.attrTween(t,"function"==typeof n?(e.local?Kn:Jn)(e,r,rn(this,"attr."+t,n)):null==n?(e.local?Un:zn)(e):(e.local?Gn:Fn)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=v(t);return this.tween(e,(r.local?Zn:te)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Zt:Vn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=E(this,t),u=(this.style.removeProperty(t),E(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,se(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=E(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=E(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,rn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=$t(this,t),l=s.on,c=null==s.value[u]?o||(o=se(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=E(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,ce(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(rn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,he(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Bt(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?nn:en)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ne:ee)(n,t)):Bt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?re:ie)(n,t)):Bt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(oe(n,t)):Bt(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=$t(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}))}))}};var ge={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function _e(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return ge.time=Ot(),ge;return e}ht.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,u=!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]):u=!1;u&&delete t.__transition}}(this,t)}))},ht.prototype.transition=function(t){var n,e;t instanceof de?(n=t._id,t=t._name):(n=ve(),(e=ge).time=Ot(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&Ht(u,t,n,l,a,e||_e(u,n));return new de(r,this._parents,t,n)};function me(t){return t.data.name}function we(){var t,n="string"==typeof(t="body")?new ct([[document.querySelector(t)]],[document.documentElement]):new ct([[t]],lt),e=null,r=me;function i(){e=n.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return i.show=function(t){return e.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),e.html(r(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),i},i.hide=function(){return e.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),i},i.html=function(t){return arguments.length?(r=t,i):r},i}}})})); | ||
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.tooltip=n():(t.flamegraph=t.flamegraph||{},t.flamegraph.tooltip=n())}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=6)}({6:function(t,n,e){"use strict";function r(){}e.r(n),e.d(n,"defaultFlamegraphTooltip",(function(){return we}));var i=function(t){return null==t?r:function(){return this.querySelector(t)}};function o(){return[]}var u=function(t){return null==t?o:function(){return this.querySelectorAll(t)}},a=function(t){return function(){return this.matches(t)}},s=function(t){return new Array(t.length)};function l(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}l.prototype={constructor:l,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 c(t,n,e,r,i,o){for(var u,a=0,s=n.length,c=o.length;a<c;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new l(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function f(t,n,e,r,i,o,u){var a,s,c,f={},h=n.length,p=o.length,d=new Array(h);for(a=0;a<h;++a)(s=n[a])&&(d[a]=c="$"+u.call(s,s.__data__,a,n),c in f?i[a]=s:f[c]=s);for(a=0;a<p;++a)(s=f[c="$"+u.call(t,o[a],a,o)])?(r[a]=s,s.__data__=o[a],f[c]=null):e[a]=new l(t,o[a]);for(a=0;a<h;++a)(s=n[a])&&f[d[a]]===s&&(i[a]=s)}function h(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var p="http://www.w3.org/1999/xhtml",d={svg:"http://www.w3.org/2000/svg",xhtml:p,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},v=function(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),d.hasOwnProperty(n)?{space:d[n],local:t}:t};function y(t){return function(){this.removeAttribute(t)}}function g(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _(t,n){return function(){this.setAttribute(t,n)}}function m(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function w(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function b(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)}}var x=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function A(t){return function(){this.style.removeProperty(t)}}function N(t,n,e){return function(){this.style.setProperty(t,n,e)}}function k(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function E(t,n){return t.style.getPropertyValue(n)||x(t).getComputedStyle(t,null).getPropertyValue(n)}function M(t){return function(){delete this[t]}}function S(t,n){return function(){this[t]=n}}function P(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function O(t){return t.trim().split(/^|\s+/)}function j(t){return t.classList||new q(t)}function q(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function C(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function T(t,n){for(var e=j(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function X(t){return function(){C(this,t)}}function R(t){return function(){T(this,t)}}function I(t,n){return function(){(n.apply(this,arguments)?C:T)(this,t)}}q.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function L(){this.textContent=""}function D(t){return function(){this.textContent=t}}function H(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}function Y(){this.innerHTML=""}function $(t){return function(){this.innerHTML=t}}function B(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}function V(){this.nextSibling&&this.parentNode.appendChild(this)}function z(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function U(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===p&&n.documentElement.namespaceURI===p?n.createElement(t):n.createElementNS(e,t)}}function F(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var G=function(t){var n=v(t);return(n.local?F:U)(n)};function J(){return null}function K(){var t=this.parentNode;t&&t.removeChild(this)}function Q(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function W(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}var Z={},tt=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Z={mouseenter:"mouseover",mouseleave:"mouseout"}));function nt(t,n,e){return t=et(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function et(t,n,e){return function(r){var i=tt;tt=r;try{t.call(this,this.__data__,n,e)}finally{tt=i}}}function rt(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 it(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,o=n.length;r<o;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.capture);++i?n.length=i:delete this.__on}}}function ot(t,n,e){var r=Z.hasOwnProperty(t.type)?nt:et;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,f=s.length;c<f;++c)if((a=s[c]).type===t.type&&a.name===t.name)return this.removeEventListener(a.type,a.listener,a.capture),this.addEventListener(a.type,a.listener=l,a.capture=e),void(a.value=n);this.addEventListener(t.type,l,e),a={type:t.type,name:t.name,value:n,listener:l,capture:e},s?s.push(a):this.__on=[a]}}function ut(t,n,e){var r=x(t),i=r.CustomEvent;"function"==typeof i?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function at(t,n){return function(){return ut(this,t,n)}}function st(t,n){return function(){return ut(this,t,n.apply(this,arguments))}}var lt=[null];function ct(t,n){this._groups=t,this._parents=n}function ft(){return new ct([[document.documentElement]],lt)}ct.prototype=ft.prototype={constructor:ct,select:function(t){"function"!=typeof t&&(t=i(t));for(var n=this._groups,e=n.length,r=new Array(e),o=0;o<e;++o)for(var u,a,s=n[o],l=s.length,c=r[o]=new Array(l),f=0;f<l;++f)(u=s[f])&&(a=t.call(u,u.__data__,f,s))&&("__data__"in u&&(a.__data__=u.__data__),c[f]=a);return new ct(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=u(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var a,s=n[o],l=s.length,c=0;c<l;++c)(a=s[c])&&(r.push(t.call(a,a.__data__,c,s)),i.push(a));return new ct(r,i)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new ct(r,this._parents)},data:function(t,n){if(!t)return y=new Array(this.size()),h=-1,this.each((function(t){y[++h]=t})),y;var e,r=n?f:c,i=this._parents,o=this._groups;"function"!=typeof t&&(e=t,t=function(){return e});for(var u=o.length,a=new Array(u),s=new Array(u),l=new Array(u),h=0;h<u;++h){var p=i[h],d=o[h],v=d.length,y=t.call(p,p&&p.__data__,h,i),g=y.length,_=s[h]=new Array(g),m=a[h]=new Array(g);r(p,d,_,m,l[h]=new Array(v),y,n);for(var w,b,x=0,A=0;x<g;++x)if(w=_[x]){for(x>=A&&(A=x+1);!(b=m[A])&&++A<g;);w._next=b||null}}return(a=new ct(a,i))._enter=s,a._exit=l,a},enter:function(){return new ct(this._enter||this._groups.map(s),this._parents)},exit:function(){return new ct(this._exit||this._groups.map(s),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=n&&(i=n(i)),null==e?o.remove():e(o),r&&i?r.merge(i).order():i},merge:function(t){for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new ct(u,this._parents)},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],o=i.length-1,u=i[o];--o>=0;)(r=i[o])&&(u&&4^r.compareDocumentPosition(u)&&u.parentNode.insertBefore(r,u),u=r);return this},sort:function(t){function n(n,e){return n&&e?t(n.__data__,e.__data__):!n-!e}t||(t=h);for(var e=this._groups,r=e.length,i=new Array(r),o=0;o<r;++o){for(var u,a=e[o],s=a.length,l=i[o]=new Array(s),c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(n)}return new ct(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),n=-1;return this.each((function(){t[++n]=this})),t},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,o=r.length;i<o;++i){var u=r[i];if(u)return u}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,o=n[e],u=0,a=o.length;u<a;++u)(i=o[u])&&t.call(i,i.__data__,u,o);return this},attr:function(t,n){var e=v(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((null==n?e.local?g:y:"function"==typeof n?e.local?b:w:e.local?m:_)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((null==n?A:"function"==typeof n?k:N)(t,n,null==e?"":e)):E(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((null==n?M:"function"==typeof n?P:S)(t,n)):this.node()[t]},classed:function(t,n){var e=O(t+"");if(arguments.length<2){for(var r=j(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?I:n?X:R)(e,n))},text:function(t){return arguments.length?this.each(null==t?L:("function"==typeof t?H:D)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Y:("function"==typeof t?B:$)(t)):this.node().innerHTML},raise:function(){return this.each(V)},lower:function(){return this.each(z)},append:function(t){var n="function"==typeof t?t:G(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:G(t),r=null==n?J:"function"==typeof n?n:i(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(K)},clone:function(t){return this.select(t?W:Q)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=rt(t+""),u=o.length;if(!(arguments.length<2)){for(a=n?ot:it,null==e&&(e=!1),r=0;r<u;++r)this.each(a(o[r],n,e));return this}var a=this.node().__on;if(a)for(var s,l=0,c=a.length;l<c;++l)for(r=0,s=a[l];r<u;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,n){return this.each(("function"==typeof n?st:at)(t,n))}};var ht=ft,pt={value:function(){}};function dt(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new vt(r)}function vt(t){this._=t}function yt(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=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 gt(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function _t(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=pt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}vt.prototype=dt.prototype={constructor:vt,on:function(t,n){var e,r=this._,i=yt(t+"",r),o=-1,u=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<u;)if(e=(t=i[o]).type)r[e]=_t(r[e],t.name,n);else if(null==n)for(e in r)r[e]=_t(r[e],t.name,null);return this}for(;++o<u;)if((e=(t=i[o]).type)&&(e=gt(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new vt(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var mt,wt,bt=dt,xt=0,At=0,Nt=0,kt=0,Et=0,Mt=0,St="object"==typeof performance&&performance.now?performance:Date,Pt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ot(){return Et||(Pt(jt),Et=St.now()+Mt)}function jt(){Et=0}function qt(){this._call=this._time=this._next=null}function Ct(t,n,e){var r=new qt;return r.restart(t,n,e),r}function Tt(){Et=(kt=St.now())+Mt,xt=At=0;try{!function(){Ot(),++xt;for(var t,n=mt;n;)(t=Et-n._time)>=0&&n._call.call(null,t),n=n._next;--xt}()}finally{xt=0,function(){var t,n,e=mt,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:mt=n);wt=t,Rt(r)}(),Et=0}}function Xt(){var t=St.now(),n=t-kt;n>1e3&&(Mt-=n,kt=t)}function Rt(t){xt||(At&&(At=clearTimeout(At)),t-Et>24?(t<1/0&&(At=setTimeout(Tt,t-St.now()-Mt)),Nt&&(Nt=clearInterval(Nt))):(Nt||(kt=St.now(),Nt=setInterval(Xt,1e3)),xt=1,Pt(Tt)))}qt.prototype=Ct.prototype={constructor:qt,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?Ot():+e)+(null==n?0:+n),this._next||wt===this||(wt?wt._next=this:mt=this,wt=this),this._call=t,this._time=e,Rt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rt())}};var It=function(t,n,e){var r=new qt;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r},Lt=bt("start","end","cancel","interrupt"),Dt=[],Ht=function(t,n,e,r,i,o){var u=t.__transition;if(u){if(e in u)return}else t.__transition={};!function(t,n,e){var r,i=t.__transition;function o(s){var l,c,f,h;if(1!==e.state)return a();for(l in i)if((h=i[l]).name===e.name){if(3===h.state)return It(o);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[l]):+l<n&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[l])}if(It((function(){3===e.state&&(e.state=4,e.timer.restart(u,e.delay,e.time),u(s))})),e.state=2,e.on.call("start",t,t.__data__,e.index,e.group),2===e.state){for(e.state=3,r=new Array(f=e.tween.length),l=0,c=-1;l<f;++l)(h=e.tween[l].value.call(t,t.__data__,e.index,e.group))&&(r[++c]=h);r.length=c+1}}function u(n){for(var i=n<e.duration?e.ease.call(null,n/e.duration):(e.timer.restart(a),e.state=5,1),o=-1,u=r.length;++o<u;)r[o].call(t,i);5===e.state&&(e.on.call("end",t,t.__data__,e.index,e.group),a())}function a(){for(var r in e.state=6,e.timer.stop(),delete i[n],i)return;delete t.__transition}i[n]=e,e.timer=Ct((function(t){e.state=1,e.timer.restart(o,e.delay,e.time),e.delay<=t&&o(t-e.delay)}),0,e.time)}(t,e,{name:n,index:r,group:i,on:Lt,tween:Dt,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})};function Yt(t,n){var e=Bt(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function $t(t,n){var e=Bt(t,n);if(e.state>3)throw new Error("too late; already running");return e}function Bt(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}var Vt,zt,Ut,Ft,Gt=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Jt=180/Math.PI,Kt={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},Qt=function(t,n,e,r,i,o){var u,a,s;return(u=Math.sqrt(t*t+n*n))&&(t/=u,n/=u),(s=t*e+n*r)&&(e-=t*s,r-=n*s),(a=Math.sqrt(e*e+r*r))&&(e/=a,r/=a,s/=a),t*r<n*e&&(t=-t,n=-n,s=-s,u=-u),{translateX:i,translateY:o,rotate:Math.atan2(n,t)*Jt,skewX:Math.atan(s)*Jt,scaleX:u,scaleY:a}};function Wt(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a=[],s=[];return o=t(o),u=t(u),function(t,r,i,o,u,a){if(t!==i||r!==o){var s=u.push("translate(",null,n,null,e);a.push({i:s-4,x:Gt(t,i)},{i:s-2,x:Gt(r,o)})}else(i||o)&&u.push("translate("+i+n+o+e)}(o.translateX,o.translateY,u.translateX,u.translateY,a,s),function(t,n,e,o){t!==n?(t-n>180?n+=360:n-t>180&&(t+=360),o.push({i:e.push(i(e)+"rotate(",null,r)-2,x:Gt(t,n)})):n&&e.push(i(e)+"rotate("+n+r)}(o.rotate,u.rotate,a,s),function(t,n,e,o){t!==n?o.push({i:e.push(i(e)+"skewX(",null,r)-2,x:Gt(t,n)}):n&&e.push(i(e)+"skewX("+n+r)}(o.skewX,u.skewX,a,s),function(t,n,e,r,o,u){if(t!==e||n!==r){var a=o.push(i(o)+"scale(",null,",",null,")");u.push({i:a-4,x:Gt(t,e)},{i:a-2,x:Gt(n,r)})}else 1===e&&1===r||o.push(i(o)+"scale("+e+","+r+")")}(o.scaleX,o.scaleY,u.scaleX,u.scaleY,a,s),o=u=null,function(t){for(var n,e=-1,r=s.length;++e<r;)a[(n=s[e]).i]=n.x(t);return a.join("")}}}var Zt=Wt((function(t){return"none"===t?Kt:(Vt||(Vt=document.createElement("DIV"),zt=document.documentElement,Ut=document.defaultView),Vt.style.transform=t,t=Ut.getComputedStyle(zt.appendChild(Vt),null).getPropertyValue("transform"),zt.removeChild(Vt),t=t.slice(7,-1).split(","),Qt(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),tn=Wt((function(t){return null==t?Kt:(Ft||(Ft=document.createElementNS("http://www.w3.org/2000/svg","g")),Ft.setAttribute("transform",t),(t=Ft.transform.baseVal.consolidate())?(t=t.matrix,Qt(t.a,t.b,t.c,t.d,t.e,t.f)):Kt)}),", ",")",")");function nn(t,n){var e,r;return function(){var i=$t(this,t),o=i.tween;if(o!==e)for(var u=0,a=(r=e=o).length;u<a;++u)if(r[u].name===n){(r=r.slice()).splice(u,1);break}i.tween=r}}function en(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=$t(this,t),u=o.tween;if(u!==r){i=(r=u).slice();for(var a={name:n,value:e},s=0,l=i.length;s<l;++s)if(i[s].name===n){i[s]=a;break}s===l&&i.push(a)}o.tween=i}}function rn(t,n,e){var r=t._id;return t.each((function(){var t=$t(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return Bt(t,r).value[n]}}var on=function(t,n,e){t.prototype=n.prototype=e,e.constructor=t};function un(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function an(){}var sn="\\s*([+-]?\\d+)\\s*",ln="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",cn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",fn=/^#([0-9a-f]{3,8})$/,hn=new RegExp("^rgb\\("+[sn,sn,sn]+"\\)$"),pn=new RegExp("^rgb\\("+[cn,cn,cn]+"\\)$"),dn=new RegExp("^rgba\\("+[sn,sn,sn,ln]+"\\)$"),vn=new RegExp("^rgba\\("+[cn,cn,cn,ln]+"\\)$"),yn=new RegExp("^hsl\\("+[ln,cn,cn]+"\\)$"),gn=new RegExp("^hsla\\("+[ln,cn,cn,ln]+"\\)$"),_n={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 mn(){return this.rgb().formatHex()}function wn(){return this.rgb().formatRgb()}function bn(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=fn.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?xn(n):3===e?new En(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?new En(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?new En(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=hn.exec(t))?new En(n[1],n[2],n[3],1):(n=pn.exec(t))?new En(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=dn.exec(t))?An(n[1],n[2],n[3],n[4]):(n=vn.exec(t))?An(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=yn.exec(t))?On(n[1],n[2]/100,n[3]/100,1):(n=gn.exec(t))?On(n[1],n[2]/100,n[3]/100,n[4]):_n.hasOwnProperty(t)?xn(_n[t]):"transparent"===t?new En(NaN,NaN,NaN,0):null}function xn(t){return new En(t>>16&255,t>>8&255,255&t,1)}function An(t,n,e,r){return r<=0&&(t=n=e=NaN),new En(t,n,e,r)}function Nn(t){return t instanceof an||(t=bn(t)),t?new En((t=t.rgb()).r,t.g,t.b,t.opacity):new En}function kn(t,n,e,r){return 1===arguments.length?Nn(t):new En(t,n,e,null==r?1:r)}function En(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function Mn(){return"#"+Pn(this.r)+Pn(this.g)+Pn(this.b)}function Sn(){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 Pn(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function On(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||e>=1?t=n=NaN:n<=0&&(t=NaN),new qn(t,n,e,r)}function jn(t){if(t instanceof qn)return new qn(t.h,t.s,t.l,t.opacity);if(t instanceof an||(t=bn(t)),!t)return new qn;if(t instanceof qn)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),u=NaN,a=o-i,s=(o+i)/2;return a?(u=n===o?(e-r)/a+6*(e<r):e===o?(r-n)/a+2:(n-e)/a+4,a/=s<.5?o+i:2-o-i,u*=60):a=s>0&&s<1?0:u,new qn(u,a,s,t.opacity)}function qn(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Cn(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 Tn(t,n,e,r,i){var o=t*t,u=o*t;return((1-3*t+3*o-u)*n+(4-6*o+3*u)*e+(1+3*t+3*o-3*u)*r+u*i)/6}on(an,bn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:mn,formatHex:mn,formatHsl:function(){return jn(this).formatHsl()},formatRgb:wn,toString:wn}),on(En,kn,un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new En(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new En(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:Mn,formatHex:Mn,formatRgb:Sn,toString:Sn})),on(qn,(function(t,n,e,r){return 1===arguments.length?jn(t):new qn(t,n,e,null==r?1:r)}),un(an,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qn(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qn(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 En(Cn(t>=240?t-240:t+120,i,r),Cn(t,i,r),Cn(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 Xn=function(t){return function(){return t}};function Rn(t,n){return function(e){return t+e*n}}function In(t){return 1==(t=+t)?Ln: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):Xn(isNaN(n)?e:n)}}function Ln(t,n){var e=n-t;return e?Rn(t,e):Xn(isNaN(t)?n:t)}var Dn=function t(n){var e=In(n);function r(t,n){var r=e((t=kn(t)).r,(n=kn(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=Ln(t.opacity,n.opacity);return function(n){return t.r=r(n),t.g=i(n),t.b=o(n),t.opacity=u(n),t+""}}return r.gamma=t,r}(1);function Hn(t){return function(n){var e,r,i=n.length,o=new Array(i),u=new Array(i),a=new Array(i);for(e=0;e<i;++e)r=kn(n[e]),o[e]=r.r||0,u[e]=r.g||0,a[e]=r.b||0;return o=t(o),u=t(u),a=t(a),r.opacity=1,function(t){return r.r=o(t),r.g=u(t),r.b=a(t),r+""}}}Hn((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:e>=1?(e=1,n-1):Math.floor(e*n),i=t[r],o=t[r+1],u=r>0?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return Tn((e-r/n)*n,u,i,o,a)}})),Hn((function(t){var n=t.length;return function(e){var r=Math.floor(((e%=1)<0?++e:e)*n),i=t[(r+n-1)%n],o=t[r%n],u=t[(r+1)%n],a=t[(r+2)%n];return Tn((e-r/n)*n,i,o,u,a)}}));var Yn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,$n=new RegExp(Yn.source,"g");var Bn=function(t,n){var e,r,i,o=Yn.lastIndex=$n.lastIndex=0,u=-1,a=[],s=[];for(t+="",n+="";(e=Yn.exec(t))&&(r=$n.exec(n));)(i=r.index)>o&&(i=n.slice(o,i),a[u]?a[u]+=i:a[++u]=i),(e=e[0])===(r=r[0])?a[u]?a[u]+=r:a[++u]=r:(a[++u]=null,s.push({i:u,x:Gt(e,r)})),o=$n.lastIndex;return o<n.length&&(i=n.slice(o),a[u]?a[u]+=i:a[++u]=i),a.length<2?s[0]?function(t){return function(n){return t(n)+""}}(s[0].x):function(t){return function(){return t}}(n):(n=s.length,function(t){for(var e,r=0;r<n;++r)a[(e=s[r]).i]=e.x(t);return a.join("")})},Vn=function(t,n){var e;return("number"==typeof n?Gt:n instanceof bn?Dn:(e=bn(n))?(n=e,Dn):Bn)(t,n)};function zn(t){return function(){this.removeAttribute(t)}}function Un(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Fn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttribute(t);return u===o?null:u===r?i:i=n(r=u,e)}}function Gn(t,n,e){var r,i,o=e+"";return function(){var u=this.getAttributeNS(t.space,t.local);return u===o?null:u===r?i:i=n(r=u,e)}}function Jn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttribute(t))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttribute(t)}}function Kn(t,n,e){var r,i,o;return function(){var u,a,s=e(this);if(null!=s)return(u=this.getAttributeNS(t.space,t.local))===(a=s+"")?null:u===r&&a===i?o:(i=a,o=n(r=u,s));this.removeAttributeNS(t.space,t.local)}}function Qn(t,n){return function(e){this.setAttribute(t,n.call(this,e))}}function Wn(t,n){return function(e){this.setAttributeNS(t.space,t.local,n.call(this,e))}}function Zn(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Wn(t,i)),e}return i._value=n,i}function te(t,n){var e,r;function i(){var i=n.apply(this,arguments);return i!==r&&(e=(r=i)&&Qn(t,i)),e}return i._value=n,i}function ne(t,n){return function(){Yt(this,t).delay=+n.apply(this,arguments)}}function ee(t,n){return n=+n,function(){Yt(this,t).delay=n}}function re(t,n){return function(){$t(this,t).duration=+n.apply(this,arguments)}}function ie(t,n){return n=+n,function(){$t(this,t).duration=n}}function oe(t,n){if("function"!=typeof n)throw new Error;return function(){$t(this,t).ease=n}}function ue(t,n,e){var r,i,o=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||"start"===t}))}(n)?Yt:$t;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var ae=ht.prototype.constructor;function se(t){return function(){this.style.removeProperty(t)}}function le(t,n,e){return function(r){this.style.setProperty(t,n.call(this,r),e)}}function ce(t,n,e){var r,i;function o(){var o=n.apply(this,arguments);return o!==i&&(r=(i=o)&&le(t,o,e)),r}return o._value=n,o}function fe(t){return function(n){this.textContent=t.call(this,n)}}function he(t){var n,e;function r(){var r=t.apply(this,arguments);return r!==e&&(n=(e=r)&&fe(r)),n}return r._value=t,r}var pe=0;function de(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function ve(){return++pe}var ye=ht.prototype;de.prototype=function(t){return ht().transition(t)}.prototype={constructor:de,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=i(t));for(var r=this._groups,o=r.length,u=new Array(o),a=0;a<o;++a)for(var s,l,c=r[a],f=c.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=c[p])&&(l=t.call(s,s.__data__,p,c))&&("__data__"in s&&(l.__data__=s.__data__),h[p]=l,Ht(h[p],n,e,p,h,Bt(s,e)));return new de(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=u(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var l,c=r[s],f=c.length,h=0;h<f;++h)if(l=c[h]){for(var p,d=t.call(l,l.__data__,h,c),v=Bt(l,e),y=0,g=d.length;y<g;++y)(p=d[y])&&Ht(p,n,e,y,d,v);o.push(d),a.push(l)}return new de(o,a,n,e)},filter:function(t){"function"!=typeof t&&(t=a(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],s=u.length,l=r[i]=[],c=0;c<s;++c)(o=u[c])&&t.call(o,o.__data__,c,u)&&l.push(o);return new de(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,o=Math.min(r,i),u=new Array(r),a=0;a<o;++a)for(var s,l=n[a],c=e[a],f=l.length,h=u[a]=new Array(f),p=0;p<f;++p)(s=l[p]||c[p])&&(h[p]=s);for(;a<r;++a)u[a]=n[a];return new de(u,this._parents,this._name,this._id)},selection:function(){return new ae(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=ve(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)if(u=a[l]){var c=Bt(u,n);Ht(u,t,e,l,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new de(r,this._parents,t,e)},call:ye.call,nodes:ye.nodes,node:ye.node,size:ye.size,empty:ye.empty,each:ye.each,on:function(t,n){var e=this._id;return arguments.length<2?Bt(this.node(),e).on.on(t):this.each(ue(e,t,n))},attr:function(t,n){var e=v(t),r="transform"===e?tn:Vn;return this.attrTween(t,"function"==typeof n?(e.local?Kn:Jn)(e,r,rn(this,"attr."+t,n)):null==n?(e.local?Un:zn)(e):(e.local?Gn:Fn)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(null==n)return this.tween(e,null);if("function"!=typeof n)throw new Error;var r=v(t);return this.tween(e,(r.local?Zn:te)(r,n))},style:function(t,n,e){var r="transform"==(t+="")?Zt:Vn;return null==n?this.styleTween(t,function(t,n){var e,r,i;return function(){var o=E(this,t),u=(this.style.removeProperty(t),E(this,t));return o===u?null:o===e&&u===r?i:i=n(e=o,r=u)}}(t,r)).on("end.style."+t,se(t)):"function"==typeof n?this.styleTween(t,function(t,n,e){var r,i,o;return function(){var u=E(this,t),a=e(this),s=a+"";return null==a&&(this.style.removeProperty(t),s=a=E(this,t)),u===s?null:u===r&&s===i?o:(i=s,o=n(r=u,a))}}(t,r,rn(this,"style."+t,n))).each(function(t,n){var e,r,i,o,u="style."+n,a="end."+u;return function(){var s=$t(this,t),l=s.on,c=null==s.value[u]?o||(o=se(n)):void 0;l===e&&i===c||(r=(e=l).copy()).on(a,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,n,e){var r,i,o=e+"";return function(){var u=E(this,t);return u===o?null:u===r?i:i=n(r=u,e)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==n)return this.tween(r,null);if("function"!=typeof n)throw new Error;return this.tween(r,ce(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var n=t(this);this.textContent=null==n?"":n}}(rn(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,he(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}));var t},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=Bt(this.node(),e).tween,o=0,u=i.length;o<u;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==n?nn:en)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?ne:ee)(n,t)):Bt(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?re:ie)(n,t)):Bt(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(oe(n,t)):Bt(this.node(),n).ease},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise((function(o,u){var a={value:u},s={value:function(){0==--i&&o()}};e.each((function(){var e=$t(this,r),i=e.on;i!==t&&((n=(t=i).copy())._.cancel.push(a),n._.interrupt.push(a),n._.end.push(s)),e.on=n}))}))}};var ge={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function _e(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return ge.time=Ot(),ge;return e}ht.prototype.interrupt=function(t){return this.each((function(){!function(t,n){var e,r,i,o=t.__transition,u=!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]):u=!1;u&&delete t.__transition}}(this,t)}))},ht.prototype.transition=function(t){var n,e;t instanceof de?(n=t._id,t=t._name):(n=ve(),(e=ge).time=Ot(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a=r[o],s=a.length,l=0;l<s;++l)(u=a[l])&&Ht(u,t,n,l,a,e||_e(u,n));return new de(r,this._parents,t,n)};function me(t){return t.data.name}function we(){var t,n="string"==typeof(t="body")?new ct([[document.querySelector(t)]],[document.documentElement]):new ct([[t]],lt),e=null,r=me;function i(){e=n.append("div").style("display","none").style("position","absolute").style("opacity",0).style("pointer-events","none").attr("class","d3-flame-graph-tip")}return i.show=function(t){return e.style("display","block").transition().duration(200).style("opacity",1).style("pointer-events","all"),e.html(r(t)).style("left",event.pageX+"px").style("top",event.pageY+"px"),i},i.hide=function(){return e.style("display","none").transition().duration(200).style("opacity",0).style("pointer-events","none"),i},i.html=function(t){return arguments.length?(r=t,i):r},i}}})})); |
{ | ||
"name": "d3-flame-graph", | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"description": "A d3.js library to produce flame graphs.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -56,5 +56,4 @@ const path = require('path') | ||
filename: '[name].js', | ||
library: 'colorMapper', | ||
libraryTarget: 'umd', | ||
globalObject: 'flamegraph' | ||
library: ['flamegraph', 'colorMapper'], | ||
libraryTarget: 'umd' | ||
}, | ||
@@ -84,5 +83,4 @@ module: { | ||
filename: '[name].js', | ||
library: 'tooltip', | ||
libraryTarget: 'umd', | ||
globalObject: 'flamegraph' | ||
library: ['flamegraph', 'tooltip'], | ||
libraryTarget: 'umd' | ||
}, | ||
@@ -89,0 +87,0 @@ module: { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
563995
0
8184