-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcollapsible_tree.js
1 lines (1 loc) · 70.6 KB
/
collapsible_tree.js
1
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.collapsible_tree=n():t.collapsible_tree=n()}(window,(function(){return e={},t.m=n={33:function(t,n,e){"use strict";e.r(n);var r=function(t,n){return t<n?-1:n<t?1:n<=t?0:NaN},i=function(t){var n;return 1===t.length&&(n=t,t=function(t,e){return r(n(t),e)}),{left:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;t(n[o],e)<0?r=1+o:i=o}return r},right:function(n,e,r,i){for(null==r&&(r=0),null==i&&(i=n.length);r<i;){var o=r+i>>>1;0<t(n[o],e)?i=o:r=1+o}return r}}}(r);i.right,i.left;var o=Array.prototype;o.slice,o.map,Math.sqrt(50),Math.sqrt(10),Math.sqrt(2),Array.prototype.slice;var u={value:function(){}};function a(){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 s(r)}function s(t){this._=t}function l(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=u,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}s.prototype=a.prototype={constructor:s,on:function(t,n){var e,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");if(0<=e&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))),u=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u<a;)if(e=(t=o[u]).type)i[e]=l(i[e],t.name,n);else if(null==n)for(e in i)i[e]=l(i[e],t.name,null);return this}for(;++u<a;)if((e=(t=o[u]).type)&&(e=function(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new s(t)},call:function(t,n){if(0<(e=arguments.length-2))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 c=a;function h(){}function f(t){return null==t?h:function(){return this.querySelector(t)}}function p(){return[]}function d(t){return null==t?p:function(){return this.querySelectorAll(t)}}function g(t){return function(){return this.matches(t)}}function v(t){return new Array(t.length)}function y(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function _(t,n,e,r,i,o){for(var u,a=0,s=n.length,l=o.length;a<l;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new y(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function m(t,n,e,r,i,o,u){for(var a,s,l={},c=n.length,h=o.length,f=new Array(c),p=0;p<c;++p)(a=n[p])&&(f[p]=s="$"+u.call(a,a.__data__,p,n),s in l?i[p]=a:l[s]=a);for(p=0;p<h;++p)(a=l[s="$"+u.call(t,o[p],p,o)])?((r[p]=a).__data__=o[p],l[s]=null):e[p]=new y(t,o[p]);for(p=0;p<c;++p)(a=n[p])&&l[f[p]]===a&&(i[p]=a)}function w(t,n){return t<n?-1:n<t?1:n<=t?0:NaN}function x(t){var n=t+="",e=n.indexOf(":");return 0<=e&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),M.hasOwnProperty(n)?{space:M[n],local:t}:t}y.prototype={constructor:y,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)}};var b="http://www.w3.org/1999/xhtml",M={svg:"http://www.w3.org/2000/svg",xhtml:b,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},T=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function A(t,n){return t.style.getPropertyValue(n)||T(t).getComputedStyle(t,null).getPropertyValue(n)}function C(t){return t.trim().split(/^|\s+/)}function k(t){return t.classList||new N(t)}function N(t){this._node=t,this._names=C(t.getAttribute("class")||"")}function U(t,n){for(var e=k(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function S(t,n){for(var e=k(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function D(){this.textContent=""}function E(){this.innerHTML=""}function Y(){this.nextSibling&&this.parentNode.appendChild(this)}function z(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function F(t){var n=x(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===b&&n.documentElement.namespaceURI===b?n.createElement(t):n.createElementNS(e,t)}})(n)}function H(){return null}function q(){var t=this.parentNode;t&&t.removeChild(this)}function P(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function L(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}N.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);0<=n&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return 0<=this._names.indexOf(t)}};var j={},O=null;function X(t,n,e){return t=B(t,n,e),function(n){var e=n.relatedTarget;e&&(e===this||8&e.compareDocumentPosition(this))||t.call(this,n)}}function B(t,n,e){return function(r){var i=O;O=r;try{t.call(this,this.__data__,n,e)}finally{O=i}}}function I(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 V(t,n,e){var r=j.hasOwnProperty(t.type)?X:B;return function(i,o,u){var a,s=this.__on,l=r(n,o,u);if(s)for(var c=0,h=s.length;c<h;++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 $(t,n,e){var r=T(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)}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(j={mouseenter:"mouseover",mouseleave:"mouseout"}));var R=[null];function Z(t,n){this._groups=t,this._parents=n}function W(){return new Z([[document.documentElement]],R)}Z.prototype=W.prototype={constructor:Z,select:function(t){"function"!=typeof t&&(t=f(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u,a=n[i],s=a.length,l=r[i]=new Array(s),c=0;c<s;++c)(o=a[c])&&(u=t.call(o,o.__data__,c,a))&&("__data__"in o&&(u.__data__=o.__data__),l[c]=u);return new Z(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=d(t));for(var n=this._groups,e=n.length,r=[],i=[],o=0;o<e;++o)for(var u,a=n[o],s=a.length,l=0;l<s;++l)(u=a[l])&&(r.push(t.call(u,u.__data__,l,a)),i.push(u));return new Z(r,i)},filter:function(t){"function"!=typeof t&&(t=g(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new Z(r,this._parents)},data:function(t,n){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var e,r=n?m:_,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),c=0;c<u;++c){var h=i[c],f=o[c],p=f.length,d=t.call(h,h&&h.__data__,c,i),g=d.length,v=s[c]=new Array(g),y=a[c]=new Array(g);r(h,f,v,y,l[c]=new Array(p),d,n);for(var w,x,b=0,M=0;b<g;++b)if(w=v[b]){for(M<=b&&(M=b+1);!(x=y[M])&&++M<g;);w._next=x||null}}return(a=new Z(a,i))._enter=s,a._exit=l,a},enter:function(){return new Z(this._enter||this._groups.map(v),this._parents)},exit:function(){return new Z(this._exit||this._groups.map(v),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,o=this.exit();r="function"==typeof t?t(r):r.append(t+"");return 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],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new Z(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];0<=--o;)(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||w;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 Z(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=x(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?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof n?e.local?function(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(t,n){return function(){var e=n.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}:e.local?function(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}:function(t,n){return function(){this.setAttribute(t,n)}})(e,n))},style:function(t,n,e){return 1<arguments.length?this.each((null==n?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof n?function(t,n,e){return function(){var r=n.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}:function(t,n,e){return function(){this.style.setProperty(t,n,e)}})(t,n,null==e?"":e)):A(this.node(),t)},property:function(t,n){return 1<arguments.length?this.each((null==n?function(t){return function(){delete this[t]}}:"function"==typeof n?function(t,n){return function(){var e=n.apply(this,arguments);null==e?delete this[t]:this[t]=e}}:function(t,n){return function(){this[t]=n}})(t,n)):this.node()[t]},classed:function(t,n){var e=C(t+"");if(arguments.length<2){for(var r=k(this.node()),i=-1,o=e.length;++i<o;)if(!r.contains(e[i]))return!1;return!0}return this.each(("function"==typeof n?function(t,n){return function(){(n.apply(this,arguments)?U:S)(this,t)}}:n?function(t){return function(){U(this,t)}}:function(t){return function(){S(this,t)}})(e,n))},text:function(t){return arguments.length?this.each(null==t?D:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.textContent=null==n?"":n}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?E:("function"==typeof t?function(t){return function(){var n=t.apply(this,arguments);this.innerHTML=null==n?"":n}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(Y)},lower:function(){return this.each(z)},append:function(t){var n="function"==typeof t?t:F(t);return this.select((function(){return this.appendChild(n.apply(this,arguments))}))},insert:function(t,n){var e="function"==typeof t?t:F(t),r=null==n?H:"function"==typeof n?n:f(n);return this.select((function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(q)},clone:function(t){return this.select(t?L:P)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,o=(t+"").trim().split(/^|\s+/).map((function(t){var n="",e=t.indexOf(".");return 0<=e&&(n=t.slice(e+1),t=t.slice(0,e)),{type:t,name:n}})),u=o.length;if(!(arguments.length<2)){for(a=n?V:I,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?function(t,n){return function(){return $(this,t,n.apply(this,arguments))}}:function(t,n){return function(){return $(this,t,n)}})(t,n))}};var Q=W;function J(t,n,e){(t.prototype=n.prototype=e).constructor=t}function G(t,n){var e=Object.create(t.prototype);for(var r in n)e[r]=n[r];return e}function K(){}var tt="\\s*([+-]?\\d+)\\s*",nt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",et="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",rt=/^#([0-9a-f]{3,8})$/,it=new RegExp("^rgb\\("+[tt,tt,tt]+"\\)$"),ot=new RegExp("^rgb\\("+[et,et,et]+"\\)$"),ut=new RegExp("^rgba\\("+[tt,tt,tt,nt]+"\\)$"),at=new RegExp("^rgba\\("+[et,et,et,nt]+"\\)$"),st=new RegExp("^hsl\\("+[nt,et,et]+"\\)$"),lt=new RegExp("^hsla\\("+[nt,et,et,nt]+"\\)$"),ct={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 ht(){return this.rgb().formatHex()}function ft(){return this.rgb().formatRgb()}function pt(t){var n,e;return t=(t+"").trim().toLowerCase(),(n=rt.exec(t))?(e=n[1].length,n=parseInt(n[1],16),6===e?dt(n):3===e?new yt(n>>8&15|n>>4&240,n>>4&15|240&n,(15&n)<<4|15&n,1):8===e?gt(n>>24&255,n>>16&255,n>>8&255,(255&n)/255):4===e?gt(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=it.exec(t))?new yt(n[1],n[2],n[3],1):(n=ot.exec(t))?new yt(255*n[1]/100,255*n[2]/100,255*n[3]/100,1):(n=ut.exec(t))?gt(n[1],n[2],n[3],n[4]):(n=at.exec(t))?gt(255*n[1]/100,255*n[2]/100,255*n[3]/100,n[4]):(n=st.exec(t))?xt(n[1],n[2]/100,n[3]/100,1):(n=lt.exec(t))?xt(n[1],n[2]/100,n[3]/100,n[4]):ct.hasOwnProperty(t)?dt(ct[t]):"transparent"===t?new yt(NaN,NaN,NaN,0):null}function dt(t){return new yt(t>>16&255,t>>8&255,255&t,1)}function gt(t,n,e,r){return r<=0&&(t=n=e=NaN),new yt(t,n,e,r)}function vt(t,n,e,r){return 1===arguments.length?((i=t)instanceof K||(i=pt(i)),i?new yt((i=i.rgb()).r,i.g,i.b,i.opacity):new yt):new yt(t,n,e,null==r?1:r);var i}function yt(t,n,e,r){this.r=+t,this.g=+n,this.b=+e,this.opacity=+r}function _t(){return"#"+wt(this.r)+wt(this.g)+wt(this.b)}function mt(){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 wt(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function xt(t,n,e,r){return r<=0?t=n=e=NaN:e<=0||1<=e?t=n=NaN:n<=0&&(t=NaN),new Mt(t,n,e,r)}function bt(t){if(t instanceof Mt)return new Mt(t.h,t.s,t.l,t.opacity);if(t instanceof K||(t=pt(t)),!t)return new Mt;if(t instanceof Mt)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=0<s&&s<1?0:u,new Mt(u,a,s,t.opacity)}function Mt(t,n,e,r){this.h=+t,this.s=+n,this.l=+e,this.opacity=+r}function Tt(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 At(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}J(K,pt,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ht,formatHex:ht,formatHsl:function(){return bt(this).formatHsl()},formatRgb:ft,toString:ft}),J(yt,vt,G(K,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yt(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:_t,formatHex:_t,formatRgb:mt,toString:mt})),J(Mt,(function(t,n,e,r){return 1===arguments.length?bt(t):new Mt(t,n,e,null==r?1:r)}),G(K,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Mt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Mt(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 yt(Tt(240<=t?t-240:120+t,i,r),Tt(t,i,r),Tt(t<120?240+t: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 Ct=function(t){return function(){return t}};function kt(t,n){var e=n-t;return e?function(t,n){return function(e){return t+e*n}}(t,e):Ct(isNaN(t)?n:t)}var Nt=function t(n){var e=function(t){return 1==(t=+t)?kt:function(n,e){return e-n?(r=n,i=e,o=t,r=Math.pow(r,o),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):Ct(isNaN(n)?e:n);var r,i,o}}(n);function r(t,n){var r=e((t=vt(t)).r,(n=vt(n)).r),i=e(t.g,n.g),o=e(t.b,n.b),u=kt(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 Ut(t){return function(n){for(var e,r=n.length,i=new Array(r),o=new Array(r),u=new Array(r),a=0;a<r;++a)e=vt(n[a]),i[a]=e.r||0,o[a]=e.g||0,u[a]=e.b||0;return i=t(i),o=t(o),u=t(u),e.opacity=1,function(t){return e.r=i(t),e.g=o(t),e.b=u(t),e+""}}}Ut((function(t){var n=t.length-1;return function(e){var r=e<=0?e=0:1<=e?n-(e=1):Math.floor(e*n),i=t[r],o=t[r+1],u=0<r?t[r-1]:2*i-o,a=r<n-1?t[r+2]:2*o-i;return At((e-r/n)*n,u,i,o,a)}})),Ut((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 At((e-r/n)*n,i,o,u,a)}}));var St=function(t,n){return t=+t,n=+n,function(e){return t*(1-e)+n*e}},Dt=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Et=new RegExp(Dt.source,"g");function Yt(t,n){var e,r,i,o,u,a=Dt.lastIndex=Et.lastIndex=0,s=-1,l=[],c=[];for(t+="",n+="";(e=Dt.exec(t))&&(r=Et.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),l[s]?l[s]+=i:l[++s]=i),(e=e[0])===(r=r[0])?l[s]?l[s]+=r:l[++s]=r:(l[++s]=null,c.push({i:s,x:St(e,r)})),a=Et.lastIndex;return a<n.length&&(i=n.slice(a),l[s]?l[s]+=i:l[++s]=i),l.length<2?c[0]?(u=c[0].x,function(t){return u(t)+""}):(o=n,function(){return o}):(n=c.length,function(t){for(var e,r=0;r<n;++r)l[(e=c[r]).i]=e.x(t);return l.join("")})}var zt,Ft,Ht=0,qt=0,Pt=0,Lt=0,jt=0,Ot=0,Xt="object"==typeof performance&&performance.now?performance:Date,Bt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function It(){return jt||(Bt(Vt),jt=Xt.now()+Ot)}function Vt(){jt=0}function $t(){this._call=this._time=this._next=null}function Rt(t,n,e){var r=new $t;return r.restart(t,n,e),r}function Zt(){jt=(Lt=Xt.now())+Ot,Ht=qt=0;try{!function(){It(),++Ht;for(var t,n=zt;n;)0<=(t=jt-n._time)&&n._call.call(null,t),n=n._next;--Ht}()}finally{Ht=0,function(){for(var t,n,e=zt,r=1/0;e;)e=e._call?(r>e._time&&(r=e._time),(t=e)._next):(n=e._next,e._next=null,t?t._next=n:zt=n);Ft=t,Qt(r)}(),jt=0}}function Wt(){var t=Xt.now(),n=t-Lt;1e3<n&&(Ot-=n,Lt=t)}function Qt(t){Ht||(qt=qt&&clearTimeout(qt),24<t-jt?(t<1/0&&(qt=setTimeout(Zt,t-Xt.now()-Ot)),Pt=Pt&&clearInterval(Pt)):(Pt||(Lt=Xt.now(),Pt=setInterval(Wt,1e3)),Ht=1,Bt(Zt)))}function Jt(t,n,e){var r=new $t;return n=null==n?0:+n,r.restart((function(e){r.stop(),t(e+n)}),n,e),r}function Gt(t,n,e,r,i,o){var u,a,s,l,c,h=t.__transition;if(h){if(e in h)return}else t.__transition={};function f(t){var n,e,r,i;if(1!==s.state)return d();for(n in c)if((i=c[n]).name===s.name){if(i.state===en)return Jt(f);4===i.state?(i.state=6,i.timer.stop(),i.on.call("interrupt",u,u.__data__,i.index,i.group),delete c[n]):+n<a&&(i.state=6,i.timer.stop(),i.on.call("cancel",u,u.__data__,i.index,i.group),delete c[n])}if(Jt((function(){s.state===en&&(s.state=4,s.timer.restart(p,s.delay,s.time),p(t))})),s.state=2,s.on.call("start",u,u.__data__,s.index,s.group),2===s.state){for(s.state=en,l=new Array(r=s.tween.length),n=0,e=-1;n<r;++n)(i=s.tween[n].value.call(u,u.__data__,s.index,s.group))&&(l[++e]=i);l.length=e+1}}function p(t){for(var n=t<s.duration?s.ease.call(null,t/s.duration):(s.timer.restart(d),s.state=5,1),e=-1,r=l.length;++e<r;)l[e].call(u,n);5===s.state&&(s.on.call("end",u,u.__data__,s.index,s.group),d())}function d(){for(var t in s.state=6,s.timer.stop(),delete c[a],c)return;delete u.__transition}u=t,a=e,s={name:n,index:r,group:i,on:Kt,tween:tn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:nn},((c=u.__transition)[a]=s).timer=Rt((function(t){s.state=1,s.timer.restart(f,s.delay,s.time),s.delay<=t&&f(t-s.delay)}),0,s.time)}$t.prototype=Rt.prototype={constructor:$t,restart:function(t,n,e){if("function"!=typeof t)throw new TypeError("callback is not a function");e=(null==e?It():+e)+(null==n?0:+n),this._next||Ft===this||(Ft?Ft._next=this:zt=this,Ft=this),this._call=t,this._time=e,Qt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qt())}};var Kt=c("start","end","cancel","interrupt"),tn=[],nn=0,en=3;function rn(t,n){var e=un(t,n);if(e.state>nn)throw new Error("too late; already scheduled");return e}function on(t,n){var e=un(t,n);if(e.state>en)throw new Error("too late; already running");return e}function un(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function an(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)*fn,skewX:Math.atan(s)*fn,scaleX:u,scaleY:a}}var sn,ln,cn,hn,fn=180/Math.PI,pn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function dn(t,n,e,r){function i(t){return t.length?t.pop()+" ":""}return function(o,u){var a,s,l,c,h,f,p,d,g,v,y,_,m,w,x,b,M,T,A,C,k=[],N=[];return o=t(o),u=t(u),a=o.translateX,s=o.translateY,l=u.translateX,c=u.translateY,h=k,f=N,a!==l||s!==c?(p=h.push("translate(",null,n,null,e),f.push({i:p-4,x:St(a,l)},{i:p-2,x:St(s,c)})):(l||c)&&h.push("translate("+l+n+c+e),d=o.rotate,g=u.rotate,v=k,d!==g?(180<d-g?g+=360:180<g-d&&(d+=360),N.push({i:v.push(i(v)+"rotate(",null,r)-2,x:St(d,g)})):g&&v.push(i(v)+"rotate("+g+r),y=o.skewX,_=u.skewX,m=k,y!==_?N.push({i:m.push(i(m)+"skewX(",null,r)-2,x:St(y,_)}):_&&m.push(i(m)+"skewX("+_+r),w=o.scaleX,x=o.scaleY,b=u.scaleX,M=u.scaleY,T=k,A=N,w!==b||x!==M?(C=T.push(i(T)+"scale(",null,",",null,")"),A.push({i:C-4,x:St(w,b)},{i:C-2,x:St(x,M)})):1===b&&1===M||T.push(i(T)+"scale("+b+","+M+")"),o=u=null,function(t){for(var n,e=-1,r=N.length;++e<r;)k[(n=N[e]).i]=n.x(t);return k.join("")}}}var gn=dn((function(t){return"none"===t?pn:(sn||(sn=document.createElement("DIV"),ln=document.documentElement,cn=document.defaultView),sn.style.transform=t,t=cn.getComputedStyle(ln.appendChild(sn),null).getPropertyValue("transform"),ln.removeChild(sn),an(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),vn=dn((function(t){return null==t?pn:((hn=hn||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),(t=hn.transform.baseVal.consolidate())?an((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):pn)}),", ",")",")");function yn(t,n,e){var r=t._id;return t.each((function(){var t=on(this,r);(t.value||(t.value={}))[n]=e.apply(this,arguments)})),function(t){return un(t,r).value[n]}}function _n(t,n){var e;return("number"==typeof n?St:n instanceof pt?Nt:(e=pt(n))?(n=e,Nt):Yt)(t,n)}function mn(t,n){var e,r;function i(){var i,o,u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&(i=t,o=u,function(t){this.setAttributeNS(i.space,i.local,o.call(this,t))})),e}return i._value=n,i}function wn(t,n){var e,r;function i(){var i,o,u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&(i=t,o=u,function(t){this.setAttribute(i,o.call(this,t))})),e}return i._value=n,i}function xn(t,n,e){var r,i,o=(n+"").trim().split(/^|\s+/).every((function(t){var n=t.indexOf(".");return 0<=n&&(t=t.slice(0,n)),!t||"start"===t}))?rn:on;return function(){var u=o(this,t),a=u.on;a!==r&&(i=(r=a).copy()).on(n,e),u.on=i}}var bn=Q.prototype.constructor;function Mn(t){return function(){this.style.removeProperty(t)}}function Tn(t,n,e){var r,i;function o(){var o,u,a,s=n.apply(this,arguments);return s!==i&&(r=(i=s)&&(o=t,u=s,a=e,function(t){this.style.setProperty(o,u.call(this,t),a)})),r}return o._value=n,o}function An(t){var n,e;function r(){var r,i=t.apply(this,arguments);return i!==e&&(n=(e=i)&&(r=i,function(t){this.textContent=r.call(this,t)})),n}return r._value=t,r}var Cn=0;function kn(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function Nn(){return++Cn}var Un=Q.prototype;kn.prototype={constructor:kn,select:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,i=r.length,o=new Array(i),u=0;u<i;++u)for(var a,s,l=r[u],c=l.length,h=o[u]=new Array(c),p=0;p<c;++p)(a=l[p])&&(s=t.call(a,a.__data__,p,l))&&("__data__"in a&&(s.__data__=a.__data__),h[p]=s,Gt(h[p],n,e,p,h,un(a,e)));return new kn(o,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;"function"!=typeof t&&(t=d(t));for(var r=this._groups,i=r.length,o=[],u=[],a=0;a<i;++a)for(var s,l=r[a],c=l.length,h=0;h<c;++h)if(s=l[h]){for(var f,p=t.call(s,s.__data__,h,l),g=un(s,e),v=0,y=p.length;v<y;++v)(f=p[v])&&Gt(f,n,e,v,p,g);o.push(p),u.push(s)}return new kn(o,u,n,e)},filter:function(t){"function"!=typeof t&&(t=g(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var o,u=n[i],a=u.length,s=r[i]=[],l=0;l<a;++l)(o=u[l])&&t.call(o,o.__data__,l,u)&&s.push(o);return new kn(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],h=l.length,f=u[a]=new Array(h),p=0;p<h;++p)(s=l[p]||c[p])&&(f[p]=s);for(;a<r;++a)u[a]=n[a];return new kn(u,this._parents,this._name,this._id)},selection:function(){return new bn(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=Nn(),r=this._groups,i=r.length,o=0;o<i;++o)for(var u,a,s=r[o],l=s.length,c=0;c<l;++c)(u=s[c])&&Gt(u,t,e,c,s,{time:(a=un(u,n)).time+a.delay+a.duration,delay:0,duration:a.duration,ease:a.ease});return new kn(r,this._parents,t,e)},call:Un.call,nodes:Un.nodes,node:Un.node,size:Un.size,empty:Un.empty,each:Un.each,on:function(t,n){var e=this._id;return arguments.length<2?un(this.node(),e).on.on(t):this.each(xn(e,t,n))},attr:function(t,n){var e=x(t),r="transform"===e?vn:_n;return this.attrTween(t,"function"==typeof n?(e.local?function(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(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)}})(e,r,yn(this,"attr."+t,n)):null==n?(e.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(e):(e.local?function(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(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)}})(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=x(t);return this.tween(e,(r.local?mn:wn)(r,n))},style:function(t,n,e){var r,i,o,u,a,s,l,c,h,f,p,d,g,v,y,_,m,w,x,b,M,T,C,k,N,U="transform"==(t+="")?gn:_n;return null==n?this.styleTween(t,(M=t,T=U,function(){var t=A(this,M),n=(this.style.removeProperty(M),A(this,M));return t===n?null:t===C&&n===k?N:N=T(C=t,k=n)})).on("end.style."+t,Mn(t)):"function"==typeof n?this.styleTween(t,(_=U,m=yn(this,"style."+(y=t),n),function(){var t=A(this,y),n=m(this),e=n+"";return null==n&&(this.style.removeProperty(y),e=n=A(this,y)),t===e?null:t===w&&e===x?b:(x=e,b=_(w=t,n))})).each((l=this._id,v="end."+(g="style."+(c=t)),function(){var t=on(this,l),n=t.on,e=null==t.value[g]?d=d||Mn(c):void 0;n===h&&p===e||(f=(h=n).copy()).on(v,p=e),t.on=f})):this.styleTween(t,(r=t,i=U,s=(o=n)+"",function(){var t=A(this,r);return t===s?null:t===u?a:a=i(u=t,o)}),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,Tn(t,n,null==e?"":e))},text:function(t){return this.tween("text","function"==typeof t?(e=yn(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}));var n,e},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,An(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=un(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?function(t,n){var e,r;return function(){var i=on(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(t,n,e){var r,i;if("function"!=typeof e)throw new Error;return function(){var o=on(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}})(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){rn(this,t).delay=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){rn(this,t).delay=n}})(n,t)):un(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each(("function"==typeof t?function(t,n){return function(){on(this,t).duration=+n.apply(this,arguments)}}:function(t,n){return n=+n,function(){on(this,t).duration=n}})(n,t)):un(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(t,n){if("function"!=typeof n)throw new Error;return function(){on(this,t).ease=n}}(n,t)):un(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=on(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 Sn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Dn(t){return{type:t}}Q.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=2<e.state&&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)}))},Q.prototype.transition=function(t){var n,e;t=t instanceof kn?(n=t._id,t._name):(n=Nn(),(e=Sn).time=It(),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])&&Gt(u,t,n,l,a,e||function(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))return Sn.time=It(),Sn;return e}(u,n));return new kn(r,this._parents,t,n)},["w","e"].map(Dn),["n","s"].map(Dn),["n","w","e","s","nw","ne","sw","se"].map(Dn),Math.cos,Math.sin,Math.PI,Math.max,Array.prototype.slice;var En=Math.PI,Yn=2*En,zn=1e-6,Fn=Yn-zn;function Hn(){this._x0=this._y0=this._x1=this._y1=null,this._=""}Hn.prototype={constructor:Hn,moveTo:function(t,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,n){this._+="L"+(this._x1=+t)+","+(this._y1=+n)},quadraticCurveTo:function(t,n,e,r){this._+="Q"+ +t+","+ +n+","+(this._x1=+e)+","+(this._y1=+r)},bezierCurveTo:function(t,n,e,r,i,o){this._+="C"+ +t+","+ +n+","+ +e+","+ +r+","+(this._x1=+i)+","+(this._y1=+o)},arcTo:function(t,n,e,r,i){t=+t,n=+n,e=+e,r=+r,i=+i;var o,u,a,s,l,c,h,f,p,d=this._x1,g=this._y1,v=e-t,y=r-n,_=d-t,m=g-n,w=_*_+m*m;if(i<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=n):zn<w&&(Math.abs(m*v-y*_)>zn&&i?(a=v*v+y*y,s=(o=e-d)*o+(u=r-g)*u,l=Math.sqrt(a),c=Math.sqrt(w),f=(h=i*Math.tan((En-Math.acos((a+w-s)/(2*l*c)))/2))/c,p=h/l,Math.abs(f-1)>zn&&(this._+="L"+(t+f*_)+","+(n+f*m)),this._+="A"+i+","+i+",0,0,"+ +(_*u<m*o)+","+(this._x1=t+p*v)+","+(this._y1=n+p*y)):this._+="L"+(this._x1=t)+","+(this._y1=n))},arc:function(t,n,e,r,i,o){t=+t,n=+n,o=!!o;var u=(e=+e)*Math.cos(r),a=e*Math.sin(r),s=t+u,l=n+a,c=1^o,h=o?r-i:i-r;if(e<0)throw new Error("negative radius: "+e);null===this._x1?this._+="M"+s+","+l:(Math.abs(this._x1-s)>zn||Math.abs(this._y1-l)>zn)&&(this._+="L"+s+","+l),e&&(h<0&&(h=h%Yn+Yn),Fn<h?this._+="A"+e+","+e+",0,1,"+c+","+(t-u)+","+(n-a)+"A"+e+","+e+",0,1,"+c+","+(this._x1=s)+","+(this._y1=l):zn<h&&(this._+="A"+e+","+e+",0,"+ +(En<=h)+","+c+","+(this._x1=t+e*Math.cos(i))+","+(this._y1=n+e*Math.sin(i))))},rect:function(t,n,e,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+n)+"h"+ +e+"v"+ +r+"h"+-e+"Z"},toString:function(){return this._}};var qn="$";function Pn(){}function Ln(t,n){var e=new Pn;if(t instanceof Pn)t.each((function(t,n){e.set(n,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==n)for(;++i<o;)e.set(i,t[i]);else for(;++i<o;)e.set(n(r=t[i],i,t),r)}else if(t)for(var u in t)e.set(u,t[u]);return e}function jn(){}Pn.prototype=Ln.prototype={constructor:Pn,has:function(t){return qn+t in this},get:function(t){return this[qn+t]},set:function(t,n){return this[qn+t]=n,this},remove:function(t){var n=qn+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===qn&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===qn&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===qn&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===qn&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===qn&&++t;return t},empty:function(){for(var t in this)if(t[0]===qn)return!1;return!0},each:function(t){for(var n in this)n[0]===qn&&t(this[n],n.slice(1),this)}};var On=Ln.prototype;function Xn(t,n,e,r){if(isNaN(n)||isNaN(e))return t;var i,o,u,a,s,l,c,h,f,p=t._root,d={data:r},g=t._x0,v=t._y0,y=t._x1,_=t._y1;if(!p)return t._root=d,t;for(;p.length;)if((l=n>=(o=(g+y)/2))?g=o:y=o,(c=e>=(u=(v+_)/2))?v=u:_=u,!(p=(i=p)[h=c<<1|l]))return i[h]=d,t;if(a=+t._x.call(null,p.data),s=+t._y.call(null,p.data),n===a&&e===s)return d.next=p,i?i[h]=d:t._root=d,t;for(;i=i?i[h]=new Array(4):t._root=new Array(4),(l=n>=(o=(g+y)/2))?g=o:y=o,(c=e>=(u=(v+_)/2))?v=u:_=u,(h=c<<1|l)==(f=(u<=s)<<1|o<=a););return i[f]=p,i[h]=d,t}function Bn(t,n,e,r,i){this.node=t,this.x0=n,this.y0=e,this.x1=r,this.y1=i}function In(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 Vn(t){for(var n={data:t.data},e=n;t=t.next;)e=e.next={data:t.data};return n}jn.prototype={constructor:jn,has:On.has,add:function(t){return this[qn+(t+="")]=t,this},remove:On.remove,clear:On.clear,values:On.keys,size:On.size,empty:On.empty,each:On.each},Array.prototype.slice;var $n=In.prototype;function Rn(t,n){if((e=(t=n?t.toExponential(n-1):t.toExponential()).indexOf("e"))<0)return null;var e,r=t.slice(0,e);return[1<r.length?r[0]+r.slice(2):r,+t.slice(e+1)]}$n.copy=function(){var t,n,e=new In(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=Vn(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]=Vn(n));return e},$n.add=function(t){var n=+this._x.call(null,t),e=+this._y.call(null,t);return Xn(this.cover(n,e),n,e,t)},$n.addAll=function(t){for(var n,e,r,i=t.length,o=new Array(i),u=new Array(i),a=1/0,s=1/0,l=-1/0,c=-1/0,h=0;h<i;++h)isNaN(e=+this._x.call(null,n=t[h]))||isNaN(r=+this._y.call(null,n))||((o[h]=e)<a&&(a=e),l<e&&(l=e),(u[h]=r)<s&&(s=r),c<r&&(c=r));if(l<a||c<s)return this;for(this.cover(a,s).cover(l,c),h=0;h<i;++h)Xn(this,o[h],u[h],t[h]);return this},$n.cover=function(t,n){if(isNaN(t=+t)||isNaN(n=+n))return this;var e=this._x0,r=this._y0,i=this._x1,o=this._y1;if(isNaN(e))i=(e=Math.floor(t))+1,o=(r=Math.floor(n))+1;else{for(var u,a,s=i-e,l=this._root;t<e||i<=t||n<r||o<=n;)switch(a=(n<r)<<1|t<e,(u=new Array(4))[a]=l,l=u,s*=2,a){case 0:i=e+s,o=r+s;break;case 1:e=i-s,o=r+s;break;case 2:i=e+s,r=o-s;break;case 3:e=i-s,r=o-s}this._root&&this._root.length&&(this._root=l)}return this._x0=e,this._y0=r,this._x1=i,this._y1=o,this},$n.data=function(){var t=[];return this.visit((function(n){if(!n.length)for(;t.push(n.data),n=n.next;);})),t},$n.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},$n.find=function(t,n,e){var r,i,o,u,a,s,l,c,h,f,p,d,g,v=this._x0,y=this._y0,_=this._x1,m=this._y1,w=[],x=this._root;for(x&&w.push(new Bn(x,v,y,_,m)),null==e?e=1/0:(v=t-e,y=n-e,_=t+e,m=n+e,e*=e);a=w.pop();)!(x=a.node)||(r=a.x0)>_||(i=a.y0)>m||(o=a.x1)<v||(u=a.y1)<y||(x.length?(l=(r+o)/2,c=(i+u)/2,w.push(new Bn(x[3],l,c,o,u),new Bn(x[2],r,c,l,u),new Bn(x[1],l,i,o,c),new Bn(x[0],r,i,l,c)),(s=(c<=n)<<1|l<=t)&&(a=w[w.length-1],w[w.length-1]=w[w.length-1-s],w[w.length-1-s]=a)):(p=(h=t-this._x.call(null,x.data))*h+(f=n-this._y.call(null,x.data))*f)<e&&(v=t-(d=Math.sqrt(e=p)),y=n-d,_=t+d,m=n+d,g=x.data));return g},$n.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(u=+this._y.call(null,t)))return this;var n,e,r,i,o,u,a,s,l,c,h,f,p=this._root,d=this._x0,g=this._y0,v=this._x1,y=this._y1;if(!p)return this;if(p.length)for(;;){if((l=o>=(a=(d+v)/2))?d=a:v=a,(c=u>=(s=(g+y)/2))?g=s:y=s,!(p=(n=p)[h=c<<1|l]))return this;if(!p.length)break;(n[h+1&3]||n[h+2&3]||n[h+3&3])&&(e=n,f=h)}for(;p.data!==t;)if(!(p=(r=p).next))return this;return(i=p.next)&&delete p.next,r?i?r.next=i:delete r.next:n?(i?n[h]=i:delete n[h],(p=n[0]||n[1]||n[2]||n[3])&&p===(n[3]||n[2]||n[1]||n[0])&&!p.length&&(e?e[f]=p:this._root=p)):this._root=i,this},$n.removeAll=function(t){for(var n=0,e=t.length;n<e;++n)this.remove(t[n]);return this},$n.root=function(){return this._root},$n.size=function(){var t=0;return this.visit((function(n){if(!n.length)for(;++t,n=n.next;);})),t},$n.visit=function(t){var n,e,r,i,o,u,a,s,l=[],c=this._root;for(c&&l.push(new Bn(c,this._x0,this._y0,this._x1,this._y1));n=l.pop();)!t(c=n.node,r=n.x0,i=n.y0,o=n.x1,u=n.y1)&&c.length&&(a=(r+o)/2,s=(i+u)/2,(e=c[3])&&l.push(new Bn(e,a,s,o,u)),(e=c[2])&&l.push(new Bn(e,r,s,a,u)),(e=c[1])&&l.push(new Bn(e,a,i,o,s)),(e=c[0])&&l.push(new Bn(e,r,i,a,s)));return this},$n.visitAfter=function(t){var n,e=[],r=[];for(this._root&&e.push(new Bn(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i,o,u,a,s,l,c,h=n.node;h.length&&(o=n.x0,u=n.y0,l=(o+(a=n.x1))/2,c=(u+(s=n.y1))/2,(i=h[0])&&e.push(new Bn(i,o,u,l,c)),(i=h[1])&&e.push(new Bn(i,l,u,a,c)),(i=h[2])&&e.push(new Bn(i,o,c,l,s)),(i=h[3])&&e.push(new Bn(i,l,c,a,s))),r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this},$n.x=function(t){return arguments.length?(this._x=t,this):this._x},$n.y=function(t){return arguments.length?(this._y=t,this):this._y},Math.PI,Math.sqrt(5);var Zn=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Wn(t){if(!(n=Zn.exec(t)))throw new Error("invalid format: "+t);var n;return new Qn({fill:n[1],align:n[2],sign:n[3],symbol:n[4],zero:n[5],width:n[6],comma:n[7],precision:n[8]&&n[8].slice(1),trim:n[9],type:n[10]})}function Qn(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Jn(t,n){var e=Rn(t,n);if(!e)return t+"";var r=e[0],i=e[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}function Gn(t){return t}Wn.prototype=Qn.prototype,Qn.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var Kn,te,ne={"%":function(t,n){return(100*t).toFixed(n)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},g:function(t,n){return t.toPrecision(n)},o:function(t){return Math.round(t).toString(8)},p:function(t,n){return Jn(100*t,n)},r:Jn,s:function(t,n){var e=Rn(t,n);if(!e)return t+"";var r=e[0],i=e[1],o=i-(Kn=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,u=r.length;return o===u?r:u<o?r+new Array(o-u+1).join("0"):0<o?r.slice(0,o)+"."+r.slice(o):"0."+new Array(1-o).join("0")+Rn(t,Math.max(0,n+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},ee=Array.prototype.map,re=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ie(t){var n=0,e=t.children,r=e&&e.length;if(r)for(;0<=--r;)n+=e[r].value;else n=1;t.value=n}function oe(t,n){var e,r,i,o,u,a=new le(t),s=+t.value&&(a.value=t.value),l=[a];for(null==n&&(n=ue);e=l.pop();)if(s&&(e.value=+e.data.value),(i=n(e.data))&&(u=i.length))for(e.children=new Array(u),o=u-1;0<=o;--o)l.push(r=e.children[o]=new le(i[o])),r.parent=e,r.depth=e.depth+1;return a.eachBefore(se)}function ue(t){return t.children}function ae(t){t.data=t.data.data}function se(t){for(var n=0;t.height=n,(t=t.parent)&&t.height<++n;);}function le(t){this.data=t,this.depth=this.height=0,this.parent=null}function ce(t,n){return t.parent===n.parent?1:2}function he(t){var n=t.children;return n?n[0]:t.t}function fe(t){var n=t.children;return n?n[n.length-1]:t.t}function pe(t,n){this._=t,this.parent=null,this.children=null,this.A=null,(this.a=this).z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=n}function de(){return Math.random()}(te=function(t){var n,e,r,i=void 0===t.grouping||void 0===t.thousands?Gn:(e=ee.call(t.grouping,Number),r=t.thousands+"",function(t,n){for(var i=t.length,o=[],u=0,a=e[0],s=0;0<i&&0<a&&(n<s+a+1&&(a=Math.max(1,n-s)),o.push(t.substring(i-=a,i+a)),!((s+=a+1)>n));)a=e[u=(u+1)%e.length];return o.reverse().join(r)}),o=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Gn:(n=ee.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,(function(t){return n[+t]}))}),l=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function f(t){var n=(t=Wn(t)).fill,e=t.align,r=t.sign,f=t.symbol,p=t.zero,d=t.width,g=t.comma,v=t.precision,y=t.trim,_=t.type;"n"===_?(g=!0,_="g"):ne[_]||(void 0===v&&(v=12),y=!0,_="g"),(p||"0"===n&&"="===e)&&(p=!0,n="0",e="=");var m="$"===f?o:"#"===f&&/[boxX]/.test(_)?"0"+_.toLowerCase():"",w="$"===f?u:/[%p]/.test(_)?l:"",x=ne[_],b=/[defgprs%]/.test(_);function M(t){var o,u,l,f=m,M=w;if("c"===_)M=x(t)+M,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?h:x(Math.abs(t),v),y&&(t=function(t){t:for(var n,e=t.length,r=1,i=-1;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":0===i&&(i=r),n=r;break;default:if(!+t[r])break t;0<i&&(i=0)}return 0<i?t.slice(0,i)+t.slice(n+1):t}(t)),T&&0==+t&&"+"!==r&&(T=!1),f=(T?"("===r?r:c:"-"===r||"("===r?"":r)+f,M=("s"===_?re[8+Kn/3]:"")+M+(T&&"("===r?")":""),b)for(o=-1,u=t.length;++o<u;)if((l=t.charCodeAt(o))<48||57<l){M=(46===l?a+t.slice(o+1):t.slice(o))+M,t=t.slice(0,o);break}}g&&!p&&(t=i(t,1/0));var A=f.length+t.length+M.length,C=A<d?new Array(d-A+1).join(n):"";switch(g&&p&&(t=i(C+t,C.length?d-M.length:1/0),C=""),e){case"<":t=f+t+M+C;break;case"=":t=f+C+t+M;break;case"^":t=C.slice(0,A=C.length>>1)+f+t+M+C.slice(A);break;default:t=C+f+t+M}return s(t)}return v=void 0===v?6:/[gprs]/.test(_)?Math.max(1,Math.min(21,v)):Math.max(0,Math.min(20,v)),M.toString=function(){return t+""},M}return{format:f,formatPrefix:function(t,n){var e=f(((t=Wn(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(function(t){return(t=Rn(Math.abs(t)))?t[1]:NaN}(n)/3))),i=Math.pow(10,-r),o=re[8+r/3];return function(t){return e(i*t)+o}}}}({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"})).format,te.formatPrefix,le.prototype=oe.prototype={constructor:le,count:function(){return this.eachAfter(ie)},each:function(t){var n,e,r,i,o=this,u=[o];do{for(n=u.reverse(),u=[];o=n.pop();)if(t(o),e=o.children)for(r=0,i=e.length;r<i;++r)u.push(e[r])}while(u.length);return this},eachAfter:function(t){for(var n,e,r,i=this,o=[i],u=[];i=o.pop();)if(u.push(i),n=i.children)for(e=0,r=n.length;e<r;++e)o.push(n[e]);for(;i=u.pop();)t(i);return this},eachBefore:function(t){for(var n,e,r=this,i=[r];r=i.pop();)if(t(r),n=r.children)for(e=n.length-1;0<=e;--e)i.push(n[e]);return this},sum:function(t){return this.eachAfter((function(n){for(var e=+t(n.data)||0,r=n.children,i=r&&r.length;0<=--i;)e+=r[i].value;n.value=e}))},sort:function(t){return this.eachBefore((function(n){n.children&&n.children.sort(t)}))},path:function(t){for(var n=this,e=function(t,n){if(t===n)return t;var e=t.ancestors(),r=n.ancestors(),i=null;for(t=e.pop(),n=r.pop();t===n;)i=t,t=e.pop(),n=r.pop();return i}(n,t),r=[n];n!==e;)n=n.parent,r.push(n);for(var i=r.length;t!==e;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,n=[t];t=t.parent;)n.push(t);return n},descendants:function(){var t=[];return this.each((function(n){t.push(n)})),t},leaves:function(){var t=[];return this.eachBefore((function(n){n.children||t.push(n)})),t},links:function(){var t=this,n=[];return t.each((function(e){e!==t&&n.push({source:e.parent,target:e})})),n},copy:function(){return oe(this).eachBefore(ae)}},pe.prototype=Object.create(le.prototype),function t(n){function e(t,e){return t=null==t?0:+t,e=null==e?1:+e,1===arguments.length?(e=t,t=0):e-=t,function(){return n()*e+t}}return e.source=t,e}(de);var ge=function t(n){function e(t,e){var r,i;return t=null==t?0:+t,e=null==e?1:+e,function(){var o;if(null!=r)o=r,r=null;else for(;r=2*n()-1,o=2*n()-1,!(i=r*r+o*o)||1<i;);return t+e*o*Math.sqrt(-2*Math.log(i)/i)}}return e.source=t,e}(de),ve=(function t(n){function e(){var t=ge.source(n).apply(this,arguments);return function(){return Math.exp(t())}}return e.source=t,e}(de),function t(n){function e(t){return function(){for(var e=0,r=0;r<t;++r)e+=n();return e}}return e.source=t,e}(de));(function t(n){function e(t){var e=ve.source(n)(t);return function(){return e()/t}}return e.source=t,e})(de),function t(n){function e(t){return function(){return-Math.log(1-n())/t}}return e.source=t,e}(de);var ye=Array.prototype;ye.map,ye.slice;var _e=new Date,me=new Date;function we(t,n,e,r){function i(n){return t(n=0===arguments.length?new Date:new Date(+n)),n}return i.floor=function(n){return t(n=new Date(+n)),n},i.ceil=function(e){return t(e=new Date(e-1)),n(e,1),t(e),e},i.round=function(t){var n=i(t),e=i.ceil(t);return t-n<e-t?n:e},i.offset=function(t,e){return n(t=new Date(+t),null==e?1:Math.floor(e)),t},i.range=function(e,r,o){var u,a=[];if(e=i.ceil(e),o=null==o?1:Math.floor(o),!(e<r&&0<o))return a;for(;a.push(u=new Date(+e)),n(e,o),t(e),u<e&&e<r;);return a},i.filter=function(e){return we((function(n){if(n<=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,r){if(t<=t)if(r<0)for(;++r<=0;)for(;n(t,-1),!e(t););else for(;0<=--r;)for(;n(t,1),!e(t););}))},e&&(i.count=function(n,r){return _e.setTime(+n),me.setTime(+r),t(_e),t(me),Math.floor(e(_e,me))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&0<t?1<t?i.filter(r?function(n){return r(n)%t==0}:function(n){return i.count(0,n)%t==0}):i:null}),i}var xe=we((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,n){t.setFullYear(t.getFullYear()+n)}),(function(t,n){return n.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));xe.every=function(t){return isFinite(t=Math.floor(t))&&0<t?we((function(n){n.setFullYear(Math.floor(n.getFullYear()/t)*t),n.setMonth(0,1),n.setHours(0,0,0,0)}),(function(n,e){n.setFullYear(n.getFullYear()+e*t)})):null};var be=xe;function Me(t){return we((function(n){n.setDate(n.getDate()-(n.getDay()+7-t)%7),n.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+7*n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}(xe.range,we((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,n){t.setMonth(t.getMonth()+n)}),(function(t,n){return n.getMonth()-t.getMonth()+12*(n.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()}))).range;var Te=Me(0),Ae=Me(1),Ce=Me(2),ke=Me(3),Ne=Me(4),Ue=Me(5),Se=Me(6),De=(Te.range,Ae.range,Ce.range,ke.range,Ne.range,Ue.range,Se.range,we((function(t){t.setHours(0,0,0,0)}),(function(t,n){t.setDate(t.getDate()+n)}),(function(t,n){return(n-t-6e4*(n.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}))),Ee=De,Ye=((((De.range,we((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getHours()}))).range,we((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getMinutes()}))).range,we((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,n){t.setTime(+t+1e3*n)}),(function(t,n){return(n-t)/1e3}),(function(t){return t.getUTCSeconds()}))).range,we((function(){}),(function(t,n){t.setTime(+t+n)}),(function(t,n){return n-t})));function ze(t){return we((function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-t)%7),n.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+7*n)}),(function(t,n){return(n-t)/6048e5}))}Ye.every=function(t){return t=Math.floor(t),isFinite(t)&&0<t?1<t?we((function(n){n.setTime(Math.floor(n/t)*t)}),(function(n,e){n.setTime(+n+e*t)}),(function(n,e){return(e-n)/t})):Ye:null},Ye.range;var Fe=ze(0),He=ze(1),qe=ze(2),Pe=ze(3),Le=ze(4),je=ze(5),Oe=ze(6),Xe=(Fe.range,He.range,qe.range,Pe.range,Le.range,je.range,Oe.range,we((function(t){t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCDate(t.getUTCDate()+n)}),(function(t,n){return(n-t)/864e5}),(function(t){return t.getUTCDate()-1}))),Be=Xe,Ie=(Xe.range,we((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n)}),(function(t,n){return n.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));Ie.every=function(t){return isFinite(t=Math.floor(t))&&0<t?we((function(n){n.setUTCFullYear(Math.floor(n.getUTCFullYear()/t)*t),n.setUTCMonth(0,1),n.setUTCHours(0,0,0,0)}),(function(n,e){n.setUTCFullYear(n.getUTCFullYear()+e*t)})):null};var Ve=Ie;function $e(t){if(0<=t.y&&t.y<100){var n=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return n.setFullYear(t.y),n}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Re(t){if(0<=t.y&&t.y<100){var n=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return n.setUTCFullYear(t.y),n}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ze(t,n,e){return{y:t,m:n,d:e,H:0,M:0,S:0,L:0}}Ie.range;var We,Qe={"-":"",_:" ",0:"0"},Je=/^\s*\d+/,Ge=/^%/,Ke=/[\\^$*+?|[\]().{}]/g;function tr(t,n,e){var r=t<0?"-":"",i=(r?-t:t)+"",o=i.length;return r+(o<e?new Array(e-o+1).join(n)+i:i)}function nr(t){return t.replace(Ke,"\\$&")}function er(t){return new RegExp("^(?:"+t.map(nr).join("|")+")","i")}function rr(t){for(var n={},e=-1,r=t.length;++e<r;)n[t[e].toLowerCase()]=e;return n}function ir(t,n,e){var r=Je.exec(n.slice(e,e+1));return r?(t.w=+r[0],e+r[0].length):-1}function or(t,n,e){var r=Je.exec(n.slice(e,e+1));return r?(t.u=+r[0],e+r[0].length):-1}function ur(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.U=+r[0],e+r[0].length):-1}function ar(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.V=+r[0],e+r[0].length):-1}function sr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.W=+r[0],e+r[0].length):-1}function lr(t,n,e){var r=Je.exec(n.slice(e,e+4));return r?(t.y=+r[0],e+r[0].length):-1}function cr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.y=+r[0]+(68<+r[0]?1900:2e3),e+r[0].length):-1}function hr(t,n,e){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(n.slice(e,e+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),e+r[0].length):-1}function fr(t,n,e){var r=Je.exec(n.slice(e,e+1));return r?(t.q=3*r[0]-3,e+r[0].length):-1}function pr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function dr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function gr(t,n,e){var r=Je.exec(n.slice(e,e+3));return r?(t.m=0,t.d=+r[0],e+r[0].length):-1}function vr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function yr(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function _r(t,n,e){var r=Je.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function mr(t,n,e){var r=Je.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function wr(t,n,e){var r=Je.exec(n.slice(e,e+6));return r?(t.L=Math.floor(r[0]/1e3),e+r[0].length):-1}function xr(t,n,e){var r=Ge.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function br(t,n,e){var r=Je.exec(n.slice(e));return r?(t.Q=+r[0],e+r[0].length):-1}function Mr(t,n,e){var r=Je.exec(n.slice(e));return r?(t.s=+r[0],e+r[0].length):-1}function Tr(t,n){return tr(t.getDate(),n,2)}function Ar(t,n){return tr(t.getHours(),n,2)}function Cr(t,n){return tr(t.getHours()%12||12,n,2)}function kr(t,n){return tr(1+Ee.count(be(t),t),n,3)}function Nr(t,n){return tr(t.getMilliseconds(),n,3)}function Ur(t,n){return Nr(t,n)+"000"}function Sr(t,n){return tr(t.getMonth()+1,n,2)}function Dr(t,n){return tr(t.getMinutes(),n,2)}function Er(t,n){return tr(t.getSeconds(),n,2)}function Yr(t){var n=t.getDay();return 0===n?7:n}function zr(t,n){return tr(Te.count(be(t)-1,t),n,2)}function Fr(t,n){var e=t.getDay();return t=4<=e||0===e?Ne(t):Ne.ceil(t),tr(Ne.count(be(t),t)+(4===be(t).getDay()),n,2)}function Hr(t){return t.getDay()}function qr(t,n){return tr(Ae.count(be(t)-1,t),n,2)}function Pr(t,n){return tr(t.getFullYear()%100,n,2)}function Lr(t,n){return tr(t.getFullYear()%1e4,n,4)}function jr(t){var n=t.getTimezoneOffset();return(0<n?"-":(n*=-1,"+"))+tr(n/60|0,"0",2)+tr(n%60,"0",2)}function Or(t,n){return tr(t.getUTCDate(),n,2)}function Xr(t,n){return tr(t.getUTCHours(),n,2)}function Br(t,n){return tr(t.getUTCHours()%12||12,n,2)}function Ir(t,n){return tr(1+Be.count(Ve(t),t),n,3)}function Vr(t,n){return tr(t.getUTCMilliseconds(),n,3)}function $r(t,n){return Vr(t,n)+"000"}function Rr(t,n){return tr(t.getUTCMonth()+1,n,2)}function Zr(t,n){return tr(t.getUTCMinutes(),n,2)}function Wr(t,n){return tr(t.getUTCSeconds(),n,2)}function Qr(t){var n=t.getUTCDay();return 0===n?7:n}function Jr(t,n){return tr(Fe.count(Ve(t)-1,t),n,2)}function Gr(t,n){var e=t.getUTCDay();return t=4<=e||0===e?Le(t):Le.ceil(t),tr(Le.count(Ve(t),t)+(4===Ve(t).getUTCDay()),n,2)}function Kr(t){return t.getUTCDay()}function ti(t,n){return tr(He.count(Ve(t)-1,t),n,2)}function ni(t,n){return tr(t.getUTCFullYear()%100,n,2)}function ei(t,n){return tr(t.getUTCFullYear()%1e4,n,4)}function ri(){return"+0000"}function ii(){return"%"}function oi(t){return+t}function ui(t){return Math.floor(t/1e3)}function ai(t,n,e){this.k=t,this.x=n,this.y=e}(We=function(t){var n=t.dateTime,e=t.date,r=t.time,i=t.periods,o=t.days,u=t.shortDays,a=t.months,s=t.shortMonths,l=er(i),c=rr(i),h=er(o),f=rr(o),p=er(u),d=rr(u),g=er(a),v=rr(a),y=er(s),_=rr(s),m={a:function(t){return u[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return s[t.getMonth()]},B:function(t){return a[t.getMonth()]},c:null,d:Tr,e:Tr,f:Ur,H:Ar,I:Cr,j:kr,L:Nr,m:Sr,M:Dr,p:function(t){return i[+(12<=t.getHours())]},q:function(t){return 1+~~(t.getMonth()/3)},Q:oi,s:ui,S:Er,u:Yr,U:zr,V:Fr,w:Hr,W:qr,x:null,X:null,y:Pr,Y:Lr,Z:jr,"%":ii},w={a:function(t){return u[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return s[t.getUTCMonth()]},B:function(t){return a[t.getUTCMonth()]},c:null,d:Or,e:Or,f:$r,H:Xr,I:Br,j:Ir,L:Vr,m:Rr,M:Zr,p:function(t){return i[+(12<=t.getUTCHours())]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:oi,s:ui,S:Wr,u:Qr,U:Jr,V:Gr,w:Kr,W:ti,x:null,X:null,y:ni,Y:ei,Z:ri,"%":ii},x={a:function(t,n,e){var r=p.exec(n.slice(e));return r?(t.w=d[r[0].toLowerCase()],e+r[0].length):-1},A:function(t,n,e){var r=h.exec(n.slice(e));return r?(t.w=f[r[0].toLowerCase()],e+r[0].length):-1},b:function(t,n,e){var r=y.exec(n.slice(e));return r?(t.m=_[r[0].toLowerCase()],e+r[0].length):-1},B:function(t,n,e){var r=g.exec(n.slice(e));return r?(t.m=v[r[0].toLowerCase()],e+r[0].length):-1},c:function(t,e,r){return T(t,n,e,r)},d:dr,e:dr,f:wr,H:vr,I:vr,j:gr,L:mr,m:pr,M:yr,p:function(t,n,e){var r=l.exec(n.slice(e));return r?(t.p=c[r[0].toLowerCase()],e+r[0].length):-1},q:fr,Q:br,s:Mr,S:_r,u:or,U:ur,V:ar,w:ir,W:sr,x:function(t,n,r){return T(t,e,n,r)},X:function(t,n,e){return T(t,r,n,e)},y:cr,Y:lr,Z:hr,"%":xr};function b(t,n){return function(e){var r,i,o,u=[],a=-1,s=0,l=t.length;for(e instanceof Date||(e=new Date(+e));++a<l;)37===t.charCodeAt(a)&&(u.push(t.slice(s,a)),null!=(i=Qe[r=t.charAt(++a)])?r=t.charAt(++a):i="e"===r?" ":"0",(o=n[r])&&(r=o(e,i)),u.push(r),s=a+1);return u.push(t.slice(s,a)),u.join("")}}function M(t,n){return function(e){var r,i,o=Ze(1900,void 0,1);if(T(o,t,e+="",0)!=e.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!n||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||53<o.V)return null;"w"in o||(o.w=1),"Z"in o?(r=4<(i=(r=Re(Ze(o.y,0,1))).getUTCDay())||0===i?He.ceil(r):He(r),r=Be.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(r=4<(i=(r=$e(Ze(o.y,0,1))).getDay())||0===i?Ae.ceil(r):Ae(r),r=Ee.offset(r,7*(o.V-1)),o.y=r.getFullYear(),o.m=r.getMonth(),o.d=r.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),i="Z"in o?Re(Ze(o.y,0,1)).getUTCDay():$e(Ze(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(i+5)%7:o.w+7*o.U-(i+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,Re(o)):$e(o)}}function T(t,n,e,r){for(var i,o,u=0,a=n.length,s=e.length;u<a;){if(s<=r)return-1;if(37===(i=n.charCodeAt(u++))){if(i=n.charAt(u++),!(o=x[i in Qe?n.charAt(u++):i])||(r=o(t,e,r))<0)return-1}else if(i!=e.charCodeAt(r++))return-1}return r}return m.x=b(e,m),m.X=b(r,m),m.c=b(n,m),w.x=b(e,w),w.X=b(r,w),w.c=b(n,w),{format:function(t){var n=b(t+="",m);return n.toString=function(){return t},n},parse:function(t){var n=M(t+="",!1);return n.toString=function(){return t},n},utcFormat:function(t){var n=b(t+="",w);return n.toString=function(){return t},n},utcParse:function(t){var n=M(t+="",!0);return n.toString=function(){return t},n}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,We.parse,We.utcFormat,We.utcParse,((we((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,n){t.setUTCMonth(t.getUTCMonth()+n)}),(function(t,n){return n.getUTCMonth()-t.getUTCMonth()+12*(n.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})).range,we((function(t){t.setUTCMinutes(0,0,0)}),(function(t,n){t.setTime(+t+36e5*n)}),(function(t,n){return(n-t)/36e5}),(function(t){return t.getUTCHours()}))).range,we((function(t){t.setUTCSeconds(0,0)}),(function(t,n){t.setTime(+t+6e4*n)}),(function(t,n){return(n-t)/6e4}),(function(t){return t.getUTCMinutes()}))).range,Math.SQRT2,ai.prototype={constructor:ai,scale:function(t){return 1===t?this:new ai(this.k*t,this.x,this.y)},translate:function(t,n){return 0===t&0===n?this:new ai(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},new ai(1,0,0);var si={id:"collapsible_tree",label:"Collapsible Tree",options:{color_with_children:{label:"Node Color With Children",default:"#36c1b3",type:"string",display:"color"},color_empty:{label:"Empty Node Color",default:"#fff",type:"string",display:"color"}},create:function(t,n){this.svg=function(t){return"string"==typeof t?new Z([[document.querySelector(t)]],[document.documentElement]):new Z([[t]],R)}(t).append("svg")},update:function(t,n,e,r){var i,o,u,a,s,l,c,h,f,p,d,g,v,y,_,m;function w(t,n){return("\n M "+t.y+" "+t.x+"\n C "+(t.y+n.y)/2+" "+t.x+",\n "+(t.y+n.y)/2+" "+n.x+",\n "+n.y+" "+n.x+"\n ").trim()}function x(t){t.children?(t._children=t.children,t.children=null):(t.children=t._children,t._children=null),b(t)}function b(t){var n=_(m),e=n.descendants(),r=n.descendants().slice(1);e.forEach((function(t){t.y=180*t.depth}));var l=y.selectAll("g.node").data(e,(function(t){return t.id||(t.id=++i)})),c=l.enter().append("g").attr("class","node").attr("transform",(function(n){return"translate("+t.y0+","+t.x0+")"}));c.append("circle").attr("class","node").attr("r",1e-6).on("click",x),c.append("text").attr("dy",".35em").attr("x",(function(t){return t.children||t._children?-u:u})).attr("text-anchor",(function(t){return t.children||t._children?"end":"start"})).style("cursor","pointer").style("font-family","'Open Sans', Helvetica, sans-serif").style("font-size",u+"px").text((function(t){return t.data.name})).on("click",(function(t){LookerCharts.Utils.openDrillMenu({links:g.get(t.data.name),event:event})}));var h=c.merge(l);h.transition().duration(s).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})),h.select("circle.node").attr("r",a).style("fill",(function(t){return t._children?o.children:o.empty})).style("stroke",o.children).style("stroke-width",1.5).attr("cursor","pointer");var f=l.exit().transition().duration(s).attr("transform",(function(n){return"translate("+t.y+","+t.x+")"})).remove();f.select("circle").attr("r",1e-6),f.select("text").style("fill-opacity",1e-6);var p=y.selectAll("path.link").data(r,(function(t){return t.id}));p.enter().insert("path","g").attr("class","link").style("fill","none").style("stroke","#ddd").style("stroke-width",1.5).attr("d",(function(n){var e={x:t.x0,y:t.y0};return w(e,e)})).merge(p).transition().duration(s).attr("d",(function(t){return w(t,t.parent)})),p.exit().transition().duration(s).attr("d",(function(n){var e={x:t.x,y:t.y};return w(e,e)})).remove(),e.forEach((function(t){t.x0=t.x,t.y0=t.y}))}(function(t,n,e){function r(n,e,r,i,o){return!(!t.addError||!t.clearErrors||(r<i?(t.addError({title:"Not Enough "+e+"s",message:"This visualization requires "+(i===o?"exactly":"at least")+" "+i+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):o<r?(t.addError({title:"Too Many "+e+"s",message:"This visualization requires "+(i===o?"exactly":"no more than")+" "+o+" "+e.toLowerCase()+(1===i?"":"s")+".",group:n}),1):(t.clearErrors(n),0)))}var i=n.fields,o=i.pivots,u=i.dimensions,a=i.measure_like;return r("pivot-req","Pivot",o.length,e.min_pivots,e.max_pivots)&&r("dim-req","Dimension",u.length,e.min_dimensions,e.max_dimensions)&&r("mes-req","Measure",a.length,e.min_measures,e.max_measures)})(this,r,{min_pivots:0,max_pivots:0,min_dimensions:2,max_dimensions:void 0,min_measures:0,max_measures:void 0})&&(i=0,o={children:e&&e.color_with_children||this.options.color_with_children.default,empty:e&&e.color_empty||this.options.color_empty.default},a=4,s=750,f=h=c=l=u=10,p=n.clientWidth-f-c,d=n.clientHeight-l-h,g=new Map,v=function(t,n,e){var r={};return t.forEach((function(t){var i=r;n.forEach((function(n){var r=t[n.name].value;e.set(r,t[n.name].links),i[r]=r in i?i[r]:{},i=i[r]})),i.__data=t})),{name:"root",children:function t(n,e,r){void 0===r&&(r=0);var i,o=[];for(var u in n)"__data"!==u&&(i={name:u,depth:r,children:t(n[u],e,r+1)},"__data"in n[u]&&(i.data=n[u].__data),o.push(i));return o}(r,n,1),depth:0,links:e}}(t,r.fields.dimension_like,g),y=this.svg.html("").attr("width",p+c+f).attr("height",d+l+h).append("g").attr("transform","translate("+f+","+l+")"),_=function(){var t=ce,n=1,e=1,r=null;function i(i){var s,l,c,h,f,p,d,g=function(t){for(var n,e,r,i,o,u=new pe(t,0),a=[u];n=a.pop();)if(r=n._.children)for(n.children=new Array(o=r.length),i=o-1;0<=i;--i)a.push(e=n.children[i]=new pe(r[i],i)),e.parent=n;return(u.parent=new pe(null,0)).children=[u],u}(i);return g.eachAfter(o),g.parent.m=-g.z,g.eachBefore(u),r?i.eachBefore(a):((c=l=s=i).eachBefore((function(t){t.x<s.x&&(s=t),t.x>l.x&&(l=t),t.depth>c.depth&&(c=t)})),h=s===l?1:t(s,l)/2,f=h-s.x,p=n/(l.x+h+f),d=e/(c.depth||1),i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*d}))),i}function o(n){var e,r=n.children,i=n.parent.children,o=n.i?i[n.i-1]:null;r?(function(t){for(var n,e=0,r=0,i=t.children,o=i.length;0<=--o;)(n=i[o]).z+=e,n.m+=e,e+=n.s+(r+=n.c)}(n),e=(r[0].z+r[r.length-1].z)/2,o?(n.z=o.z+t(n._,o._),n.m=n.z-e):n.z=e):o&&(n.z=o.z+t(n._,o._)),n.parent.A=function(n,e,r){if(e){for(var i,o=n,u=n,a=e,s=o.parent.children[0],l=o.m,c=u.m,h=a.m,f=s.m;a=fe(a),o=he(o),a&&o;)s=he(s),(u=fe(u)).a=n,0<(i=a.z+h-o.z-l+t(a._,o._))&&(function(t,n,e){var r=e/(n.i-t.i);n.c-=r,n.s+=e,t.c+=r,n.z+=e,n.m+=e}(function(t,n,e){return t.a.parent===n.parent?t.a:e}(a,n,r),n,i),l+=i,c+=i),h+=a.m,l+=o.m,f+=s.m,c+=u.m;a&&!fe(u)&&(u.t=a,u.m+=h-c),o&&!he(s)&&(s.t=o,s.m+=l-f,r=n)}return r}(n,o,n.parent.A||i[0])}function u(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function a(t){t.x*=n,t.y=t.depth*e}return i.separation=function(n){return arguments.length?(t=n,i):t},i.size=function(t){return arguments.length?(r=!1,n=+t[0],e=+t[1],i):r?null:[n,e]},i.nodeSize=function(t){return arguments.length?(r=!0,n=+t[0],e=+t[1],i):r?[n,e]:null},i}().size([d,p]),(m=oe(v,(function(t){return t.children}))).x0=d/2,m.y0=0,m.children.forEach((function t(n){n.children&&(n._children=n.children,n._children.forEach(t),n.children=null)})),b(m))}};looker.plugins.visualizations.add(si)}},t.c=e,t.d=function(n,e,r){t.o(n,e)||Object.defineProperty(n,e,{enumerable:!0,get:r})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(n,e){if(1&e&&(n=t(n)),8&e)return n;if(4&e&&"object"==typeof n&&n&&n.__esModule)return n;var r=Object.create(null);if(t.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:n}),2&e&&"string"!=typeof n)for(var i in n)t.d(r,i,function(t){return n[t]}.bind(null,i));return r},t.n=function(n){var e=n&&n.__esModule?function(){return n.default}:function(){return n};return t.d(e,"a",e),e},t.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},t.p="",t(t.s=33);function t(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return n[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n,e}));