!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.dagreD3=n():t.dagreD3=n()}("undefined"!=typeof self?self:this,function(){return function(t){function n(r){if(e[r])return e[r].exports;var u=e[r]={i:r,l:!1,exports:{}};return t[r].call(u.exports,u,u.exports,n),u.l=!0,u.exports}var e={};return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:r})},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},n.p="",n(n.s=18)}([function(t,n,e){var r;try{r=e(2)}catch(t){}r||(r=window._),t.exports=r},function(t,n,e){"use strict";function r(t,n){return!!t.children(n).length}function u(t){return i(t.v)+":"+i(t.w)+":"+i(t.name)}function i(t){return t?String(t).replace(s,"\\:"):""}function o(t,n){n&&t.attr("style",n)}function a(t,n,e){n&&t.attr("class",n).attr("class",e+" "+t.attr("class"))}function c(t,n){var e=n.graph();if(l.default.isPlainObject(e)){var r=e.transition;if(l.default.isFunction(r))return r(t)}return t}Object.defineProperty(n,"__esModule",{value:!0});var f=e(2),l=function(t){return t&&t.__esModule?t:{default:t}}(f),s=/:/g;n.default={isSubgraph:r,edgeToId:u,applyStyle:o,applyClass:a,applyTransition:c}},function(t,n,e){(function(t,r){var u;(function(){function i(t,n){return t.set(n[0],n[1]),t}function o(t,n){return t.add(n),t}function a(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function c(t,n,e,r){for(var u=-1,i=null==t?0:t.length;++u-1}function p(t,n,e){for(var r=-1,u=null==t?0:t.length;++r-1;);return e}function q(t,n){for(var e=t.length;e--&&k(n,t[e],0)>-1;);return e}function U(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}function F(t){return"\\"+je[t]}function B(t,n){return null==t?ut:t[n]}function W(t){return me.test(t)}function Y(t){return xe.test(t)}function H(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}function V(t){var n=-1,e=Array(t.size);return t.forEach(function(t,r){e[++n]=[r,t]}),e}function $(t,n){return function(e){return t(n(e))}}function G(t,n){for(var e=-1,r=t.length,u=0,i=[];++e>>1,qt=[["ary",Mt],["bind",vt],["bindKey",yt],["curry",mt],["curryRight",xt],["flip",Et],["partial",bt],["partialRight",wt],["rearg",kt]],Ut="[object Arguments]",Ft="[object Array]",Bt="[object AsyncFunction]",Wt="[object Boolean]",Yt="[object Date]",Ht="[object DOMException]",Vt="[object Error]",$t="[object Function]",Gt="[object GeneratorFunction]",Zt="[object Map]",Xt="[object Number]",Jt="[object Null]",Kt="[object Object]",Qt="[object Proxy]",tn="[object RegExp]",nn="[object Set]",en="[object String]",rn="[object Symbol]",un="[object Undefined]",on="[object WeakMap]",an="[object WeakSet]",cn="[object ArrayBuffer]",fn="[object DataView]",ln="[object Float32Array]",sn="[object Float64Array]",hn="[object Int8Array]",dn="[object Int16Array]",pn="[object Int32Array]",gn="[object Uint8Array]",vn="[object Uint8ClampedArray]",yn="[object Uint16Array]",_n="[object Uint32Array]",mn=/\b__p \+= '';/g,xn=/\b(__p \+=) '' \+/g,bn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,wn=/&(?:amp|lt|gt|quot|#39);/g,Mn=/[&<>"']/g,kn=RegExp(wn.source),En=RegExp(Mn.source),Nn=/<%-([\s\S]+?)%>/g,Sn=/<%([\s\S]+?)%>/g,jn=/<%=([\s\S]+?)%>/g,Cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,An=/^\w*$/,Ln=/^\./,Tn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,On=/[\\^$.*+?()[\]{}|]/g,Rn=RegExp(On.source),Pn=/^\s+|\s+$/g,In=/^\s+/,zn=/\s+$/,Dn=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,qn=/\{\n\/\* \[wrapped with (.+)\] \*/,Un=/,? & /,Fn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Bn=/\\(\\)?/g,Wn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yn=/\w*$/,Hn=/^[-+]0x[0-9a-f]+$/i,Vn=/^0b[01]+$/i,$n=/^\[object .+?Constructor\]$/,Gn=/^0o[0-7]+$/i,Zn=/^(?:0|[1-9]\d*)$/,Xn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jn=/($^)/,Kn=/['\n\r\u2028\u2029\\]/g,Qn="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",te="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ne="["+te+"]",ee="["+Qn+"]",re="[a-z\\xdf-\\xf6\\xf8-\\xff]",ue="[^\\ud800-\\udfff"+te+"\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",ie="\\ud83c[\\udffb-\\udfff]",oe="(?:\\ud83c[\\udde6-\\uddff]){2}",ae="[\\ud800-\\udbff][\\udc00-\\udfff]",ce="[A-Z\\xc0-\\xd6\\xd8-\\xde]",fe="(?:"+re+"|"+ue+")",le="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",se="(?:\\u200d(?:"+["[^\\ud800-\\udfff]",oe,ae].join("|")+")[\\ufe0e\\ufe0f]?"+le+")*",he="[\\ufe0e\\ufe0f]?"+le+se,de="(?:"+["[\\u2700-\\u27bf]",oe,ae].join("|")+")"+he,pe="(?:"+["[^\\ud800-\\udfff]"+ee+"?",ee,oe,ae,"[\\ud800-\\udfff]"].join("|")+")",ge=RegExp("['’]","g"),ve=RegExp(ee,"g"),ye=RegExp(ie+"(?="+ie+")|"+pe+he,"g"),_e=RegExp([ce+"?"+re+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[ne,ce,"$"].join("|")+")","(?:[A-Z\\xc0-\\xd6\\xd8-\\xde]|[^\\ud800-\\udfff\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000\\d+\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde])+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[ne,ce+fe,"$"].join("|")+")",ce+"?"+fe+"+(?:['’](?:d|ll|m|re|s|t|ve))?",ce+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)","\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)","\\d+",de].join("|"),"g"),me=RegExp("[\\u200d\\ud800-\\udfff"+Qn+"\\ufe0e\\ufe0f]"),xe=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,be=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],we=-1,Me={};Me[ln]=Me[sn]=Me[hn]=Me[dn]=Me[pn]=Me[gn]=Me[vn]=Me[yn]=Me[_n]=!0,Me[Ut]=Me[Ft]=Me[cn]=Me[Wt]=Me[fn]=Me[Yt]=Me[Vt]=Me[$t]=Me[Zt]=Me[Xt]=Me[Kt]=Me[tn]=Me[nn]=Me[en]=Me[on]=!1;var ke={};ke[Ut]=ke[Ft]=ke[cn]=ke[fn]=ke[Wt]=ke[Yt]=ke[ln]=ke[sn]=ke[hn]=ke[dn]=ke[pn]=ke[Zt]=ke[Xt]=ke[Kt]=ke[tn]=ke[nn]=ke[en]=ke[rn]=ke[gn]=ke[vn]=ke[yn]=ke[_n]=!0,ke[Vt]=ke[$t]=ke[on]=!1;var Ee={"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"},Ne={"&":"&","<":"<",">":">",'"':""","'":"'"},Se={"&":"&","<":"<",">":">",""":'"',"'":"'"},je={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ce=parseFloat,Ae=parseInt,Le="object"==typeof t&&t&&t.Object===Object&&t,Te="object"==typeof self&&self&&self.Object===Object&&self,Oe=Le||Te||Function("return this")(),Re="object"==typeof n&&n&&!n.nodeType&&n,Pe=Re&&"object"==typeof r&&r&&!r.nodeType&&r,Ie=Pe&&Pe.exports===Re,ze=Ie&&Le.process,De=function(){try{return ze&&ze.binding&&ze.binding("util")}catch(t){}}(),qe=De&&De.isArrayBuffer,Ue=De&&De.isDate,Fe=De&&De.isMap,Be=De&&De.isRegExp,We=De&&De.isSet,Ye=De&&De.isTypedArray,He=j("length"),Ve=C(Ee),$e=C(Ne),Ge=C(Se),Ze=function t(n){function e(t){if(ic(t)&&!yh(t)&&!(t instanceof x)){if(t instanceof u)return t;if(yl.call(t,"__wrapped__"))return no(t)}return new u(t)}function r(){}function u(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=ut}function x(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=It,this.__views__=[]}function C(){var t=new x(this.__wrapped__);return t.__actions__=zu(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=zu(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=zu(this.__views__),t}function J(){if(this.__filtered__){var t=new x(this);t.__dir__=-1,t.__filtered__=!0}else t=this.clone(),t.__dir__*=-1;return t}function nt(){var t=this.__wrapped__.value(),n=this.__dir__,e=yh(t),r=n<0,u=e?t.length:0,i=Ni(0,u,this.__views__),o=i.start,a=i.end,c=a-o,f=r?a:o-1,l=this.__iteratees__,s=l.length,h=0,d=$l(c,this.__takeCount__);if(!e||!r&&u==c&&d==c)return _u(t,this.__actions__);var p=[];t:for(;c--&&h-1}function ce(t,n){var e=this.__data__,r=Xe(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this}function fe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n=n?t:n)),t}function rr(t,n,e,r,u,i){var o,a=n&st,c=n&ht,l=n&dt;if(e&&(o=u?e(t,r,u,i):e(t)),o!==ut)return o;if(!uc(t))return t;var s=yh(t);if(s){if(o=Ci(t),!a)return zu(t,o)}else{var h=Ss(t),d=h==$t||h==Gt;if(mh(t))return Eu(t,a);if(h==Kt||h==Ut||d&&!u){if(o=c||d?{}:Ai(t),!a)return c?Uu(t,Qe(o,t)):qu(t,Ke(o,t))}else{if(!ke[h])return u?t:{};o=Li(t,h,rr,a)}}i||(i=new xe);var p=i.get(t);if(p)return p;i.set(t,o);var g=l?c?_i:yi:c?Fc:Uc,v=s?ut:g(t);return f(v||t,function(r,u){v&&(u=r,r=t[u]),He(o,u,rr(r,n,e,u,t,i))}),o}function ur(t){var n=Uc(t);return function(e){return ir(e,t,n)}}function ir(t,n,e){var r=e.length;if(null==t)return!r;for(t=cl(t);r--;){var u=e[r],i=n[u],o=t[u];if(o===ut&&!(u in t)||!i(o))return!1}return!0}function or(t,n,e){if("function"!=typeof t)throw new sl(at);return As(function(){t.apply(ut,e)},n)}function ar(t,n,e,r){var u=-1,i=d,o=!0,a=t.length,c=[],f=n.length;if(!a)return c;e&&(n=g(n,P(e))),r?(i=p,o=!1):n.length>=it&&(i=z,o=!1,n=new ye(n));t:for(;++uu?0:u+e),r=r===ut||r>u?u:wc(r),r<0&&(r+=u),r=e>r?0:Mc(r);e0&&e(a)?n>1?hr(a,n-1,e,r,u):v(u,a):r||(u[u.length]=a)}return u}function dr(t,n){return t&&ys(t,n,Uc)}function pr(t,n){return t&&_s(t,n,Uc)}function gr(t,n){return h(n,function(n){return nc(t[n])})}function vr(t,n){n=Mu(n,t);for(var e=0,r=n.length;null!=t&&en}function xr(t,n){return null!=t&&yl.call(t,n)}function br(t,n){return null!=t&&n in cl(t)}function wr(t,n,e){return t>=$l(n,e)&&t=120&&l.length>=120)?new ye(o&&l):ut}l=t[0];var s=-1,h=a[0];t:for(;++s-1;)a!==t&&Ll.call(a,c,1),Ll.call(t,c,1);return t}function Kr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var u=n[e];if(e==r||u!==i){var i=u;Ri(u)?Ll.call(t,u,1):gu(t,u)}}return t}function Qr(t,n){return t+Ul(Xl()*(n-t+1))}function tu(t,n,e,r){for(var u=-1,i=Vl(ql((n-t)/(e||1)),0),o=rl(i);i--;)o[r?i:++u]=t,t+=e;return o}function nu(t,n){var e="";if(!t||n<1||n>Ot)return e;do{n%2&&(e+=t),(n=Ul(n/2))&&(t+=t)}while(n);return e}function eu(t,n){return Ls(Vi(t,n,Lf),t+"")}function ru(t){return Re(Qc(t))}function uu(t,n){var e=Qc(t);return Ji(e,er(n,0,e.length))}function iu(t,n,e,r){if(!uc(t))return t;n=Mu(n,t);for(var u=-1,i=n.length,o=i-1,a=t;null!=a&&++uu?0:u+n),e=e>u?u:e,e<0&&(e+=u),u=n>e?0:e-n>>>0,n>>>=0;for(var i=rl(u);++r>>1,o=t[i];null!==o&&!vc(o)&&(e?o<=n:o=it){var f=n?null:Ms(t);if(f)return Z(f);o=!1,u=z,c=new ye}else c=n?[]:a;t:for(;++r=r?t:au(t,n,e)}function Eu(t,n){if(n)return t.slice();var e=t.length,r=Sl?Sl(e):new t.constructor(e);return t.copy(r),r}function Nu(t){var n=new t.constructor(t.byteLength);return new Nl(n).set(new Nl(t)),n}function Su(t,n){var e=n?Nu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}function ju(t,n,e){return y(n?e(V(t),st):V(t),i,new t.constructor)}function Cu(t){var n=new t.constructor(t.source,Yn.exec(t));return n.lastIndex=t.lastIndex,n}function Au(t,n,e){return y(n?e(Z(t),st):Z(t),o,new t.constructor)}function Lu(t){return hs?cl(hs.call(t)):{}}function Tu(t,n){var e=n?Nu(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Ou(t,n){if(t!==n){var e=t!==ut,r=null===t,u=t===t,i=vc(t),o=n!==ut,a=null===n,c=n===n,f=vc(n);if(!a&&!f&&!i&&t>n||i&&o&&c&&!a&&!f||r&&o&&c||!e&&c||!u)return 1;if(!r&&!i&&!f&&t=a)return c;return c*("desc"==e[r]?-1:1)}}return t.index-n.index}function Pu(t,n,e,r){for(var u=-1,i=t.length,o=e.length,a=-1,c=n.length,f=Vl(i-o,0),l=rl(c+f),s=!r;++a1?e[u-1]:ut,o=u>2?e[2]:ut;for(i=t.length>3&&"function"==typeof i?(u--,i):ut,o&&Pi(e[0],e[1],o)&&(i=u<3?ut:i,u=1),n=cl(n);++r-1?u[i?n[o]:o]:ut}}function Ju(t){return vi(function(n){var e=n.length,r=e,i=u.prototype.thru;for(t&&n.reverse();r--;){var o=n[r];if("function"!=typeof o)throw new sl(at);if(i&&!a&&"wrapper"==mi(o))var a=new u([],!0)}for(r=a?r:e;++r1&&_.reverse(),s&&ca))return!1;var f=i.get(t);if(f&&i.get(n))return f==n;var l=-1,s=!0,h=e>?new ye:ut;for(i.set(t,n),i.set(n,t);++l1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(Dn,"{\n/* [wrapped with "+n+"] */\n")}function Oi(t){return yh(t)||vh(t)||!!(Tl&&t&&t[Tl])}function Ri(t,n){return!!(n=null==n?Ot:n)&&("number"==typeof t||Zn.test(t))&&t>-1&&t%1==0&&t0){if(++n>=jt)return arguments[0]}else n=0;return t.apply(ut,arguments)}}function Ji(t,n){var e=-1,r=t.length,u=r-1;for(n=n===ut?r:n;++e=this.__values__.length;return{done:t,value:t?ut:this.__values__[this.__index__++]}}function ea(){return this}function ra(t){for(var n,e=this;e instanceof r;){var u=no(e);u.__index__=0,u.__values__=ut,n?i.__wrapped__=u:n=u;var i=u;e=e.__wrapped__}return i.__wrapped__=t,n}function ua(){var t=this.__wrapped__;if(t instanceof x){var n=t;return this.__actions__.length&&(n=new x(this)),n=n.reverse(),n.__actions__.push({func:Ko,args:[jo],thisArg:ut}),new u(n,this.__chain__)}return this.thru(jo)}function ia(){return _u(this.__wrapped__,this.__actions__)}function oa(t,n,e){var r=yh(t)?s:cr;return e&&Pi(t,n,e)&&(n=ut),r(t,bi(n,3))}function aa(t,n){return(yh(t)?h:sr)(t,bi(n,3))}function ca(t,n){return hr(pa(t,n),1)}function fa(t,n){return hr(pa(t,n),Tt)}function la(t,n,e){return e=e===ut?1:wc(e),hr(pa(t,n),e)}function sa(t,n){return(yh(t)?f:gs)(t,bi(n,3))}function ha(t,n){return(yh(t)?l:vs)(t,bi(n,3))}function da(t,n,e,r){t=Va(t)?t:Qc(t),e=e&&!r?wc(e):0;var u=t.length;return e<0&&(e=Vl(u+e,0)),gc(t)?e<=u&&t.indexOf(n,e)>-1:!!u&&k(t,n,e)>-1}function pa(t,n){return(yh(t)?g:Fr)(t,bi(n,3))}function ga(t,n,e,r){return null==t?[]:(yh(n)||(n=null==n?[]:[n]),e=r?ut:e,yh(e)||(e=null==e?[]:[e]),$r(t,n,e))}function va(t,n,e){var r=yh(t)?y:A,u=arguments.length<3;return r(t,bi(n,4),e,u,gs)}function ya(t,n,e){var r=yh(t)?_:A,u=arguments.length<3;return r(t,bi(n,4),e,u,vs)}function _a(t,n){return(yh(t)?h:sr)(t,Ta(bi(n,3)))}function ma(t){return(yh(t)?Re:ru)(t)}function xa(t,n,e){return n=(e?Pi(t,n,e):n===ut)?1:wc(n),(yh(t)?Pe:uu)(t,n)}function ba(t){return(yh(t)?ze:ou)(t)}function wa(t){if(null==t)return 0;if(Va(t))return gc(t)?Q(t):t.length;var n=Ss(t);return n==Zt||n==nn?t.size:Dr(t).length}function Ma(t,n,e){var r=yh(t)?m:cu;return e&&Pi(t,n,e)&&(n=ut),r(t,bi(n,3))}function ka(t,n){if("function"!=typeof n)throw new sl(at);return t=wc(t),function(){if(--t<1)return n.apply(this,arguments)}}function Ea(t,n,e){return n=e?ut:n,n=t&&null==n?t.length:n,fi(t,Mt,ut,ut,ut,ut,n)}function Na(t,n){var e;if("function"!=typeof n)throw new sl(at);return t=wc(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=ut),e}}function Sa(t,n,e){n=e?ut:n;var r=fi(t,mt,ut,ut,ut,ut,ut,n);return r.placeholder=Sa.placeholder,r}function ja(t,n,e){n=e?ut:n;var r=fi(t,xt,ut,ut,ut,ut,ut,n);return r.placeholder=ja.placeholder,r}function Ca(t,n,e){function r(n){var e=h,r=d;return h=d=ut,_=n,g=t.apply(r,e)}function u(t){return _=t,v=As(a,n),m?r(t):g}function i(t){var e=t-y,r=t-_,u=n-e;return x?$l(u,p-r):u}function o(t){var e=t-y,r=t-_;return y===ut||e>=n||e<0||x&&r>=p}function a(){var t=ih();if(o(t))return c(t);v=As(a,i(t))}function c(t){return v=ut,b&&h?r(t):(h=d=ut,g)}function f(){v!==ut&&ws(v),_=0,h=y=d=v=ut}function l(){return v===ut?g:c(ih())}function s(){var t=ih(),e=o(t);if(h=arguments,d=this,y=t,e){if(v===ut)return u(y);if(x)return v=As(a,n),r(y)}return v===ut&&(v=As(a,n)),g}var h,d,p,g,v,y,_=0,m=!1,x=!1,b=!0;if("function"!=typeof t)throw new sl(at);return n=kc(n)||0,uc(e)&&(m=!!e.leading,x="maxWait"in e,p=x?Vl(kc(e.maxWait)||0,n):p,b="trailing"in e?!!e.trailing:b),s.cancel=f,s.flush=l,s}function Aa(t){return fi(t,Et)}function La(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new sl(at);var e=function(){var r=arguments,u=n?n.apply(this,r):r[0],i=e.cache;if(i.has(u))return i.get(u);var o=t.apply(this,r);return e.cache=i.set(u,o)||i,o};return e.cache=new(La.Cache||fe),e}function Ta(t){if("function"!=typeof t)throw new sl(at);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}function Oa(t){return Na(2,t)}function Ra(t,n){if("function"!=typeof t)throw new sl(at);return n=n===ut?n:wc(n),eu(t,n)}function Pa(t,n){if("function"!=typeof t)throw new sl(at);return n=null==n?0:Vl(wc(n),0),eu(function(e){var r=e[n],u=ku(e,0,n);return r&&v(u,r),a(t,this,u)})}function Ia(t,n,e){var r=!0,u=!0;if("function"!=typeof t)throw new sl(at);return uc(e)&&(r="leading"in e?!!e.leading:r,u="trailing"in e?!!e.trailing:u),Ca(t,n,{leading:r,maxWait:n,trailing:u})}function za(t){return Ea(t,1)}function Da(t,n){return sh(wu(n),t)}function qa(){if(!arguments.length)return[];var t=arguments[0];return yh(t)?t:[t]}function Ua(t){return rr(t,dt)}function Fa(t,n){return n="function"==typeof n?n:ut,rr(t,dt,n)}function Ba(t){return rr(t,st|dt)}function Wa(t,n){return n="function"==typeof n?n:ut,rr(t,st|dt,n)}function Ya(t,n){return null==n||ir(t,n,Uc(n))}function Ha(t,n){return t===n||t!==t&&n!==n}function Va(t){return null!=t&&rc(t.length)&&!nc(t)}function $a(t){return ic(t)&&Va(t)}function Ga(t){return!0===t||!1===t||ic(t)&&_r(t)==Wt}function Za(t){return ic(t)&&1===t.nodeType&&!dc(t)}function Xa(t){if(null==t)return!0;if(Va(t)&&(yh(t)||"string"==typeof t||"function"==typeof t.splice||mh(t)||kh(t)||vh(t)))return!t.length;var n=Ss(t);if(n==Zt||n==nn)return!t.size;if(Ui(t))return!Dr(t).length;for(var e in t)if(yl.call(t,e))return!1;return!0}function Ja(t,n){return Cr(t,n)}function Ka(t,n,e){e="function"==typeof e?e:ut;var r=e?e(t,n):ut;return r===ut?Cr(t,n,ut,e):!!r}function Qa(t){if(!ic(t))return!1;var n=_r(t);return n==Vt||n==Ht||"string"==typeof t.message&&"string"==typeof t.name&&!dc(t)}function tc(t){return"number"==typeof t&&Wl(t)}function nc(t){if(!uc(t))return!1;var n=_r(t);return n==$t||n==Gt||n==Bt||n==Qt}function ec(t){return"number"==typeof t&&t==wc(t)}function rc(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Ot}function uc(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function ic(t){return null!=t&&"object"==typeof t}function oc(t,n){return t===n||Tr(t,n,Mi(n))}function ac(t,n,e){return e="function"==typeof e?e:ut,Tr(t,n,Mi(n),e)}function cc(t){return hc(t)&&t!=+t}function fc(t){if(js(t))throw new il(ot);return Or(t)}function lc(t){return null===t}function sc(t){return null==t}function hc(t){return"number"==typeof t||ic(t)&&_r(t)==Xt}function dc(t){if(!ic(t)||_r(t)!=Kt)return!1;var n=jl(t);if(null===n)return!0;var e=yl.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&vl.call(e)==bl}function pc(t){return ec(t)&&t>=-Ot&&t<=Ot}function gc(t){return"string"==typeof t||!yh(t)&&ic(t)&&_r(t)==en}function vc(t){return"symbol"==typeof t||ic(t)&&_r(t)==rn}function yc(t){return t===ut}function _c(t){return ic(t)&&Ss(t)==on}function mc(t){return ic(t)&&_r(t)==an}function xc(t){if(!t)return[];if(Va(t))return gc(t)?tt(t):zu(t);if(Ol&&t[Ol])return H(t[Ol]());var n=Ss(t);return(n==Zt?V:n==nn?Z:Qc)(t)}function bc(t){if(!t)return 0===t?t:0;if((t=kc(t))===Tt||t===-Tt){return(t<0?-1:1)*Rt}return t===t?t:0}function wc(t){var n=bc(t),e=n%1;return n===n?e?n-e:n:0}function Mc(t){return t?er(wc(t),0,It):0}function kc(t){if("number"==typeof t)return t;if(vc(t))return Pt;if(uc(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=uc(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(Pn,"");var e=Vn.test(t);return e||Gn.test(t)?Ae(t.slice(2),e?2:8):Hn.test(t)?Pt:+t}function Ec(t){return Du(t,Fc(t))}function Nc(t){return t?er(wc(t),-Ot,Ot):0===t?t:0}function Sc(t){return null==t?"":du(t)}function jc(t,n){var e=ps(t);return null==n?e:Ke(e,n)}function Cc(t,n){return w(t,bi(n,3),dr)}function Ac(t,n){return w(t,bi(n,3),pr)}function Lc(t,n){return null==t?t:ys(t,bi(n,3),Fc)}function Tc(t,n){return null==t?t:_s(t,bi(n,3),Fc)}function Oc(t,n){return t&&dr(t,bi(n,3))}function Rc(t,n){return t&&pr(t,bi(n,3))}function Pc(t){return null==t?[]:gr(t,Uc(t))}function Ic(t){return null==t?[]:gr(t,Fc(t))}function zc(t,n,e){var r=null==t?ut:vr(t,n);return r===ut?e:r}function Dc(t,n){return null!=t&&ji(t,n,xr)}function qc(t,n){return null!=t&&ji(t,n,br)}function Uc(t){return Va(t)?Te(t):Dr(t)}function Fc(t){return Va(t)?Te(t,!0):qr(t)}function Bc(t,n){var e={};return n=bi(n,3),dr(t,function(t,r,u){tr(e,n(t,r,u),t)}),e}function Wc(t,n){var e={};return n=bi(n,3),dr(t,function(t,r,u){tr(e,r,n(t,r,u))}),e}function Yc(t,n){return Hc(t,Ta(bi(n)))}function Hc(t,n){if(null==t)return{};var e=g(_i(t),function(t){return[t]});return n=bi(n),Zr(t,e,function(t,e){return n(t,e[0])})}function Vc(t,n,e){n=Mu(n,t);var r=-1,u=n.length;for(u||(u=1,t=ut);++rn){var r=t;t=n,n=r}if(e||t%1||n%1){var u=Xl();return $l(t+u*(n-t+Ce("1e-"+((u+"").length-1))),n)}return Qr(t,n)}function uf(t){return Xh(Sc(t).toLowerCase())}function of(t){return(t=Sc(t))&&t.replace(Xn,Ve).replace(ve,"")}function af(t,n,e){t=Sc(t),n=du(n);var r=t.length;e=e===ut?r:er(wc(e),0,r);var u=e;return(e-=n.length)>=0&&t.slice(e,u)==n}function cf(t){return t=Sc(t),t&&En.test(t)?t.replace(Mn,$e):t}function ff(t){return t=Sc(t),t&&Rn.test(t)?t.replace(On,"\\$&"):t}function lf(t,n,e){t=Sc(t),n=wc(n);var r=n?Q(t):0;if(!n||r>=n)return t;var u=(n-r)/2;return ei(Ul(u),e)+t+ei(ql(u),e)}function sf(t,n,e){t=Sc(t),n=wc(n);var r=n?Q(t):0;return n&&r>>0)?(t=Sc(t),t&&("string"==typeof n||null!=n&&!wh(n))&&!(n=du(n))&&W(t)?ku(tt(t),0,e):t.split(n,e)):[]}function yf(t,n,e){return t=Sc(t),e=null==e?0:er(wc(e),0,t.length),n=du(n),t.slice(e,e+n.length)==n}function _f(t,n,r){var u=e.templateSettings;r&&Pi(t,n,r)&&(n=ut),t=Sc(t),n=Ch({},n,u,li);var i,o,a=Ch({},n.imports,u.imports,li),c=Uc(a),f=I(a,c),l=0,s=n.interpolate||Jn,h="__p += '",d=fl((n.escape||Jn).source+"|"+s.source+"|"+(s===jn?Wn:Jn).source+"|"+(n.evaluate||Jn).source+"|$","g"),p="//# sourceURL="+("sourceURL"in n?n.sourceURL:"lodash.templateSources["+ ++we+"]")+"\n";t.replace(d,function(n,e,r,u,a,c){return r||(r=u),h+=t.slice(l,c).replace(Kn,F),e&&(i=!0,h+="' +\n__e("+e+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+n.length,n}),h+="';\n";var g=n.variable;g||(h="with (obj) {\n"+h+"\n}\n"),h=(o?h.replace(mn,""):h).replace(xn,"$1").replace(bn,"$1;"),h="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v=Jh(function(){return ol(c,p+"return "+h).apply(ut,f)});if(v.source=h,Qa(v))throw v;return v}function mf(t){return Sc(t).toLowerCase()}function xf(t){return Sc(t).toUpperCase()}function bf(t,n,e){if((t=Sc(t))&&(e||n===ut))return t.replace(Pn,"");if(!t||!(n=du(n)))return t;var r=tt(t),u=tt(n);return ku(r,D(r,u),q(r,u)+1).join("")}function wf(t,n,e){if((t=Sc(t))&&(e||n===ut))return t.replace(zn,"");if(!t||!(n=du(n)))return t;var r=tt(t);return ku(r,0,q(r,tt(n))+1).join("")}function Mf(t,n,e){if((t=Sc(t))&&(e||n===ut))return t.replace(In,"");if(!t||!(n=du(n)))return t;var r=tt(t);return ku(r,D(r,tt(n))).join("")}function kf(t,n){var e=Nt,r=St;if(uc(n)){var u="separator"in n?n.separator:u;e="length"in n?wc(n.length):e,r="omission"in n?du(n.omission):r}t=Sc(t);var i=t.length;if(W(t)){var o=tt(t);i=o.length}if(e>=i)return t;var a=e-Q(r);if(a<1)return r;var c=o?ku(o,0,a).join(""):t.slice(0,a);if(u===ut)return c+r;if(o&&(a+=c.length-a),wh(u)){if(t.slice(a).search(u)){var f,l=c;for(u.global||(u=fl(u.source,Sc(Yn.exec(u))+"g")),u.lastIndex=0;f=u.exec(l);)var s=f.index;c=c.slice(0,s===ut?a:s)}}else if(t.indexOf(du(u),a)!=a){var h=c.lastIndexOf(u);h>-1&&(c=c.slice(0,h))}return c+r}function Ef(t){return t=Sc(t),t&&kn.test(t)?t.replace(wn,Ge):t}function Nf(t,n,e){return t=Sc(t),n=e?ut:n,n===ut?Y(t)?rt(t):b(t):t.match(n)||[]}function Sf(t){var n=null==t?0:t.length,e=bi();return t=n?g(t,function(t){if("function"!=typeof t[1])throw new sl(at);return[e(t[0]),t[1]]}):[],eu(function(e){for(var r=-1;++rOt)return[];var e=It,r=$l(t,It);n=bi(n),t-=It;for(var u=O(r,n);++e1?t[n-1]:ut;return e="function"==typeof e?(t.pop(),e):ut,$o(t,e)}),Xs=vi(function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(n){return nr(n,t)};return!(n>1||this.__actions__.length)&&r instanceof x&&Ri(e)?(r=r.slice(e,+e+(n?1:0)),r.__actions__.push({func:Ko,args:[i],thisArg:ut}),new u(r,this.__chain__).thru(function(t){return n&&!t.length&&t.push(ut),t})):this.thru(i)}),Js=Fu(function(t,n,e){yl.call(t,e)?++t[e]:tr(t,e,1)}),Ks=Xu(lo),Qs=Xu(so),th=Fu(function(t,n,e){yl.call(t,e)?t[e].push(n):tr(t,e,[n])}),nh=eu(function(t,n,e){var r=-1,u="function"==typeof n,i=Va(t)?rl(t.length):[];return gs(t,function(t){i[++r]=u?a(n,t,e):Er(t,n,e)}),i}),eh=Fu(function(t,n,e){tr(t,e,n)}),rh=Fu(function(t,n,e){t[e?0:1].push(n)},function(){return[[],[]]}),uh=eu(function(t,n){if(null==t)return[];var e=n.length;return e>1&&Pi(t,n[0],n[1])?n=[]:e>2&&Pi(n[0],n[1],n[2])&&(n=[n[0]]),$r(t,hr(n,1),[])}),ih=zl||function(){return Oe.Date.now()},oh=eu(function(t,n,e){var r=vt;if(e.length){var u=G(e,xi(oh));r|=bt}return fi(t,r,n,e,u)}),ah=eu(function(t,n,e){var r=vt|yt;if(e.length){var u=G(e,xi(ah));r|=bt}return fi(n,r,t,e,u)}),ch=eu(function(t,n){return or(t,1,n)}),fh=eu(function(t,n,e){return or(t,kc(n)||0,e)});La.Cache=fe;var lh=bs(function(t,n){n=1==n.length&&yh(n[0])?g(n[0],P(bi())):g(hr(n,1),P(bi()));var e=n.length;return eu(function(r){for(var u=-1,i=$l(r.length,e);++u=n}),vh=Nr(function(){return arguments}())?Nr:function(t){return ic(t)&&yl.call(t,"callee")&&!Al.call(t,"callee")},yh=rl.isArray,_h=qe?P(qe):Sr,mh=Bl||Bf,xh=Ue?P(Ue):jr,bh=Fe?P(Fe):Lr,wh=Be?P(Be):Rr,Mh=We?P(We):Pr,kh=Ye?P(Ye):Ir,Eh=ii(Ur),Nh=ii(function(t,n){return t<=n}),Sh=Bu(function(t,n){if(Ui(n)||Va(n))return void Du(n,Uc(n),t);for(var e in n)yl.call(n,e)&&He(t,e,n[e])}),jh=Bu(function(t,n){Du(n,Fc(n),t)}),Ch=Bu(function(t,n,e,r){Du(n,Fc(n),t,r)}),Ah=Bu(function(t,n,e,r){Du(n,Uc(n),t,r)}),Lh=vi(nr),Th=eu(function(t){return t.push(ut,li),a(Ch,ut,t)}),Oh=eu(function(t){return t.push(ut,si),a(Dh,ut,t)}),Rh=Qu(function(t,n,e){t[n]=e},Cf(Lf)),Ph=Qu(function(t,n,e){yl.call(t,n)?t[n].push(e):t[n]=[e]},bi),Ih=eu(Er),zh=Bu(function(t,n,e){Yr(t,n,e)}),Dh=Bu(function(t,n,e,r){Yr(t,n,e,r)}),qh=vi(function(t,n){var e={};if(null==t)return e;var r=!1;n=g(n,function(n){return n=Mu(n,t),r||(r=n.length>1),n}),Du(t,_i(t),e),r&&(e=rr(e,st|ht|dt,hi));for(var u=n.length;u--;)gu(e,n[u]);return e}),Uh=vi(function(t,n){return null==t?{}:Gr(t,n)}),Fh=ci(Uc),Bh=ci(Fc),Wh=$u(function(t,n,e){return n=n.toLowerCase(),t+(e?uf(n):n)}),Yh=$u(function(t,n,e){return t+(e?"-":"")+n.toLowerCase()}),Hh=$u(function(t,n,e){return t+(e?" ":"")+n.toLowerCase()}),Vh=Vu("toLowerCase"),$h=$u(function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}),Gh=$u(function(t,n,e){return t+(e?" ":"")+Xh(n)}),Zh=$u(function(t,n,e){return t+(e?" ":"")+n.toUpperCase()}),Xh=Vu("toUpperCase"),Jh=eu(function(t,n){try{return a(t,ut,n)}catch(t){return Qa(t)?t:new il(t)}}),Kh=vi(function(t,n){return f(n,function(n){n=Ki(n),tr(t,n,oh(t[n],t))}),t}),Qh=Ju(),td=Ju(!0),nd=eu(function(t,n){return function(e){return Er(e,t,n)}}),ed=eu(function(t,n){return function(e){return Er(t,e,n)}}),rd=ni(g),ud=ni(s),id=ni(m),od=ui(),ad=ui(!0),cd=ti(function(t,n){return t+n},0),fd=ai("ceil"),ld=ti(function(t,n){return t/n},1),sd=ai("floor"),hd=ti(function(t,n){return t*n},1),dd=ai("round"),pd=ti(function(t,n){return t-n},0);return e.after=ka,e.ary=Ea,e.assign=Sh,e.assignIn=jh,e.assignInWith=Ch,e.assignWith=Ah,e.at=Lh,e.before=Na,e.bind=oh,e.bindAll=Kh,e.bindKey=ah,e.castArray=qa,e.chain=Xo,e.chunk=eo,e.compact=ro,e.concat=uo,e.cond=Sf,e.conforms=jf,e.constant=Cf,e.countBy=Js,e.create=jc,e.curry=Sa,e.curryRight=ja,e.debounce=Ca,e.defaults=Th,e.defaultsDeep=Oh,e.defer=ch,e.delay=fh,e.difference=Os,e.differenceBy=Rs,e.differenceWith=Ps,e.drop=io,e.dropRight=oo,e.dropRightWhile=ao,e.dropWhile=co,e.fill=fo,e.filter=aa,e.flatMap=ca,e.flatMapDeep=fa,e.flatMapDepth=la,e.flatten=ho,e.flattenDeep=po,e.flattenDepth=go,e.flip=Aa,e.flow=Qh,e.flowRight=td,e.fromPairs=vo,e.functions=Pc,e.functionsIn=Ic,e.groupBy=th,e.initial=mo,e.intersection=Is,e.intersectionBy=zs,e.intersectionWith=Ds,e.invert=Rh,e.invertBy=Ph,e.invokeMap=nh,e.iteratee=Tf,e.keyBy=eh,e.keys=Uc,e.keysIn=Fc,e.map=pa,e.mapKeys=Bc,e.mapValues=Wc,e.matches=Of,e.matchesProperty=Rf,e.memoize=La,e.merge=zh,e.mergeWith=Dh,e.method=nd,e.methodOf=ed,e.mixin=Pf,e.negate=Ta,e.nthArg=Df,e.omit=qh,e.omitBy=Yc,e.once=Oa,e.orderBy=ga,e.over=rd,e.overArgs=lh,e.overEvery=ud,e.overSome=id,e.partial=sh,e.partialRight=hh,e.partition=rh,e.pick=Uh,e.pickBy=Hc,e.property=qf,e.propertyOf=Uf,e.pull=qs,e.pullAll=ko,e.pullAllBy=Eo,e.pullAllWith=No,e.pullAt=Us,e.range=od,e.rangeRight=ad,e.rearg=dh,e.reject=_a,e.remove=So,e.rest=Ra,e.reverse=jo,e.sampleSize=xa,e.set=$c,e.setWith=Gc,e.shuffle=ba,e.slice=Co,e.sortBy=uh,e.sortedUniq=Io,e.sortedUniqBy=zo,e.split=vf,e.spread=Pa,e.tail=Do,e.take=qo,e.takeRight=Uo,e.takeRightWhile=Fo,e.takeWhile=Bo,e.tap=Jo,e.throttle=Ia,e.thru=Ko,e.toArray=xc,e.toPairs=Fh,e.toPairsIn=Bh,e.toPath=$f,e.toPlainObject=Ec,e.transform=Zc,e.unary=za,e.union=Fs,e.unionBy=Bs,e.unionWith=Ws,e.uniq=Wo,e.uniqBy=Yo,e.uniqWith=Ho,e.unset=Xc,e.unzip=Vo,e.unzipWith=$o,e.update=Jc,e.updateWith=Kc,e.values=Qc,e.valuesIn=tf,e.without=Ys,e.words=Nf,e.wrap=Da,e.xor=Hs,e.xorBy=Vs,e.xorWith=$s,e.zip=Gs,e.zipObject=Go,e.zipObjectDeep=Zo,e.zipWith=Zs,e.entries=Fh,e.entriesIn=Bh,e.extend=jh,e.extendWith=Ch,Pf(e,e),e.add=cd,e.attempt=Jh,e.camelCase=Wh,e.capitalize=uf,e.ceil=fd,e.clamp=nf,e.clone=Ua,e.cloneDeep=Ba,e.cloneDeepWith=Wa,e.cloneWith=Fa,e.conformsTo=Ya,e.deburr=of,e.defaultTo=Af,e.divide=ld,e.endsWith=af,e.eq=Ha,e.escape=cf,e.escapeRegExp=ff,e.every=oa,e.find=Ks,e.findIndex=lo,e.findKey=Cc,e.findLast=Qs,e.findLastIndex=so,e.findLastKey=Ac,e.floor=sd,e.forEach=sa,e.forEachRight=ha,e.forIn=Lc,e.forInRight=Tc,e.forOwn=Oc,e.forOwnRight=Rc,e.get=zc,e.gt=ph,e.gte=gh,e.has=Dc,e.hasIn=qc,e.head=yo,e.identity=Lf,e.includes=da,e.indexOf=_o,e.inRange=ef,e.invoke=Ih,e.isArguments=vh,e.isArray=yh,e.isArrayBuffer=_h,e.isArrayLike=Va,e.isArrayLikeObject=$a,e.isBoolean=Ga,e.isBuffer=mh,e.isDate=xh,e.isElement=Za,e.isEmpty=Xa,e.isEqual=Ja,e.isEqualWith=Ka,e.isError=Qa,e.isFinite=tc,e.isFunction=nc,e.isInteger=ec,e.isLength=rc,e.isMap=bh,e.isMatch=oc,e.isMatchWith=ac,e.isNaN=cc,e.isNative=fc,e.isNil=sc,e.isNull=lc,e.isNumber=hc,e.isObject=uc,e.isObjectLike=ic,e.isPlainObject=dc,e.isRegExp=wh,e.isSafeInteger=pc,e.isSet=Mh,e.isString=gc,e.isSymbol=vc,e.isTypedArray=kh,e.isUndefined=yc,e.isWeakMap=_c,e.isWeakSet=mc,e.join=xo,e.kebabCase=Yh,e.last=bo,e.lastIndexOf=wo,e.lowerCase=Hh,e.lowerFirst=Vh,e.lt=Eh,e.lte=Nh,e.max=Zf,e.maxBy=Xf,e.mean=Jf,e.meanBy=Kf,e.min=Qf,e.minBy=tl,e.stubArray=Ff,e.stubFalse=Bf,e.stubObject=Wf,e.stubString=Yf,e.stubTrue=Hf,e.multiply=hd,e.nth=Mo,e.noConflict=If,e.noop=zf,e.now=ih,e.pad=lf,e.padEnd=sf,e.padStart=hf,e.parseInt=df,e.random=rf,e.reduce=va,e.reduceRight=ya,e.repeat=pf,e.replace=gf,e.result=Vc,e.round=dd,e.runInContext=t,e.sample=ma,e.size=wa,e.snakeCase=$h,e.some=Ma,e.sortedIndex=Ao,e.sortedIndexBy=Lo,e.sortedIndexOf=To,e.sortedLastIndex=Oo,e.sortedLastIndexBy=Ro,e.sortedLastIndexOf=Po,e.startCase=Gh,e.startsWith=yf,e.subtract=pd,e.sum=nl,e.sumBy=el,e.template=_f,e.times=Vf,e.toFinite=bc,e.toInteger=wc,e.toLength=Mc,e.toLower=mf,e.toNumber=kc,e.toSafeInteger=Nc,e.toString=Sc,e.toUpper=xf,e.trim=bf,e.trimEnd=wf,e.trimStart=Mf,e.truncate=kf,e.unescape=Ef,e.uniqueId=Gf,e.upperCase=Zh,e.upperFirst=Xh,e.each=sa,e.eachRight=ha,e.first=yo,Pf(e,function(){var t={};return dr(e,function(n,r){yl.call(e.prototype,r)||(t[r]=n)}),t}(),{chain:!1}),e.VERSION="4.17.4",f(["bind","bindKey","curry","curryRight","partial","partialRight"],function(t){e[t].placeholder=e}),f(["drop","take"],function(t,n){x.prototype[t]=function(e){e=e===ut?1:Vl(wc(e),0);var r=this.__filtered__&&!n?new x(this):this.clone();return r.__filtered__?r.__takeCount__=$l(e,r.__takeCount__):r.__views__.push({size:$l(e,It),type:t+(r.__dir__<0?"Right":"")}),r},x.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}}),f(["filter","map","takeWhile"],function(t,n){var e=n+1,r=e==At||3==e;x.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:bi(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}}),f(["head","last"],function(t,n){var e="take"+(n?"Right":"");x.prototype[t]=function(){return this[e](1).value()[0]}}),f(["initial","tail"],function(t,n){var e="drop"+(n?"":"Right");x.prototype[t]=function(){return this.__filtered__?new x(this):this[e](1)}}),x.prototype.compact=function(){return this.filter(Lf)},x.prototype.find=function(t){return this.filter(t).head()},x.prototype.findLast=function(t){return this.reverse().find(t)},x.prototype.invokeMap=eu(function(t,n){return"function"==typeof t?new x(this):this.map(function(e){return Er(e,t,n)})}),x.prototype.reject=function(t){return this.filter(Ta(bi(t)))},x.prototype.slice=function(t,n){t=wc(t);var e=this;return e.__filtered__&&(t>0||n<0)?new x(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==ut&&(n=wc(n),e=n<0?e.dropRight(-n):e.take(n-t)),e)},x.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},x.prototype.toArray=function(){return this.take(It)},dr(x.prototype,function(t,n){var r=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=e[i?"take"+("last"==n?"Right":""):n],a=i||/^find/.test(n);o&&(e.prototype[n]=function(){var n=this.__wrapped__,c=i?[1]:arguments,f=n instanceof x,l=c[0],s=f||yh(n),h=function(t){var n=o.apply(e,v([t],c));return i&&d?n[0]:n};s&&r&&"function"==typeof l&&1!=l.length&&(f=s=!1);var d=this.__chain__,p=!!this.__actions__.length,g=a&&!d,y=f&&!p;if(!a&&s){n=y?n:new x(this);var _=t.apply(n,c);return _.__actions__.push({func:Ko,args:[h],thisArg:ut}),new u(_,d)}return g&&y?t.apply(this,c):(_=this.thru(h),g?i?_.value()[0]:_.value():_)})}),f(["pop","push","shift","sort","splice","unshift"],function(t){var n=hl[t],r=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",u=/^(?:pop|shift)$/.test(t);e.prototype[t]=function(){var t=arguments;if(u&&!this.__chain__){var e=this.value();return n.apply(yh(e)?e:[],t)}return this[r](function(e){return n.apply(yh(e)?e:[],t)})}}),dr(x.prototype,function(t,n){var r=e[n];if(r){var u=r.name+"";(is[u]||(is[u]=[])).push({name:n,func:r})}}),is[Ku(ut,yt).name]=[{name:"wrapper",func:ut}],x.prototype.clone=C,x.prototype.reverse=J,x.prototype.value=nt,e.prototype.at=Xs,e.prototype.chain=Qo,e.prototype.commit=ta,e.prototype.next=na,e.prototype.plant=ra,e.prototype.reverse=ua,e.prototype.toJSON=e.prototype.valueOf=e.prototype.value=ia,e.prototype.first=e.prototype.head,Ol&&(e.prototype[Ol]=ea),e}();Oe._=Ze,(u=function(){return Ze}.call(n,e,n,r))!==ut&&(r.exports=u)}).call(this)}).call(n,e(20),e(21)(t))},function(t,n,e){var r,u;!function(){function i(t){return t&&(t.ownerDocument||t.document||t).documentElement}function o(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}function a(t,n){return tn?1:t>=n?0:NaN}function c(t){return null===t?NaN:+t}function f(t){return!isNaN(t)}function l(t){return{left:function(n,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=n.length);r>>1;t(n[i],e)<0?r=i+1:u=i}return r},right:function(n,e,r,u){for(arguments.length<3&&(r=0),arguments.length<4&&(u=n.length);r>>1;t(n[i],e)>0?u=i:r=i+1}return r}}}function s(t){return t.length}function h(t){for(var n=1;t*n%1;)n*=10;return n}function d(t,n){for(var e in n)Object.defineProperty(t.prototype,e,{value:n[e],enumerable:!1})}function p(){this._=Object.create(null)}function g(t){return(t+="")===ko||t[0]===Eo?Eo+t:t}function v(t){return(t+="")[0]===Eo?t.slice(1):t}function y(t){return g(t)in this._}function _(t){return(t=g(t))in this._&&delete this._[t]}function m(){var t=[];for(var n in this._)t.push(v(n));return t}function x(){var t=0;for(var n in this._)++t;return t}function b(){for(var t in this._)return!1;return!0}function w(){this._=Object.create(null)}function M(t){return t}function k(t,n,e){return function(){var r=e.apply(n,arguments);return r===n?t:r}}function E(t,n){if(n in t)return n;n=n.charAt(0).toUpperCase()+n.slice(1);for(var e=0,r=No.length;e=n&&(n=u+1);!(o=a[n])&&++n0&&(t=t.slice(0,a));var f=Io.get(t);return f&&(t=f,c=Q),a?n?u:r:n?N:i}function K(t,n){return function(e){var r=ho.event;ho.event=e,n[0]=this.__data__;try{t.apply(this,n)}finally{ho.event=r}}}function Q(t,n){var e=K(t,n);return function(t){var n=this,r=t.relatedTarget;r&&(r===n||8&r.compareDocumentPosition(n))||e.call(n,t)}}function tt(t){var n=".dragsuppress-"+ ++Do,e="click"+n,r=ho.select(o(t)).on("touchmove"+n,C).on("dragstart"+n,C).on("selectstart"+n,C);if(null==zo&&(zo=!("onselectstart"in t)&&E(t.style,"userSelect")),zo){var u=i(t).style,a=u[zo];u[zo]="none"}return function(t){if(r.on(n,null),zo&&(u[zo]=a),t){var i=function(){r.on(e,null)};r.on(e,function(){C(),i()},!0),setTimeout(i,0)}}}function nt(t,n){n.changedTouches&&(n=n.changedTouches[0]);var e=t.ownerSVGElement||t;if(e.createSVGPoint){var r=e.createSVGPoint();if(qo<0){var u=o(t);if(u.scrollX||u.scrollY){e=ho.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var i=e[0][0].getScreenCTM();qo=!(i.f||i.e),e.remove()}}return qo?(r.x=n.pageX,r.y=n.pageY):(r.x=n.clientX,r.y=n.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var a=t.getBoundingClientRect();return[n.clientX-a.left-t.clientLeft,n.clientY-a.top-t.clientTop]}function et(){return ho.event.changedTouches[0].identifier}function rt(t){return t>0?1:t<0?-1:0}function ut(t,n,e){return(n[0]-t[0])*(e[1]-t[1])-(n[1]-t[1])*(e[0]-t[0])}function it(t){return t>1?0:t<-1?Bo:Math.acos(t)}function ot(t){return t>1?Ho:t<-1?-Ho:Math.asin(t)}function at(t){return((t=Math.exp(t))-1/t)/2}function ct(t){return((t=Math.exp(t))+1/t)/2}function ft(t){return((t=Math.exp(2*t))-1)/(t+1)}function lt(t){return(t=Math.sin(t/2))*t}function st(){}function ht(t,n,e){return this instanceof ht?(this.h=+t,this.s=+n,void(this.l=+e)):arguments.length<2?t instanceof ht?new ht(t.h,t.s,t.l):Nt(""+t,St,ht):new ht(t,n,e)}function dt(t,n,e){function r(t){return t>360?t-=360:t<0&&(t+=360),t<60?i+(o-i)*t/60:t<180?o:t<240?i+(o-i)*(240-t)/60:i}function u(t){return Math.round(255*r(t))}var i,o;return t=isNaN(t)?0:(t%=360)<0?t+360:t,n=isNaN(n)?0:n<0?0:n>1?1:n,e=e<0?0:e>1?1:e,o=e<=.5?e*(1+n):e+n-e*n,i=2*e-o,new wt(u(t+120),u(t),u(t-120))}function pt(t,n,e){return this instanceof pt?(this.h=+t,this.c=+n,void(this.l=+e)):arguments.length<2?t instanceof pt?new pt(t.h,t.c,t.l):t instanceof vt?_t(t.l,t.a,t.b):_t((t=jt((t=ho.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new pt(t,n,e)}function gt(t,n,e){return isNaN(t)&&(t=0),isNaN(n)&&(n=0),new vt(e,Math.cos(t*=Vo)*n,Math.sin(t)*n)}function vt(t,n,e){return this instanceof vt?(this.l=+t,this.a=+n,void(this.b=+e)):arguments.length<2?t instanceof vt?new vt(t.l,t.a,t.b):t instanceof pt?gt(t.h,t.c,t.l):jt((t=wt(t)).r,t.g,t.b):new vt(t,n,e)}function yt(t,n,e){var r=(t+16)/116,u=r+n/500,i=r-e/200;return u=mt(u)*na,r=mt(r)*ea,i=mt(i)*ra,new wt(bt(3.2404542*u-1.5371385*r-.4985314*i),bt(-.969266*u+1.8760108*r+.041556*i),bt(.0556434*u-.2040259*r+1.0572252*i))}function _t(t,n,e){return t>0?new pt(Math.atan2(e,n)*$o,Math.sqrt(n*n+e*e),t):new pt(NaN,NaN,t)}function mt(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function xt(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function bt(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}function wt(t,n,e){return this instanceof wt?(this.r=~~t,this.g=~~n,void(this.b=~~e)):arguments.length<2?t instanceof wt?new wt(t.r,t.g,t.b):Nt(""+t,wt,dt):new wt(t,n,e)}function Mt(t){return new wt(t>>16,t>>8&255,255&t)}function kt(t){return Mt(t)+""}function Et(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function Nt(t,n,e){var r,u,i,o=0,a=0,c=0;if(r=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()))switch(u=r[2].split(","),r[1]){case"hsl":return e(parseFloat(u[0]),parseFloat(u[1])/100,parseFloat(u[2])/100);case"rgb":return n(At(u[0]),At(u[1]),At(u[2]))}return(i=oa.get(t))?n(i.r,i.g,i.b):(null==t||"#"!==t.charAt(0)||isNaN(i=parseInt(t.slice(1),16))||(4===t.length?(o=(3840&i)>>4,o|=o>>4,a=240&i,a|=a>>4,c=15&i,c|=c<<4):7===t.length&&(o=(16711680&i)>>16,a=(65280&i)>>8,c=255&i)),n(o,a,c))}function St(t,n,e){var r,u,i=Math.min(t/=255,n/=255,e/=255),o=Math.max(t,n,e),a=o-i,c=(o+i)/2;return a?(u=c<.5?a/(o+i):a/(2-o-i),r=t==o?(n-e)/a+(n0&&c<1?0:r),new ht(r,u,c)}function jt(t,n,e){t=Ct(t),n=Ct(n),e=Ct(e);var r=xt((.4124564*t+.3575761*n+.1804375*e)/na),u=xt((.2126729*t+.7151522*n+.072175*e)/ea);return vt(116*u-16,500*(r-u),200*(u-xt((.0193339*t+.119192*n+.9503041*e)/ra)))}function Ct(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function At(t){var n=parseFloat(t);return"%"===t.charAt(t.length-1)?Math.round(2.55*n):n}function Lt(t){return"function"==typeof t?t:function(){return t}}function Tt(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=null),Ot(n,e,t,r)}}function Ot(t,n,e,r){function u(){var t,n=c.status;if(!n&&Pt(c)||n>=200&&n<300||304===n){try{t=e.call(i,c)}catch(t){return void o.error.call(i,t)}o.load.call(i,t)}else o.error.call(i,c)}var i={},o=ho.dispatch("beforesend","progress","load","error"),a={},c=new XMLHttpRequest,f=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=u:c.onreadystatechange=function(){c.readyState>3&&u()},c.onprogress=function(t){var n=ho.event;ho.event=t;try{o.progress.call(i,c)}finally{ho.event=n}},i.header=function(t,n){return t=(t+"").toLowerCase(),arguments.length<2?a[t]:(null==n?delete a[t]:a[t]=n+"",i)},i.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",i):n},i.responseType=function(t){return arguments.length?(f=t,i):f},i.response=function(t){return e=t,i},["get","post"].forEach(function(t){i[t]=function(){return i.send.apply(i,[t].concat(go(arguments)))}}),i.send=function(e,r,u){if(2===arguments.length&&"function"==typeof r&&(u=r,r=null),c.open(e,t,!0),null==n||"accept"in a||(a.accept=n+",*/*"),c.setRequestHeader)for(var l in a)c.setRequestHeader(l,a[l]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=f&&(c.responseType=f),null!=u&&i.on("error",u).on("load",function(t){u(null,t)}),o.beforesend.call(i,c),c.send(null==r?null:r),i},i.abort=function(){return c.abort(),i},ho.rebind(i,o,"on"),null==r?i:i.get(Rt(r))}function Rt(t){return 1===t.length?function(n,e){t(null==n?e:null)}:t}function Pt(t){var n=t.responseType;return n&&"text"!==n?t.response:t.responseText}function It(t,n,e){var r=arguments.length;r<2&&(n=0),r<3&&(e=Date.now());var u=e+n,i={c:t,t:u,n:null};return ca?ca.n=i:aa=i,ca=i,fa||(la=clearTimeout(la),fa=1,sa(zt)),i}function zt(){var t=Dt(),n=qt()-t;n>24?(isFinite(n)&&(clearTimeout(la),la=setTimeout(zt,n)),fa=0):(fa=1,sa(zt))}function Dt(){for(var t=Date.now(),n=aa;n;)t>=n.t&&n.c(t-n.t)&&(n.c=null),n=n.n;return t}function qt(){for(var t,n=aa,e=1/0;n;)n.c?(n.t8?function(t){return t/e}:function(t){return t*e},symbol:t}}function Bt(t){var n=t.decimal,e=t.thousands,r=t.grouping,u=t.currency,i=r&&e?function(t,n){for(var u=t.length,i=[],o=0,a=r[0],c=0;u>0&&a>0&&(c+a+1>n&&(a=Math.max(1,n-c)),i.push(t.substring(u-=a,u+a)),!((c+=a+1)>n));)a=r[o=(o+1)%r.length];return i.reverse().join(e)}:M;return function(t){var e=da.exec(t),r=e[1]||" ",o=e[2]||">",a=e[3]||"-",c=e[4]||"",f=e[5],l=+e[6],s=e[7],h=e[8],d=e[9],p=1,g="",v="",y=!1,_=!0;switch(h&&(h=+h.substring(1)),(f||"0"===r&&"="===o)&&(f=r="0",o="="),d){case"n":s=!0,d="g";break;case"%":p=100,v="%",d="f";break;case"p":p=100,v="%",d="r";break;case"b":case"o":case"x":case"X":"#"===c&&(g="0"+d.toLowerCase());case"c":_=!1;case"d":y=!0,h=0;break;case"s":p=-1,d="r"}"$"===c&&(g=u[0],v=u[1]),"r"!=d||h||(d="g"),null!=h&&("g"==d?h=Math.max(1,Math.min(21,h)):"e"!=d&&"f"!=d||(h=Math.max(0,Math.min(20,h)))),d=pa.get(d)||Wt;var m=f&&s;return function(t){var e=v;if(y&&t%1)return"";var u=t<0||0===t&&1/t<0?(t=-t,"-"):"-"===a?"":a;if(p<0){var c=ho.formatPrefix(t,h);t=c.scale(t),e=c.symbol+v}else t*=p;t=d(t,h);var x,b,w=t.lastIndexOf(".");if(w<0){var M=_?t.lastIndexOf("e"):-1;M<0?(x=t,b=""):(x=t.substring(0,M),b=t.substring(M))}else x=t.substring(0,w),b=n+t.substring(w+1);!f&&s&&(x=i(x,1/0));var k=g.length+x.length+b.length+(m?0:u.length),E=k"===o?E+u+t:"^"===o?E.substring(0,k>>=1)+u+t+E.substring(k):u+(m?t:E+t))+e}}}function Wt(t){return t+""}function Yt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}function Ht(t,n,e){function r(n){var e=t(n),r=i(e,1);return n-e1)for(;o=f)return-1;if(37===(u=n.charCodeAt(a++))){if(o=n.charAt(a++),!(i=C[o in _a?n.charAt(a++):o])||(r=i(t,e,r))<0)return-1}else if(u!=e.charCodeAt(r++))return-1}return r}function r(t,n,e){w.lastIndex=0;var r=w.exec(n.slice(e));return r?(t.w=M.get(r[0].toLowerCase()),e+r[0].length):-1}function u(t,n,e){x.lastIndex=0;var r=x.exec(n.slice(e));return r?(t.w=b.get(r[0].toLowerCase()),e+r[0].length):-1}function i(t,n,e){N.lastIndex=0;var r=N.exec(n.slice(e));return r?(t.m=S.get(r[0].toLowerCase()),e+r[0].length):-1}function o(t,n,e){k.lastIndex=0;var r=k.exec(n.slice(e));return r?(t.m=E.get(r[0].toLowerCase()),e+r[0].length):-1}function a(t,n,r){return e(t,j.c.toString(),n,r)}function c(t,n,r){return e(t,j.x.toString(),n,r)}function f(t,n,r){return e(t,j.X.toString(),n,r)}function l(t,n,e){var r=m.get(n.slice(e,e+=2).toLowerCase());return null==r?-1:(t.p=r,e)}var s=t.dateTime,h=t.date,d=t.time,p=t.periods,g=t.days,v=t.shortDays,y=t.months,_=t.shortMonths;n.utc=function(t){function e(t){try{va=Yt;var n=new va;return n._=t,r(n)}finally{va=Date}}var r=n(t);return e.parse=function(t){try{va=Yt;var n=r.parse(t);return n&&n._}finally{va=Date}},e.toString=r.toString,e},n.multi=n.utc.multi=pn;var m=ho.map(),x=Zt(g),b=Xt(g),w=Zt(v),M=Xt(v),k=Zt(y),E=Xt(y),N=Zt(_),S=Xt(_);p.forEach(function(t,n){m.set(t.toLowerCase(),n)});var j={a:function(t){return v[t.getDay()]},A:function(t){return g[t.getDay()]},b:function(t){return _[t.getMonth()]},B:function(t){return y[t.getMonth()]},c:n(s),d:function(t,n){return Gt(t.getDate(),n,2)},e:function(t,n){return Gt(t.getDate(),n,2)},H:function(t,n){return Gt(t.getHours(),n,2)},I:function(t,n){return Gt(t.getHours()%12||12,n,2)},j:function(t,n){return Gt(1+ga.dayOfYear(t),n,3)},L:function(t,n){return Gt(t.getMilliseconds(),n,3)},m:function(t,n){return Gt(t.getMonth()+1,n,2)},M:function(t,n){return Gt(t.getMinutes(),n,2)},p:function(t){return p[+(t.getHours()>=12)]},S:function(t,n){return Gt(t.getSeconds(),n,2)},U:function(t,n){return Gt(ga.sundayOfYear(t),n,2)},w:function(t){return t.getDay()},W:function(t,n){return Gt(ga.mondayOfYear(t),n,2)},x:n(h),X:n(d),y:function(t,n){return Gt(t.getFullYear()%100,n,2)},Y:function(t,n){return Gt(t.getFullYear()%1e4,n,4)},Z:hn,"%":function(){return"%"}},C={a:r,A:u,b:i,B:o,c:a,d:on,e:on,H:cn,I:cn,j:an,L:sn,m:un,M:fn,p:l,S:ln,U:Kt,w:Jt,W:Qt,x:c,X:f,y:nn,Y:tn,Z:en,"%":dn};return n}function Gt(t,n,e){var r=t<0?"-":"",u=(r?-t:t)+"",i=u.length;return r+(i68?1900:2e3)}function un(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+2));return r?(t.m=r[0]-1,e+r[0].length):-1}function on(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+2));return r?(t.d=+r[0],e+r[0].length):-1}function an(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+3));return r?(t.j=+r[0],e+r[0].length):-1}function cn(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+2));return r?(t.H=+r[0],e+r[0].length):-1}function fn(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+2));return r?(t.M=+r[0],e+r[0].length):-1}function ln(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+2));return r?(t.S=+r[0],e+r[0].length):-1}function sn(t,n,e){ma.lastIndex=0;var r=ma.exec(n.slice(e,e+3));return r?(t.L=+r[0],e+r[0].length):-1}function hn(t){var n=t.getTimezoneOffset(),e=n>0?"-":"+",r=Mo(n)/60|0,u=Mo(n)%60;return e+Gt(r,"0",2)+Gt(u,"0",2)}function dn(t,n,e){xa.lastIndex=0;var r=xa.exec(n.slice(e,e+1));return r?e+r[0].length:-1}function pn(t){for(var n=t.length,e=-1;++e=0?1:-1,a=o*e,c=Math.cos(n),f=Math.sin(n),l=i*f,s=u*c+l*Math.cos(a),h=l*o*Math.sin(a);Na.add(Math.atan2(h,s)),r=t,u=c,i=f}var n,e,r,u,i;Sa.point=function(o,a){Sa.point=t,r=(n=o)*Vo,u=Math.cos(a=(e=a)*Vo/2+Bo/4),i=Math.sin(a)},Sa.lineEnd=function(){t(n,e)}}function bn(t){var n=t[0],e=t[1],r=Math.cos(e);return[r*Math.cos(n),r*Math.sin(n),Math.sin(e)]}function wn(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function Mn(t,n){return[t[1]*n[2]-t[2]*n[1],t[2]*n[0]-t[0]*n[2],t[0]*n[1]-t[1]*n[0]]}function kn(t,n){t[0]+=n[0],t[1]+=n[1],t[2]+=n[2]}function En(t,n){return[t[0]*n,t[1]*n,t[2]*n]}function Nn(t){var n=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=n,t[1]/=n,t[2]/=n}function Sn(t){return[Math.atan2(t[1],t[0]),ot(t[2])]}function jn(t,n){return Mo(t[0]-n[0])=0;--a)u.point((s=l[a])[0],s[1])}else r(d.x,d.p.x,-1,u);d=d.p}d=d.o,l=d.z,p=!p}while(!d.v);u.lineEnd()}}}function zn(t){if(n=t.length){for(var n,e,r=0,u=t[0];++r0){for(b||(i.polygonStart(),b=!0),i.lineStart();++o1&&2&n&&e.push(e.pop().concat(e.shift())),d.push(e.filter(Un))}var d,p,g,v=n(i),y=u.invert(r[0],r[1]),_={point:o,lineStart:c,lineEnd:f,polygonStart:function(){_.point=l,_.lineStart=s,_.lineEnd=h,d=[],p=[]},polygonEnd:function(){_.point=o,_.lineStart=c,_.lineEnd=f,d=ho.merge(d);var t=Vn(y,p);d.length?(b||(i.polygonStart(),b=!0),In(d,Bn,t,e,i)):t&&(b||(i.polygonStart(),b=!0),i.lineStart(),e(null,null,1,i),i.lineEnd()),b&&(i.polygonEnd(),b=!1),d=p=null},sphere:function(){i.polygonStart(),i.lineStart(),e(null,null,1,i),i.lineEnd(),i.polygonEnd()}},m=Fn(),x=n(m),b=!1;return _}}function Un(t){return t.length>1}function Fn(){var t,n=[];return{lineStart:function(){n.push(t=[])},point:function(n,e){t.push([n,e])},lineEnd:N,buffer:function(){var e=n;return n=[],t=null,e},rejoin:function(){n.length>1&&n.push(n.pop().concat(n.shift()))}}}function Bn(t,n){return((t=t.x)[0]<0?t[1]-Ho-Uo:Ho-t[1])-((n=n.x)[0]<0?n[1]-Ho-Uo:Ho-n[1])}function Wn(t){var n,e=NaN,r=NaN,u=NaN;return{lineStart:function(){t.lineStart(),n=1},point:function(i,o){var a=i>0?Bo:-Bo,c=Mo(i-e);Mo(c-Bo)0?Ho:-Ho),t.point(u,r),t.lineEnd(),t.lineStart(),t.point(a,r),t.point(i,r),n=0):u!==a&&c>=Bo&&(Mo(e-u)Uo?Math.atan((Math.sin(n)*(i=Math.cos(r))*Math.sin(e)-Math.sin(r)*(u=Math.cos(n))*Math.sin(t))/(u*i*o)):(n+r)/2}function Hn(t,n,e,r){var u;if(null==t)u=e*Ho,r.point(-Bo,u),r.point(0,u),r.point(Bo,u),r.point(Bo,0),r.point(Bo,-u),r.point(0,-u),r.point(-Bo,-u),r.point(-Bo,0),r.point(-Bo,u);else if(Mo(t[0]-n[0])>Uo){var i=t[0]=0?1:-1,M=w*b,k=M>Bo,E=p*m;if(Na.add(Math.atan2(E*w*Math.sin(M),g*x+E*Math.cos(M))),i+=k?b+w*Wo:b,k^h>=e^y>=e){var N=Mn(bn(s),bn(t));Nn(N);var S=Mn(u,N);Nn(S);var j=(k^b>=0?-1:1)*ot(S[2]);(r>j||r===j&&(N[0]||N[1]))&&(o+=k^b>=0?1:-1)}if(!v++)break;h=y,p=m,g=x,s=t}}return(i<-Uo||ii}function e(t){var e,i,c,f,l;return{lineStart:function(){f=c=!1,l=1},point:function(s,h){var d,p=[s,h],g=n(s,h),v=o?g?0:u(s,h):g?u(s+(s<0?Bo:-Bo),h):0;if(!e&&(f=c=g)&&t.lineStart(),g!==c&&(d=r(e,p),(jn(e,d)||jn(p,d))&&(p[0]+=Uo,p[1]+=Uo,g=n(p[0],p[1]))),g!==c)l=0,g?(t.lineStart(),d=r(p,e),t.point(d[0],d[1])):(d=r(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(a&&e&&o^g){var y;v&i||!(y=r(p,e,!0))||(l=0,o?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1])))}!g||e&&jn(e,p)||t.point(p[0],p[1]),e=p,c=g,i=v},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(f&&c)<<1}}}function r(t,n,e){var r=bn(t),u=bn(n),o=[1,0,0],a=Mn(r,u),c=wn(a,a),f=a[0],l=c-f*f;if(!l)return!e&&t;var s=i*c/l,h=-i*f/l,d=Mn(o,a),p=En(o,s);kn(p,En(a,h));var g=d,v=wn(p,g),y=wn(g,g),_=v*v-y*(wn(p,p)-1);if(!(_<0)){var m=Math.sqrt(_),x=En(g,(-v-m)/y);if(kn(x,p),x=Sn(x),!e)return x;var b,w=t[0],M=n[0],k=t[1],E=n[1];M0^x[1]<(Mo(x[0]-w)Bo^(w<=x[0]&&x[0]<=M)){var C=En(g,(-v+m)/y);return kn(C,p),[x,Sn(C)]}}}function u(n,e){var r=o?t:Bo-t,u=0;return n<-r?u|=1:n>r&&(u|=2),e<-r?u|=4:e>r&&(u|=8),u}var i=Math.cos(t),o=i>0,a=Mo(i)>Uo;return qn(n,e,xe(t,6*Vo),o?[0,-t]:[-Bo,t-Bo])}function Gn(t,n,e,r){return function(u){var i,o=u.a,a=u.b,c=o.x,f=o.y,l=a.x,s=a.y,h=0,d=1,p=l-c,g=s-f;if(i=t-c,p||!(i>0)){if(i/=p,p<0){if(i0){if(i>d)return;i>h&&(h=i)}if(i=e-c,p||!(i<0)){if(i/=p,p<0){if(i>d)return;i>h&&(h=i)}else if(p>0){if(i0)){if(i/=g,g<0){if(i0){if(i>d)return;i>h&&(h=i)}if(i=r-f,g||!(i<0)){if(i/=g,g<0){if(i>d)return;i>h&&(h=i)}else if(g>0){if(i0&&(u.a={x:c+h*p,y:f+h*g}),d<1&&(u.b={x:c+d*p,y:f+d*g}),u}}}}}}function Zn(t,n,e,r){function u(r,u){return Mo(r[0]-t)0?0:3:Mo(r[0]-e)0?2:1:Mo(r[1]-n)0?1:0:u>0?3:2}function i(t,n){return o(t.x,n.x)}function o(t,n){var e=u(t,1),r=u(n,1);return e!==r?e-r:0===e?n[1]-t[1]:1===e?t[0]-n[0]:2===e?t[1]-n[1]:n[0]-t[0]}return function(a){function c(t){for(var n=0,e=v.length,r=t[1],u=0;ur&&ut(f,i,t)>0&&++n:i[1]<=r&&ut(f,i,t)<0&&--n,f=i;return 0!==n}function f(i,a,c,f){var l=0,s=0;if(null==i||(l=u(i,c))!==(s=u(a,c))||o(i,a)<0^c>0)do{f.point(0===l||3===l?t:e,l>1?r:n)}while((l=(l+c+4)%4)!==s);else f.point(a[0],a[1])}function l(u,i){return t<=u&&u<=e&&n<=i&&i<=r}function s(t,n){l(t,n)&&a.point(t,n)}function h(){C.point=p,v&&v.push(y=[]),k=!0,M=!1,b=w=NaN}function d(){g&&(p(_,m),x&&M&&S.rejoin(),g.push(S.buffer())),C.point=s,M&&a.lineEnd()}function p(t,n){t=Math.max(-Fa,Math.min(Fa,t)),n=Math.max(-Fa,Math.min(Fa,n));var e=l(t,n);if(v&&y.push([t,n]),k)_=t,m=n,x=e,k=!1,e&&(a.lineStart(),a.point(t,n));else if(e&&M)a.point(t,n);else{var r={a:{x:b,y:w},b:{x:t,y:n}};j(r)?(M||(a.lineStart(),a.point(r.a.x,r.a.y)),a.point(r.b.x,r.b.y),e||a.lineEnd(),E=!1):e&&(a.lineStart(),a.point(t,n),E=!1)}b=t,w=n,M=e}var g,v,y,_,m,x,b,w,M,k,E,N=a,S=Fn(),j=Gn(t,n,e,r),C={point:s,lineStart:h,lineEnd:d,polygonStart:function(){a=S,g=[],v=[],E=!0},polygonEnd:function(){a=N,g=ho.merge(g);var n=c([t,r]),e=E&&n,u=g.length;(e||u)&&(a.polygonStart(),e&&(a.lineStart(),f(null,null,1,a),a.lineEnd()),u&&In(g,i,n,f,a),a.polygonEnd()),g=v=y=null}};return C}}function Xn(t){var n=0,e=Bo/3,r=he(t),u=r(n,e);return u.parallels=function(t){return arguments.length?r(n=t[0]*Bo/180,e=t[1]*Bo/180):[n/Bo*180,e/Bo*180]},u}function Jn(t,n){function e(t,n){var e=Math.sqrt(i-2*u*Math.sin(n))/u;return[e*Math.sin(t*=u),o-e*Math.cos(t)]}var r=Math.sin(t),u=(r+Math.sin(n))/2,i=1+r*(2*u-r),o=Math.sqrt(i)/u;return e.invert=function(t,n){var e=o-n;return[Math.atan2(t,e)/u,ot((i-(t*t+e*e)*u*u)/(2*u))]},e}function Kn(){function t(t,n){Wa+=u*t-r*n,r=t,u=n}var n,e,r,u;Ga.point=function(i,o){Ga.point=t,n=r=i,e=u=o},Ga.lineEnd=function(){t(n,e)}}function Qn(t,n){tVa&&(Va=t),n$a&&($a=n)}function te(){function t(t,n){o.push("M",t,",",n,i)}function n(t,n){o.push("M",t,",",n),a.point=e}function e(t,n){o.push("L",t,",",n)}function r(){a.point=t}function u(){o.push("Z")}var i=ne(4.5),o=[],a={point:t,lineStart:function(){a.point=n},lineEnd:r,polygonStart:function(){a.lineEnd=u},polygonEnd:function(){a.lineEnd=r,a.point=t},pointRadius:function(t){return i=ne(t),a},result:function(){if(o.length){var t=o.join("");return o=[],t}}};return a}function ne(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ee(t,n){Aa+=t,La+=n,++Ta}function re(){function t(t,r){var u=t-n,i=r-e,o=Math.sqrt(u*u+i*i);Oa+=o*(n+t)/2,Ra+=o*(e+r)/2,Pa+=o,ee(n=t,e=r)}var n,e;Xa.point=function(r,u){Xa.point=t,ee(n=r,e=u)}}function ue(){Xa.point=ee}function ie(){function t(t,n){var e=t-r,i=n-u,o=Math.sqrt(e*e+i*i);Oa+=o*(r+t)/2,Ra+=o*(u+n)/2,Pa+=o,o=u*t-r*n,Ia+=o*(r+t),za+=o*(u+n),Da+=3*o,ee(r=t,u=n)}var n,e,r,u;Xa.point=function(i,o){Xa.point=t,ee(n=r=i,e=u=o)},Xa.lineEnd=function(){t(n,e)}}function oe(t){function n(n,e){t.moveTo(n+o,e),t.arc(n,e,o,0,Wo)}function e(n,e){t.moveTo(n,e),a.point=r}function r(n,e){t.lineTo(n,e)}function u(){a.point=n}function i(){t.closePath()}var o=4.5,a={point:n,lineStart:function(){a.point=e},lineEnd:u,polygonStart:function(){a.lineEnd=i},polygonEnd:function(){a.lineEnd=u,a.point=n},pointRadius:function(t){return o=t,a},result:N};return a}function ae(t){function n(t){return(a?r:e)(t)}function e(n){return le(n,function(e,r){e=t(e,r),n.point(e[0],e[1])})}function r(n){function e(e,r){e=t(e,r),n.point(e[0],e[1])}function r(){m=NaN,k.point=i,n.lineStart()}function i(e,r){var i=bn([e,r]),o=t(e,r);u(m,x,_,b,w,M,m=o[0],x=o[1],_=e,b=i[0],w=i[1],M=i[2],a,n),n.point(m,x)}function o(){k.point=e,n.lineEnd()}function c(){r(),k.point=f,k.lineEnd=l}function f(t,n){i(s=t,h=n),d=m,p=x,g=b,v=w,y=M,k.point=i}function l(){u(m,x,_,b,w,M,d,p,s,g,v,y,a,n),k.lineEnd=o,o()}var s,h,d,p,g,v,y,_,m,x,b,w,M,k={point:e,lineStart:r,lineEnd:o,polygonStart:function(){n.polygonStart(),k.lineStart=c},polygonEnd:function(){n.polygonEnd(),k.lineStart=r}};return k}function u(n,e,r,a,c,f,l,s,h,d,p,g,v,y){var _=l-n,m=s-e,x=_*_+m*m;if(x>4*i&&v--){var b=a+d,w=c+p,M=f+g,k=Math.sqrt(b*b+w*w+M*M),E=Math.asin(M/=k),N=Mo(Mo(M)-1)i||Mo((_*A+m*L)/x-.5)>.3||a*d+c*p+f*g0&&16,n):Math.sqrt(i)},n}function ce(t){var n=ae(function(n,e){return t([n*$o,e*$o])});return function(t){return de(n(t))}}function fe(t){this.stream=t}function le(t,n){return{point:n,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}function se(t){return he(function(){return t})()}function he(t){function n(t){return t=a(t[0]*Vo,t[1]*Vo),[t[0]*h+c,f-t[1]*h]}function e(t){return(t=a.invert((t[0]-c)/h,(f-t[1])/h))&&[t[0]*$o,t[1]*$o]}function r(){a=Rn(o=ve(y,_,m),i);var t=i(g,v);return c=d-t[0]*h,f=p+t[1]*h,u()}function u(){return l&&(l.valid=!1,l=null),n}var i,o,a,c,f,l,s=ae(function(t,n){return t=i(t,n),[t[0]*h+c,f-t[1]*h]}),h=150,d=480,p=250,g=0,v=0,y=0,_=0,m=0,x=Ua,b=M,w=null,k=null;return n.stream=function(t){return l&&(l.valid=!1),l=de(x(o,s(b(t)))),l.valid=!0,l},n.clipAngle=function(t){return arguments.length?(x=null==t?(w=t,Ua):$n((w=+t)*Vo),u()):w},n.clipExtent=function(t){return arguments.length?(k=t,b=t?Zn(t[0][0],t[0][1],t[1][0],t[1][1]):M,u()):k},n.scale=function(t){return arguments.length?(h=+t,r()):h},n.translate=function(t){return arguments.length?(d=+t[0],p=+t[1],r()):[d,p]},n.center=function(t){return arguments.length?(g=t[0]%360*Vo,v=t[1]%360*Vo,r()):[g*$o,v*$o]},n.rotate=function(t){return arguments.length?(y=t[0]%360*Vo,_=t[1]%360*Vo,m=t.length>2?t[2]%360*Vo:0,r()):[y*$o,_*$o,m*$o]},ho.rebind(n,s,"precision"),function(){return i=t.apply(this,arguments),n.invert=i.invert&&e,r()}}function de(t){return le(t,function(n,e){t.point(n*Vo,e*Vo)})}function pe(t,n){return[t,n]}function ge(t,n){return[t>Bo?t-Wo:t<-Bo?t+Wo:t,n]}function ve(t,n,e){return t?n||e?Rn(_e(t),me(n,e)):_e(t):n||e?me(n,e):ge}function ye(t){return function(n,e){return n+=t,[n>Bo?n-Wo:n<-Bo?n+Wo:n,e]}}function _e(t){var n=ye(t);return n.invert=ye(-t),n}function me(t,n){function e(t,n){var e=Math.cos(n),a=Math.cos(t)*e,c=Math.sin(t)*e,f=Math.sin(n),l=f*r+a*u;return[Math.atan2(c*i-l*o,a*r-f*u),ot(l*i+c*o)]}var r=Math.cos(t),u=Math.sin(t),i=Math.cos(n),o=Math.sin(n);return e.invert=function(t,n){var e=Math.cos(n),a=Math.cos(t)*e,c=Math.sin(t)*e,f=Math.sin(n),l=f*i-c*o;return[Math.atan2(c*i+f*o,a*r+l*u),ot(l*r-a*u)]},e}function xe(t,n){var e=Math.cos(t),r=Math.sin(t);return function(u,i,o,a){var c=o*n;null!=u?(u=be(e,u),i=be(e,i),(o>0?ui)&&(u+=o*Wo)):(u=t+o*Wo,i=t-.5*c);for(var f,l=u;o>0?l>i:l0?n<-Ho+Uo&&(n=-Ho+Uo):n>Ho-Uo&&(n=Ho-Uo);var e=o/Math.pow(u(n),i);return[e*Math.sin(i*t),o-e*Math.cos(i*t)]}var r=Math.cos(t),u=function(t){return Math.tan(Bo/4+t/2)},i=t===n?Math.sin(t):Math.log(r/Math.cos(n))/Math.log(u(n)/u(t)),o=r*Math.pow(u(t),i)/i;return i?(e.invert=function(t,n){var e=o-n,r=rt(i)*Math.sqrt(t*t+e*e);return[Math.atan2(t,e)/i,2*Math.atan(Math.pow(o/r,1/i))-Ho]},e):Le}function Ae(t,n){function e(t,n){var e=i-n;return[e*Math.sin(u*t),i-e*Math.cos(u*t)]}var r=Math.cos(t),u=t===n?Math.sin(t):(r-Math.cos(n))/(n-t),i=r/u+t;return Mo(u)1&&ut(t[e[r-2]],t[e[r-1]],t[u])<=0;)--r;e[r++]=u}return e.slice(0,r)}function ze(t,n){return t[0]-n[0]||t[1]-n[1]}function De(t,n,e){return(e[0]-n[0])*(t[1]-n[1])<(e[1]-n[1])*(t[0]-n[0])}function qe(t,n,e,r){var u=t[0],i=e[0],o=n[0]-u,a=r[0]-i,c=t[1],f=e[1],l=n[1]-c,s=r[1]-f,h=(a*(c-f)-s*(u-i))/(s*o-a*l);return[u+h*o,c+h*l]}function Ue(t){var n=t[0],e=t[t.length-1];return!(n[0]-e[0]||n[1]-e[1])}function Fe(){cr(this),this.edge=this.site=this.circle=null}function Be(t){var n=lc.pop()||new Fe;return n.site=t,n}function We(t){Qe(t),ac.remove(t),lc.push(t),cr(t)}function Ye(t){var n=t.circle,e=n.x,r=n.cy,u={x:e,y:r},i=t.P,o=t.N,a=[t];We(t);for(var c=i;c.circle&&Mo(e-c.circle.x)Uo)a=a.L;else{if(!((u=i-$e(a,o))>Uo)){r>-Uo?(n=a.P,e=a):u>-Uo?(n=a,e=a.N):n=e=a;break}if(!a.R){n=a;break}a=a.R}var c=Be(t);if(ac.insert(n,c),n||e){if(n===e)return Qe(n),e=Be(n.site),ac.insert(c,e),c.edge=e.edge=rr(n.site,c.site),Ke(n),void Ke(e);if(!e)return void(c.edge=rr(n.site,c.site));Qe(n),Qe(e);var f=n.site,l=f.x,s=f.y,h=t.x-l,d=t.y-s,p=e.site,g=p.x-l,v=p.y-s,y=2*(h*v-d*g),_=h*h+d*d,m=g*g+v*v,x={x:(v*_-d*m)/y+l,y:(h*m-g*_)/y+s};ir(e.edge,f,p,x),c.edge=rr(f,t,null,x),e.edge=rr(t,p,null,x),Ke(n),Ke(e)}}function Ve(t,n){var e=t.site,r=e.x,u=e.y,i=u-n;if(!i)return r;var o=t.P;if(!o)return-1/0;e=o.site;var a=e.x,c=e.y,f=c-n;if(!f)return a;var l=a-r,s=1/i-1/f,h=l/f;return s?(-h+Math.sqrt(h*h-2*s*(l*l/(-2*f)-c+f/2+u-i/2)))/s+r:(r+a)/2}function $e(t,n){var e=t.N;if(e)return Ve(e,n);var r=t.site;return r.y===n?r.x:1/0}function Ge(t){this.site=t,this.edges=[]}function Ze(t){for(var n,e,r,u,i,o,a,c,f,l,s=t[0][0],h=t[1][0],d=t[0][1],p=t[1][1],g=oc,v=g.length;v--;)if((i=g[v])&&i.prepare())for(a=i.edges,c=a.length,o=0;oUo||Mo(u-e)>Uo)&&(a.splice(o,0,new or(ur(i.site,l,Mo(r-s)Uo?{x:s,y:Mo(n-s)Uo?{x:Mo(e-p)Uo?{x:h,y:Mo(n-h)Uo?{x:Mo(e-d)=-Fo)){var d=c*c+f*f,p=l*l+s*s,g=(s*d-f*p)/h,v=(c*p-l*d)/h,s=v+a,y=sc.pop()||new Je;y.arc=t,y.site=u,y.x=g+o,y.y=s+Math.sqrt(g*g+v*v),y.cy=s,t.circle=y;for(var _=null,m=fc._;m;)if(y.y=a)return;if(h>p){if(i){if(i.y>=f)return}else i={x:v,y:c};e={x:v,y:f}}else{if(i){if(i.y1)if(h>p){if(i){if(i.y>=f)return}else i={x:(c-u)/r,y:c};e={x:(f-u)/r,y:f}}else{if(i){if(i.y=a)return}else i={x:o,y:r*o+u};e={x:a,y:r*a+u}}else{if(i){if(i.xi||s>o||h=x,M=e>=b,k=M<<1|w,E=k+4;ki&&(u=n.slice(i,u),a[o]?a[o]+=u:a[++o]=u),(e=e[0])===(r=r[0])?a[o]?a[o]+=r:a[++o]=r:(a[++o]=null,c.push({i:o,x:wr(e,r)})),i=pc.lastIndex;return i=0&&!(e=ho.interpolators[r](t,n)););return e}function Er(t,n){var e,r=[],u=[],i=t.length,o=n.length,a=Math.min(t.length,n.length);for(e=0;e=1?1:t(n)}}function Sr(t){return function(n){return 1-t(1-n)}}function jr(t){return function(n){return.5*(n<.5?t(2*n):2-t(2-2*n))}}function Cr(t){return t*t}function Ar(t){return t*t*t}function Lr(t){if(t<=0)return 0;if(t>=1)return 1;var n=t*t,e=n*t;return 4*(t<.5?e:3*(t-n)+e-.75)}function Tr(t){return function(n){return Math.pow(n,t)}}function Or(t){return 1-Math.cos(t*Ho)}function Rr(t){return Math.pow(2,10*(t-1))}function Pr(t){return 1-Math.sqrt(1-t*t)}function Ir(t,n){var e;return arguments.length<2&&(n=.45),arguments.length?e=n/Wo*Math.asin(1/t):(t=1,e=n/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-e)*Wo/n)}}function zr(t){return t||(t=1.70158),function(n){return n*n*((t+1)*n-t)}}function Dr(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}function qr(t,n){t=ho.hcl(t),n=ho.hcl(n);var e=t.h,r=t.c,u=t.l,i=n.h-e,o=n.c-r,a=n.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?n.c:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return gt(e+i*t,r+o*t,u+a*t)+""}}function Ur(t,n){t=ho.hsl(t),n=ho.hsl(n);var e=t.h,r=t.s,u=t.l,i=n.h-e,o=n.s-r,a=n.l-u;return isNaN(o)&&(o=0,r=isNaN(r)?n.s:r),isNaN(i)?(i=0,e=isNaN(e)?n.h:e):i>180?i-=360:i<-180&&(i+=360),function(t){return dt(e+i*t,r+o*t,u+a*t)+""}}function Fr(t,n){t=ho.lab(t),n=ho.lab(n);var e=t.l,r=t.a,u=t.b,i=n.l-e,o=n.a-r,a=n.b-u;return function(t){return yt(e+i*t,r+o*t,u+a*t)+""}}function Br(t,n){return n-=t,function(e){return Math.round(t+n*e)}}function Wr(t){var n=[t.a,t.b],e=[t.c,t.d],r=Hr(n),u=Yr(n,e),i=Hr(Vr(e,n,-u))||0;n[0]*e[1]180?n+=360:n-t>180&&(t+=360),r.push({i:e.push($r(e)+"rotate(",null,")")-2,x:wr(t,n)})):n&&e.push($r(e)+"rotate("+n+")")}function Xr(t,n,e,r){t!==n?r.push({i:e.push($r(e)+"skewX(",null,")")-2,x:wr(t,n)}):n&&e.push($r(e)+"skewX("+n+")")}function Jr(t,n,e,r){if(t[0]!==n[0]||t[1]!==n[1]){var u=e.push($r(e)+"scale(",null,",",null,")");r.push({i:u-4,x:wr(t[0],n[0])},{i:u-2,x:wr(t[1],n[1])})}else 1===n[0]&&1===n[1]||e.push($r(e)+"scale("+n+")")}function Kr(t,n){var e=[],r=[];return t=ho.transform(t),n=ho.transform(n),Gr(t.translate,n.translate,e,r),Zr(t.rotate,n.rotate,e,r),Xr(t.skew,n.skew,e,r),Jr(t.scale,n.scale,e,r),t=n=null,function(t){for(var n,u=-1,i=r.length;++u=0;)e.push(u[r])}function su(t,n){for(var e=[t],r=[];null!=(t=e.pop());)if(r.push(t),(i=t.children)&&(u=i.length))for(var u,i,o=-1;++ou&&(r=e,u=n);return r}function wu(t){return t.reduce(Mu,0)}function Mu(t,n){return t+n[1]}function ku(t,n){return Eu(t,Math.ceil(Math.log(n.length)/Math.LN2+1))}function Eu(t,n){for(var e=-1,r=+t[0],u=(t[1]-r)/n,i=[];++e<=n;)i[e]=u*e+r;return i}function Nu(t){return[ho.min(t),ho.max(t)]}function Su(t,n){return t.value-n.value}function ju(t,n){var e=t._pack_next;t._pack_next=n,n._pack_prev=t,n._pack_next=e,e._pack_prev=n}function Cu(t,n){t._pack_next=n,n._pack_prev=t}function Au(t,n){var e=n.x-t.x,r=n.y-t.y,u=t.r+n.r;return.999*u*u>e*e+r*r}function Lu(t){function n(t){l=Math.min(t.x-t.r,l),s=Math.max(t.x+t.r,s),h=Math.min(t.y-t.r,h),d=Math.max(t.y+t.r,d)}if((e=t.children)&&(f=e.length)){var e,r,u,i,o,a,c,f,l=1/0,s=-1/0,h=1/0,d=-1/0;if(e.forEach(Tu),r=e[0],r.x=-r.r,r.y=0,n(r),f>1&&(u=e[1],u.x=u.r,u.y=0,n(u),f>2))for(i=e[2],Pu(r,u,i),n(i),ju(r,i),r._pack_prev=i,ju(i,u),u=r._pack_next,o=3;o=0;)n=u[i],n.z+=e,n.m+=e,e+=n.s+(r+=n.c)}function Fu(t,n,e){return t.a.parent===n.parent?t.a:e}function Bu(t){return 1+ho.max(t,function(t){return t.y})}function Wu(t){return t.reduce(function(t,n){return t+n.x},0)/t.length}function Yu(t){var n=t.children;return n&&n.length?Yu(n[0]):t}function Hu(t){var n,e=t.children;return e&&(n=e.length)?Hu(e[n-1]):t}function Vu(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function $u(t,n){var e=t.x+n[3],r=t.y+n[0],u=t.dx-n[1]-n[3],i=t.dy-n[0]-n[2];return u<0&&(e+=u/2,u=0),i<0&&(r+=i/2,i=0),{x:e,y:r,dx:u,dy:i}}function Gu(t){var n=t[0],e=t[t.length-1];return n2?Qu:Xu,c=r?tu:Qr;return o=u(t,n,c,e),a=u(n,t,c,kr),i}function i(t){return o(t)}var o,a;return i.invert=function(t){return a(t)},i.domain=function(n){return arguments.length?(t=n.map(Number),u()):t},i.range=function(t){return arguments.length?(n=t,u()):n},i.rangeRound=function(t){return i.range(t).interpolate(Br)},i.clamp=function(t){return arguments.length?(r=t,u()):r},i.interpolate=function(t){return arguments.length?(e=t,u()):e},i.ticks=function(n){return ui(t,n)},i.tickFormat=function(n,e){return ii(t,n,e)},i.nice=function(n){return ei(t,n),u()},i.copy=function(){return ti(t,n,e,r)},u()}function ni(t,n){return ho.rebind(t,n,"range","rangeRound","interpolate","clamp")}function ei(t,n){return Ju(t,Ku(ri(t,n)[2])),Ju(t,Ku(ri(t,n)[2])),t}function ri(t,n){null==n&&(n=10);var e=Gu(t),r=e[1]-e[0],u=Math.pow(10,Math.floor(Math.log(r/n)/Math.LN10)),i=n/r*u;return i<=.15?u*=10:i<=.35?u*=5:i<=.75&&(u*=2),e[0]=Math.ceil(e[0]/u)*u,e[1]=Math.floor(e[1]/u)*u+.5*u,e[2]=u,e}function ui(t,n){return ho.range.apply(ho,ri(t,n))}function ii(t,n,e){var r=ri(t,n);if(e){var u=da.exec(e);if(u.shift(),"s"===u[8]){var i=ho.formatPrefix(Math.max(Mo(r[0]),Mo(r[1])));return u[7]||(u[7]="."+oi(i.scale(r[2]))),u[8]="f",e=ho.format(u.join("")),function(t){return e(i.scale(t))+i.symbol}}u[7]||(u[7]="."+ai(u[8],r)),e=u.join("")}else e=",."+oi(r[2])+"f";return ho.format(e)}function oi(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function ai(t,n){var e=oi(n[2]);return t in Nc?Math.abs(e-oi(Math.max(Mo(n[0]),Mo(n[1]))))+ +("e"!==t):e-2*("%"===t)}function ci(t,n,e,r){function u(t){return(e?Math.log(t<0?0:t):-Math.log(t>0?0:-t))/Math.log(n)}function i(t){return e?Math.pow(n,t):-Math.pow(n,-t)}function o(n){return t(u(n))}return o.invert=function(n){return i(t.invert(n))},o.domain=function(n){return arguments.length?(e=n[0]>=0,t.domain((r=n.map(Number)).map(u)),o):r},o.base=function(e){return arguments.length?(n=+e,t.domain(r.map(u)),o):n},o.nice=function(){var n=Ju(r.map(u),e?Math:jc);return t.domain(n),r=n.map(i),o},o.ticks=function(){var t=Gu(r),o=[],a=t[0],c=t[1],f=Math.floor(u(a)),l=Math.ceil(u(c)),s=n%1?2:n;if(isFinite(l-f)){if(e){for(;f0;h--)o.push(i(f)*h);for(f=0;o[f]c;l--);o=o.slice(f,l)}return o},o.tickFormat=function(t,e){if(!arguments.length)return Sc;arguments.length<2?e=Sc:"function"!=typeof e&&(e=ho.format(e));var r=Math.max(1,n*t/o.ticks().length);return function(t){var o=t/i(Math.round(u(t)));return o*n0?u[e-1]:t[0],e0?0:1}function Mi(t,n,e,r,u){var i=t[0]-n[0],o=t[1]-n[1],a=(u?r:-r)/Math.sqrt(i*i+o*o),c=a*o,f=-a*i,l=t[0]+c,s=t[1]+f,h=n[0]+c,d=n[1]+f,p=(l+h)/2,g=(s+d)/2,v=h-l,y=d-s,_=v*v+y*y,m=e-r,x=l*d-h*s,b=(y<0?-1:1)*Math.sqrt(Math.max(0,m*m*_-x*x)),w=(x*y-v*b)/_,M=(-x*v-y*b)/_,k=(x*y+v*b)/_,E=(-x*v+y*b)/_,N=w-p,S=M-g,j=k-p,C=E-g;return N*N+S*S>j*j+C*C&&(w=k,M=E),[[w-c,M-f],[w*e/m,M*e/m]]}function ki(t){function n(n){function o(){f.push("M",i(t(l),a))}for(var c,f=[],l=[],s=-1,h=n.length,d=Lt(e),p=Lt(r);++s1?t.join("L"):t+"Z"}function Ni(t){return t.join("L")+"Z"}function Si(t){for(var n=0,e=t.length,r=t[0],u=[r[0],",",r[1]];++n1&&u.push("H",r[0]),u.join("")}function ji(t){for(var n=0,e=t.length,r=t[0],u=[r[0],",",r[1]];++n1){a=n[1],i=t[c],c++,r+="C"+(u[0]+o[0])+","+(u[1]+o[1])+","+(i[0]-a[0])+","+(i[1]-a[1])+","+i[0]+","+i[1];for(var f=2;f9&&(u=3*n/Math.sqrt(u),o[a]=u*e,o[a+1]=u*r));for(a=-1;++a<=c;)u=(t[Math.min(c,a+1)][0]-t[Math.max(0,a-1)][0])/(6*(1+o[a]*o[a])),i.push([u||0,o[a]*u||0]);return i}function Yi(t){return t.length<3?Ei(t):t[0]+Oi(t,Wi(t))}function Hi(t){for(var n,e,r,u=-1,i=t.length;++u0;)h[--a].call(t,o);if(i>=1)return g.event&&g.event.end.call(t,t.__data__,n),--d.count?delete d[r]:delete t[e],1}var c,f,l,s,h,d=t[e]||(t[e]={active:0,count:0}),g=d[r];g||(c=u.time,f=It(i,0,c),g=d[r]={tween:new p,time:c,timer:f,delay:u.delay,duration:u.duration,ease:u.ease,index:n},u=null,++d.count)}function io(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate("+(isFinite(r)?r:e(t))+",0)"})}function oo(t,n,e){t.attr("transform",function(t){var r=n(t);return"translate(0,"+(isFinite(r)?r:e(t))+")"})}function ao(t){return t.toISOString()}function co(t,n,e){function r(n){return t(n)}function u(t,e){var r=t[1]-t[0],u=r/e,i=ho.bisect(Qc,u);return i==Qc.length?[n.year,ri(t.map(function(t){return t/31536e6}),e)[2]]:i?n[u/Qc[i-1]1?{floor:function(n){for(;e(n=t.floor(n));)n=fo(n-1);return n},ceil:function(n){for(;e(n=t.ceil(n));)n=fo(+n+1);return n}}:t))},r.ticks=function(t,n){var e=Gu(r.domain()),i=null==t?u(e,10):"number"==typeof t?u(e,t):!t.range&&[{range:t},n];return i&&(t=i[0],n=i[1]),t.range(e[0],fo(+e[1]+1),n<1?1:n)},r.tickFormat=function(){return e},r.copy=function(){return co(t.copy(),n,e)},ni(r,t)}function fo(t){return new Date(t)}function lo(t){return JSON.parse(t.responseText)}function so(t){var n=vo.createRange();return n.selectNode(vo.body),n.createContextualFragment(t.responseText)}var ho={version:"3.5.17"},po=[].slice,go=function(t){return po.call(t)},vo=this.document;if(vo)try{go(vo.documentElement.childNodes)[0].nodeType}catch(t){go=function(t){for(var n=t.length,e=new Array(n);n--;)e[n]=t[n];return e}}if(Date.now||(Date.now=function(){return+new Date}),vo)try{vo.createElement("DIV").style.setProperty("opacity",0,"")}catch(t){var yo=this.Element.prototype,_o=yo.setAttribute,mo=yo.setAttributeNS,xo=this.CSSStyleDeclaration.prototype,bo=xo.setProperty;yo.setAttribute=function(t,n){_o.call(this,t,n+"")},yo.setAttributeNS=function(t,n,e){mo.call(this,t,n,e+"")},xo.setProperty=function(t,n,e){bo.call(this,t,n+"",e)}}ho.ascending=a,ho.descending=function(t,n){return nt?1:n>=t?0:NaN},ho.min=function(t,n){var e,r,u=-1,i=t.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ur&&(e=r)}else{for(;++u=r){e=r;break}for(;++ur&&(e=r)}return e},ho.max=function(t,n){var e,r,u=-1,i=t.length;if(1===arguments.length){for(;++u=r){e=r;break}for(;++ue&&(e=r)}else{for(;++u=r){e=r;break}for(;++ue&&(e=r)}return e},ho.extent=function(t,n){var e,r,u,i=-1,o=t.length;if(1===arguments.length){for(;++i=r){e=u=r;break}for(;++ir&&(e=r),u=r){e=u=r;break}for(;++ir&&(e=r),u1)return o/(l-1)},ho.deviation=function(){var t=ho.variance.apply(this,arguments);return t?Math.sqrt(t):t};var wo=l(a);ho.bisectLeft=wo.left,ho.bisect=ho.bisectRight=wo.right,ho.bisector=function(t){return l(1===t.length?function(n,e){return a(t(n),e)}:t)},ho.shuffle=function(t,n,e){(i=arguments.length)<3&&(e=t.length,i<2&&(n=0));for(var r,u,i=e-n;i;)u=Math.random()*i--|0,r=t[i+n],t[i+n]=t[u+n],t[u+n]=r;return t},ho.permute=function(t,n){for(var e=n.length,r=new Array(e);e--;)r[e]=t[n[e]];return r},ho.pairs=function(t){for(var n=0,e=t.length-1,r=t[0],u=new Array(e<0?0:e);n=0;)for(r=t[u],n=r.length;--n>=0;)e[--o]=r[n];return e};var Mo=Math.abs;ho.range=function(t,n,e){if(arguments.length<3&&(e=1,arguments.length<2&&(n=t,t=0)),(n-t)/e==1/0)throw new Error("infinite range");var r,u=[],i=h(Mo(e)),o=-1;if(t*=i,n*=i,e*=i,e<0)for(;(r=t+e*++o)>n;)u.push(r/i);else for(;(r=t+e*++o)=i.length)return r?r.call(u,o):e?o.sort(e):o;for(var c,f,l,s,h=-1,d=o.length,g=i[a++],v=new p;++h=i.length)return t;var r=[],u=o[e++];return t.forEach(function(t,u){r.push({key:t,values:n(u,e)})}),u?r.sort(function(t,n){return u(t.key,n.key)}):r}var e,r,u={},i=[],o=[];return u.map=function(n,e){return t(e,n,0)},u.entries=function(e){return n(t(ho.map,e,0),0)},u.key=function(t){return i.push(t),u},u.sortKeys=function(t){return o[i.length-1]=t,u},u.sortValues=function(t){return e=t,u},u.rollup=function(t){return r=t,u},u},ho.set=function(t){var n=new w;if(t)for(var e=0,r=t.length;e=0&&(r=t.slice(e+1),t=t.slice(0,e)),t)return arguments.length<2?this[t].on(r):this[t].on(r,n);if(2===arguments.length){if(null==n)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}},ho.event=null,ho.requote=function(t){return t.replace(So,"\\$&")};var So=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,jo={}.__proto__?function(t,n){t.__proto__=n}:function(t,n){for(var e in n)t[e]=n[e]},Co=function(t,n){return n.querySelector(t)},Ao=function(t,n){return n.querySelectorAll(t)},Lo=function(t,n){var e=t.matches||t[E(t,"matchesSelector")];return(Lo=function(t,n){return e.call(t,n)})(t,n)};"function"==typeof Sizzle&&(Co=function(t,n){return Sizzle(t,n)[0]||null},Ao=Sizzle,Lo=Sizzle.matchesSelector),ho.selection=function(){return ho.select(vo.documentElement)};var To=ho.selection.prototype=[];To.select=function(t){var n,e,r,u,i=[];t=O(t);for(var o=-1,a=this.length;++o=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),Ro.hasOwnProperty(e)?{space:Ro[e],local:t}:t}},To.attr=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node();return t=ho.ns.qualify(t),t.local?e.getAttributeNS(t.space,t.local):e.getAttribute(t)}for(n in t)this.each(P(n,t[n]));return this}return this.each(P(t,n))},To.classed=function(t,n){if(arguments.length<2){if("string"==typeof t){var e=this.node(),r=(t=D(t)).length,u=-1;if(n=e.classList){for(;++u=0;)(e=r[u])&&(i&&i!==e.nextSibling&&i.parentNode.insertBefore(e,i),i=e);return this},To.sort=function(t){t=$.apply(this,arguments);for(var n=-1,e=this.length;++n0&&(n=n.transition().duration(S)),n.call(t.event)}function a(){b&&b.domain(x.range().map(function(t){return(t-k.x)/k.k}).map(x.invert)),M&&M.domain(w.range().map(function(t){return(t-k.y)/k.k}).map(w.invert))}function c(t){j++||t({type:"zoomstart"})}function f(t){a(),t({type:"zoom",scale:k.k,translate:[k.x,k.y]})}function l(t){--j||(t({type:"zoomend"}),v=null)}function s(){function t(){a=1,u(ho.mouse(r),h),f(i)}function e(){s.on(T,null).on(O,null),d(a),l(i)}var r=this,i=P.of(r,arguments),a=0,s=ho.select(o(r)).on(T,t).on(O,e),h=n(ho.mouse(r)),d=tt(r);Wc.call(r),c(i)}function h(){function t(){var t=ho.touches(p);return d=k.k,t.forEach(function(t){t.identifier in v&&(v[t.identifier]=n(t))}),t}function e(){var n=ho.event.target;ho.select(n).on(x,o).on(b,a),w.push(n);for(var e=ho.event.changedTouches,r=0,u=e.length;r1){var l=c[0],s=c[1],h=l[0]-s[0],d=l[1]-s[1];y=h*h+d*d}}function o(){var t,n,e,i,o=ho.touches(p);Wc.call(p);for(var a=0,c=o.length;a=f)return o;if(u)return u=!1,i;var n=l;if(34===t.charCodeAt(n)){for(var e=n;e++=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,pa=ho.map({b:function(t){return t.toString(2)},c:function(t){return String.fromCharCode(t)},o:function(t){return t.toString(8)},x:function(t){return t.toString(16)},X:function(t){return t.toString(16).toUpperCase()},g:function(t,n){return t.toPrecision(n)},e:function(t,n){return t.toExponential(n)},f:function(t,n){return t.toFixed(n)},r:function(t,n){return(t=ho.round(t,Ut(t,n))).toFixed(Math.max(0,Math.min(20,Ut(t*(1+1e-15),n))))}}),ga=ho.time={},va=Date;Yt.prototype={getDate:function(){return this._.getUTCDate()},getDay:function(){return this._.getUTCDay()},getFullYear:function(){return this._.getUTCFullYear()},getHours:function(){return this._.getUTCHours()},getMilliseconds:function(){return this._.getUTCMilliseconds()},getMinutes:function(){return this._.getUTCMinutes()},getMonth:function(){return this._.getUTCMonth()},getSeconds:function(){return this._.getUTCSeconds()},getTime:function(){return this._.getTime()},getTimezoneOffset:function(){return 0},valueOf:function(){return this._.valueOf()},setDate:function(){ya.setUTCDate.apply(this._,arguments)},setDay:function(){ya.setUTCDay.apply(this._,arguments)},setFullYear:function(){ya.setUTCFullYear.apply(this._,arguments)},setHours:function(){ya.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){ya.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){ya.setUTCMinutes.apply(this._,arguments)},setMonth:function(){ya.setUTCMonth.apply(this._,arguments)},setSeconds:function(){ya.setUTCSeconds.apply(this._,arguments)},setTime:function(){ya.setTime.apply(this._,arguments)}};var ya=Date.prototype;ga.year=Ht(function(t){return t=ga.day(t),t.setMonth(0,1),t},function(t,n){t.setFullYear(t.getFullYear()+n)},function(t){return t.getFullYear()}),ga.years=ga.year.range,ga.years.utc=ga.year.utc.range,ga.day=Ht(function(t){var n=new va(2e3,0);return n.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),n},function(t,n){t.setDate(t.getDate()+n)},function(t){return t.getDate()-1}),ga.days=ga.day.range,ga.days.utc=ga.day.utc.range,ga.dayOfYear=function(t){var n=ga.year(t);return Math.floor((t-n-6e4*(t.getTimezoneOffset()-n.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,n){n=7-n;var e=ga[t]=Ht(function(t){return(t=ga.day(t)).setDate(t.getDate()-(t.getDay()+n)%7),t},function(t,n){t.setDate(t.getDate()+7*Math.floor(n))},function(t){var e=ga.year(t).getDay();return Math.floor((ga.dayOfYear(t)+(e+n)%7)/7)-(e!==n)});ga[t+"s"]=e.range,ga[t+"s"].utc=e.utc.range,ga[t+"OfYear"]=function(t){var e=ga.year(t).getDay();return Math.floor((ga.dayOfYear(t)+(e+n)%7)/7)}}),ga.week=ga.sunday,ga.weeks=ga.sunday.range,ga.weeks.utc=ga.sunday.utc.range,ga.weekOfYear=ga.sundayOfYear;var _a={"-":"",_:" ",0:"0"},ma=/^\s*\d+/,xa=/^%/;ho.locale=function(t){return{numberFormat:Bt(t),timeFormat:$t(t)}};var ba=ho.locale({decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",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"]});ho.format=ba.numberFormat,ho.geo={},gn.prototype={s:0,t:0,add:function(t){vn(t,this.t,wa),vn(wa.s,this.s,this),this.s?this.t+=wa.t:this.s=wa.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var wa=new gn;ho.geo.stream=function(t,n){t&&Ma.hasOwnProperty(t.type)?Ma[t.type](t,n):yn(t,n)};var Ma={Feature:function(t,n){yn(t.geometry,n)},FeatureCollection:function(t,n){for(var e=t.features,r=-1,u=e.length;++rd&&(d=n)}function n(n,e){var r=bn([n*Vo,e*Vo]);if(y){var u=Mn(y,r),i=[u[1],-u[0],0],o=Mn(i,u);Nn(o),o=Sn(o);var c=n-p,f=c>0?1:-1,g=o[0]*$o*f,v=Mo(c)>180;if(v^(f*pd&&(d=_)}else if(g=(g+360)%360-180,v^(f*pd&&(d=e);v?na(l,h)&&(h=n):a(n,h)>a(l,h)&&(l=n):h>=l?(nh&&(h=n)):n>p?a(l,n)>a(l,h)&&(h=n):a(n,h)>a(l,h)&&(l=n)}else t(n,e);y=r,p=n}function e(){b.point=n}function r(){x[0]=l,x[1]=h,b.point=t,y=null}function u(t,e){if(y){var r=t-p;_+=Mo(r)>180?r+(r>0?360:-360):r}else g=t,v=e;Sa.point(t,e),n(t,e)}function i(){Sa.lineStart()}function o(){u(g,v),Sa.lineEnd(),Mo(_)>Uo&&(l=-(h=180)),x[0]=l,x[1]=h,y=null}function a(t,n){return(n-=t)<0?n+360:n}function c(t,n){return t[0]-n[0]}function f(t,n){return n[0]<=n[1]?n[0]<=t&&t<=n[1]:tUo?d=90:_<-Uo&&(s=-90),x[0]=l,x[1]=h}};return function(t){d=h=-(l=s=1/0),m=[],ho.geo.stream(t,b);var n=m.length;if(n){m.sort(c);for(var e,r=1,u=m[0],i=[u];ra(u[0],u[1])&&(u[1]=e[1]),a(e[0],u[1])>a(u[0],u[1])&&(u[0]=e[0])):i.push(u=e);for(var o,e,p=-1/0,n=i.length-1,r=0,u=i[n];r<=n;u=e,++r)e=i[r],(o=a(u[1],e[0]))>p&&(p=o,l=e[0],h=u[1])}return m=x=null,l===1/0||s===1/0?[[NaN,NaN],[NaN,NaN]]:[[l,s],[h,d]]}}(),ho.geo.centroid=function(t){ja=Ca=Aa=La=Ta=Oa=Ra=Pa=Ia=za=Da=0,ho.geo.stream(t,qa);var n=Ia,e=za,r=Da,u=n*n+e*e+r*r;return u=.12&&u<.234&&r>=-.425&&r<-.214?o:u>=.166&&u<.234&&r>=-.214&&r<-.115?a:i).invert(t)},t.stream=function(t){var n=i.stream(t),e=o.stream(t),r=a.stream(t);return{point:function(t,u){n.point(t,u),e.point(t,u),r.point(t,u)},sphere:function(){n.sphere(),e.sphere(),r.sphere()},lineStart:function(){n.lineStart(),e.lineStart(),r.lineStart()},lineEnd:function(){n.lineEnd(),e.lineEnd(),r.lineEnd()},polygonStart:function(){n.polygonStart(),e.polygonStart(),r.polygonStart()},polygonEnd:function(){n.polygonEnd(),e.polygonEnd(),r.polygonEnd()}}},t.precision=function(n){return arguments.length?(i.precision(n),o.precision(n),a.precision(n),t):i.precision()},t.scale=function(n){return arguments.length?(i.scale(n),o.scale(.35*n),a.scale(n),t.translate(i.translate())):i.scale()},t.translate=function(n){if(!arguments.length)return i.translate();var f=i.scale(),l=+n[0],s=+n[1];return e=i.translate(n).clipExtent([[l-.455*f,s-.238*f],[l+.455*f,s+.238*f]]).stream(c).point,r=o.translate([l-.307*f,s+.201*f]).clipExtent([[l-.425*f+Uo,s+.12*f+Uo],[l-.214*f-Uo,s+.234*f-Uo]]).stream(c).point,u=a.translate([l-.205*f,s+.212*f]).clipExtent([[l-.214*f+Uo,s+.166*f+Uo],[l-.115*f-Uo,s+.234*f-Uo]]).stream(c).point,t},t.scale(1070)};var Ba,Wa,Ya,Ha,Va,$a,Ga={point:N,lineStart:N,lineEnd:N,polygonStart:function(){Wa=0,Ga.lineStart=Kn},polygonEnd:function(){Ga.lineStart=Ga.lineEnd=Ga.point=N,Ba+=Mo(Wa/2)}},Za={point:Qn,lineStart:N,lineEnd:N,polygonStart:N,polygonEnd:N},Xa={point:ee,lineStart:re,lineEnd:ue,polygonStart:function(){Xa.lineStart=ie},polygonEnd:function(){Xa.point=ee,Xa.lineStart=re,Xa.lineEnd=ue}};ho.geo.path=function(){function t(t){return t&&("function"==typeof a&&i.pointRadius(+a.apply(this,arguments)),o&&o.valid||(o=u(i)),ho.geo.stream(t,o)),i.result()}function n(){return o=null,t}var e,r,u,i,o,a=4.5;return t.area=function(t){return Ba=0,ho.geo.stream(t,u(Ga)),Ba},t.centroid=function(t){return Aa=La=Ta=Oa=Ra=Pa=Ia=za=Da=0,ho.geo.stream(t,u(Xa)),Da?[Ia/Da,za/Da]:Pa?[Oa/Pa,Ra/Pa]:Ta?[Aa/Ta,La/Ta]:[NaN,NaN]},t.bounds=function(t){return Va=$a=-(Ya=Ha=1/0),ho.geo.stream(t,u(Za)),[[Ya,Ha],[Va,$a]]},t.projection=function(t){return arguments.length?(u=(e=t)?t.stream||ce(t):M,n()):e},t.context=function(t){return arguments.length?(i=null==(r=t)?new te:new oe(t),"function"!=typeof a&&i.pointRadius(a),n()):r},t.pointRadius=function(n){return arguments.length?(a="function"==typeof n?n:(i.pointRadius(+n),+n),t):a},t.projection(ho.geo.albersUsa()).context(null)},ho.geo.transform=function(t){return{stream:function(n){var e=new fe(n);for(var r in t)e[r]=t[r];return e}}},fe.prototype={point:function(t,n){this.stream.point(t,n)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},ho.geo.projection=se,ho.geo.projectionMutator=he,(ho.geo.equirectangular=function(){return se(pe)}).raw=pe.invert=pe,ho.geo.rotation=function(t){function n(n){return n=t(n[0]*Vo,n[1]*Vo),n[0]*=$o,n[1]*=$o,n}return t=ve(t[0]%360*Vo,t[1]*Vo,t.length>2?t[2]*Vo:0),n.invert=function(n){return n=t.invert(n[0]*Vo,n[1]*Vo),n[0]*=$o,n[1]*=$o,n},n},ge.invert=pe,ho.geo.circle=function(){function t(){var t="function"==typeof r?r.apply(this,arguments):r,n=ve(-t[0]*Vo,-t[1]*Vo,0).invert,u=[];return e(null,null,1,{point:function(t,e){u.push(t=n(t,e)),t[0]*=$o,t[1]*=$o}}),{type:"Polygon",coordinates:[u]}}var n,e,r=[0,0],u=6;return t.origin=function(n){return arguments.length?(r=n,t):r},t.angle=function(r){return arguments.length?(e=xe((n=+r)*Vo,u*Vo),t):n},t.precision=function(r){return arguments.length?(e=xe(n*Vo,(u=+r)*Vo),t):u},t.angle(90)},ho.geo.distance=function(t,n){var e,r=(n[0]-t[0])*Vo,u=t[1]*Vo,i=n[1]*Vo,o=Math.sin(r),a=Math.cos(r),c=Math.sin(u),f=Math.cos(u),l=Math.sin(i),s=Math.cos(i);return Math.atan2(Math.sqrt((e=s*o)*e+(e=f*l-c*s*a)*e),c*l+f*s*a)},ho.geo.graticule=function(){function t(){return{type:"MultiLineString",coordinates:n()}}function n(){return ho.range(Math.ceil(i/v)*v,u,v).map(h).concat(ho.range(Math.ceil(f/y)*y,c,y).map(d)).concat(ho.range(Math.ceil(r/p)*p,e,p).filter(function(t){return Mo(t%v)>Uo}).map(l)).concat(ho.range(Math.ceil(a/g)*g,o,g).filter(function(t){return Mo(t%y)>Uo}).map(s))}var e,r,u,i,o,a,c,f,l,s,h,d,p=10,g=p,v=90,y=360,_=2.5;return t.lines=function(){return n().map(function(t){return{type:"LineString",coordinates:t}})},t.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(c).slice(1),h(u).reverse().slice(1),d(f).reverse().slice(1))]}},t.extent=function(n){return arguments.length?t.majorExtent(n).minorExtent(n):t.minorExtent()},t.majorExtent=function(n){return arguments.length?(i=+n[0][0],u=+n[1][0],f=+n[0][1],c=+n[1][1],i>u&&(n=i,i=u,u=n),f>c&&(n=f,f=c,c=n),t.precision(_)):[[i,f],[u,c]]},t.minorExtent=function(n){return arguments.length?(r=+n[0][0],e=+n[1][0],a=+n[0][1],o=+n[1][1],r>e&&(n=r,r=e,e=n),a>o&&(n=a,a=o,o=n),t.precision(_)):[[r,a],[e,o]]},t.step=function(n){return arguments.length?t.majorStep(n).minorStep(n):t.minorStep()},t.majorStep=function(n){return arguments.length?(v=+n[0],y=+n[1],t):[v,y]},t.minorStep=function(n){return arguments.length?(p=+n[0],g=+n[1],t):[p,g]},t.precision=function(n){return arguments.length?(_=+n,l=we(a,o,90),s=Me(r,e,_),h=we(f,c,90),d=Me(i,u,_),t):_},t.majorExtent([[-180,-90+Uo],[180,90-Uo]]).minorExtent([[-180,-80-Uo],[180,80+Uo]])},ho.geo.greatArc=function(){function t(){return{type:"LineString",coordinates:[n||r.apply(this,arguments),e||u.apply(this,arguments)]}}var n,e,r=ke,u=Ee;return t.distance=function(){return ho.geo.distance(n||r.apply(this,arguments),e||u.apply(this,arguments))},t.source=function(e){return arguments.length?(r=e,n="function"==typeof e?null:e,t):r},t.target=function(n){return arguments.length?(u=n,e="function"==typeof n?null:n,t):u},t.precision=function(){return arguments.length?t:0},t},ho.geo.interpolate=function(t,n){return Ne(t[0]*Vo,t[1]*Vo,n[0]*Vo,n[1]*Vo)},ho.geo.length=function(t){return Ja=0,ho.geo.stream(t,Ka),Ja};var Ja,Ka={sphere:N,point:N,lineStart:Se,lineEnd:N,polygonStart:N,polygonEnd:N},Qa=je(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(ho.geo.azimuthalEqualArea=function(){return se(Qa)}).raw=Qa;var tc=je(function(t){var n=Math.acos(t);return n&&n/Math.sin(n)},M);(ho.geo.azimuthalEquidistant=function(){return se(tc)}).raw=tc,(ho.geo.conicConformal=function(){return Xn(Ce)}).raw=Ce,(ho.geo.conicEquidistant=function(){return Xn(Ae)}).raw=Ae;var nc=je(function(t){return 1/t},Math.atan);(ho.geo.gnomonic=function(){return se(nc)}).raw=nc,Le.invert=function(t,n){return[t,2*Math.atan(Math.exp(n))-Ho]},(ho.geo.mercator=function(){return Te(Le)}).raw=Le;var ec=je(function(){return 1},Math.asin);(ho.geo.orthographic=function(){return se(ec)}).raw=ec;var rc=je(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(ho.geo.stereographic=function(){return se(rc)}).raw=rc,Oe.invert=function(t,n){return[-n,2*Math.atan(Math.exp(t))-Ho]},(ho.geo.transverseMercator=function(){var t=Te(Oe),n=t.center,e=t.rotate;return t.center=function(t){return t?n([-t[1],t[0]]):(t=n(),[t[1],-t[0]])},t.rotate=function(t){return t?e([t[0],t[1],t.length>2?t[2]+90:90]):(t=e(),[t[0],t[1],t[2]-90])},e([0,0,90])}).raw=Oe,ho.geom={},ho.geom.hull=function(t){function n(t){if(t.length<3)return[];var n,u=Lt(e),i=Lt(r),o=t.length,a=[],c=[];for(n=0;n=0;--n)d.push(t[a[f[n]][2]]);for(n=+s;n=r&&f.x<=i&&f.y>=u&&f.y<=o?[[r,o],[i,o],[i,u],[r,u]]:[]).point=t[a]}),n}function e(t){return t.map(function(t,n){return{x:Math.round(i(t,n)/Uo)*Uo,y:Math.round(o(t,n)/Uo)*Uo,i:n}})}var r=Re,u=Pe,i=r,o=u,a=hc;return t?n(t):(n.links=function(t){return hr(e(t)).edges.filter(function(t){return t.l&&t.r}).map(function(n){return{source:t[n.l.i],target:t[n.r.i]}})},n.triangles=function(t){var n=[];return hr(e(t)).cells.forEach(function(e,r){for(var u,i=e.site,o=e.edges.sort(Xe),a=-1,c=o.length,f=o[c-1].edge,l=f.l===i?f.r:f.l;++a=f,h=r>=l,d=h<<1|s;t.leaf=!1,t=t.nodes[d]||(t.nodes[d]=yr()),s?u=f:a=f,h?o=l:c=l,i(t,n,e,r,u,o,a,c)}var l,s,h,d,p,g,v,y,_,m=Lt(a),x=Lt(c);if(null!=n)g=n,v=e,y=r,_=u;else if(y=_=-(g=v=1/0),s=[],h=[],p=t.length,o)for(d=0;dy&&(y=l.x),l.y>_&&(_=l.y),s.push(l.x),h.push(l.y);else for(d=0;dy&&(y=b),w>_&&(_=w),s.push(b),h.push(w)}var M=y-g,k=_-v;M>k?_=v+M:y=g+k;var E=yr();if(E.add=function(t){i(E,t,+m(t,++d),+x(t,d),g,v,y,_)},E.visit=function(t){_r(t,E,g,v,y,_)},E.find=function(t){return mr(E,t[0],t[1],g,v,y,_)},d=-1,null==n){for(;++d=0?t.slice(0,n):t,r=n>=0?t.slice(n+1):"in";return e=vc.get(e)||gc,r=yc.get(r)||M,Nr(r(e.apply(null,po.call(arguments,1))))},ho.interpolateHcl=qr,ho.interpolateHsl=Ur,ho.interpolateLab=Fr,ho.interpolateRound=Br,ho.transform=function(t){var n=vo.createElementNS(ho.ns.prefix.svg,"g");return(ho.transform=function(t){if(null!=t){n.setAttribute("transform",t);var e=n.transform.baseVal.consolidate()}return new Wr(e?e.matrix:_c)})(t)},Wr.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var _c={a:1,b:0,c:0,d:1,e:0,f:0};ho.interpolateTransform=Kr,ho.layout={},ho.layout.bundle=function(){return function(t){for(var n=[],e=-1,r=t.length;++e0?u=t:(e.c=null,e.t=NaN,e=null,f.end({type:"end",alpha:u=0})):t>0&&(f.start({type:"start",alpha:u=t}),e=It(c.tick)),c):u},c.start=function(){function t(t,r){if(!e){for(e=new Array(u),c=0;c=0;)o.push(l=f[c]),l.parent=i,l.depth=i.depth+1;r&&(i.value=0),i.children=f}else r&&(i.value=+r.call(t,i,i.depth)||0),delete i.children;return su(u,function(t){var e,u;n&&(e=t.children)&&e.sort(n),r&&(u=t.parent)&&(u.value+=t.value)}),a}var n=pu,e=hu,r=du;return t.sort=function(e){return arguments.length?(n=e,t):n},t.children=function(n){return arguments.length?(e=n,t):e},t.value=function(n){return arguments.length?(r=n,t):r},t.revalue=function(n){return r&&(lu(n,function(t){t.children&&(t.value=0)}),su(n,function(n){var e;n.children||(n.value=+r.call(t,n,n.depth)||0),(e=n.parent)&&(e.value+=n.value)})),n},t},ho.layout.partition=function(){function t(n,e,r,u){var i=n.children;if(n.x=e,n.y=n.depth*u,n.dx=r,n.dy=u,i&&(o=i.length)){var o,a,c,f=-1;for(r=n.value?r/n.value:0;++fa&&(a=r),o.push(r)}for(e=0;e0)for(i=-1;++i=l[0]&&a<=l[1]&&(o=c[ho.bisect(s,a,1,d)-1],o.y+=p,o.push(t[i]));return c}var n=!0,e=Number,r=Nu,u=ku;return t.value=function(n){return arguments.length?(e=n,t):e},t.range=function(n){return arguments.length?(r=Lt(n),t):r},t.bins=function(n){return arguments.length?(u="number"==typeof n?function(t){return Eu(t,n)}:Lt(n),t):u},t.frequency=function(e){return arguments.length?(n=!!e,t):n},t},ho.layout.pack=function(){function t(t,i){var o=e.call(this,t,i),a=o[0],c=u[0],f=u[1],l=null==n?Math.sqrt:"function"==typeof n?n:function(){return n};if(a.x=a.y=0,su(a,function(t){t.r=+l(t.value)}),su(a,Lu),r){var s=r*(n?1:Math.max(2*a.r/c,2*a.r/f))/2;su(a,function(t){t.r+=s}),su(a,Lu),su(a,function(t){t.r-=s})}return Ru(a,c/2,f/2,n?1:1/Math.max(2*a.r/c,2*a.r/f)),o}var n,e=ho.layout.hierarchy().sort(Su),r=0,u=[1,1];return t.size=function(n){return arguments.length?(u=n,t):u},t.radius=function(e){return arguments.length?(n=null==e||"function"==typeof e?e:+e,t):n},t.padding=function(n){return arguments.length?(r=+n,t):r},fu(t,e)},ho.layout.tree=function(){function t(t,u){var l=o.call(this,t,u),s=l[0],h=n(s);if(su(h,e),h.parent.m=-h.z,lu(h,r),f)lu(s,i);else{var d=s,p=s,g=s;lu(s,function(t){t.xp.x&&(p=t),t.depth>g.depth&&(g=t)});var v=a(d,p)/2-d.x,y=c[0]/(p.x+a(p,d)/2+v),_=c[1]/(g.depth||1);lu(s,function(t){t.x=(t.x+v)*y,t.y=t.depth*_})}return l}function n(t){for(var n,e={A:null,children:[t]},r=[e];null!=(n=r.pop());)for(var u,i=n.children,o=0,a=i.length;o0&&(qu(Fu(o,t,e),t,r),f+=r,l+=r),s+=o.m,f+=u.m,h+=c.m,l+=i.m;o&&!Du(i)&&(i.t=o,i.m+=s-l),u&&!zu(c)&&(c.t=u,c.m+=f-h,e=t)}return e}function i(t){t.x*=c[0],t.y=t.depth*c[1]}var o=ho.layout.hierarchy().sort(null).value(null),a=Iu,c=[1,1],f=null;return t.separation=function(n){return arguments.length?(a=n,t):a},t.size=function(n){return arguments.length?(f=null==(c=n)?i:null,t):f?null:c},t.nodeSize=function(n){return arguments.length?(f=null==(c=n)?null:i,t):f?c:null},fu(t,o)},ho.layout.cluster=function(){function t(t,i){var o,a=n.call(this,t,i),c=a[0],f=0;su(c,function(t){var n=t.children;n&&n.length?(t.x=Wu(n),t.y=Bu(n)):(t.x=o?f+=e(t,o):0,t.y=0,o=t)});var l=Yu(c),s=Hu(c),h=l.x-e(l,s)/2,d=s.x+e(s,l)/2;return su(c,u?function(t){t.x=(t.x-c.x)*r[0],t.y=(c.y-t.y)*r[1]}:function(t){t.x=(t.x-h)/(d-h)*r[0],t.y=(1-(c.y?t.y/c.y:1))*r[1]}),a}var n=ho.layout.hierarchy().sort(null).value(null),e=Iu,r=[1,1],u=!1;return t.separation=function(n){return arguments.length?(e=n,t):e},t.size=function(n){return arguments.length?(u=null==(r=n),t):u?null:r},t.nodeSize=function(n){return arguments.length?(u=null!=(r=n),t):u?r:null},fu(t,n)},ho.layout.treemap=function(){function t(t,n){for(var e,r,u=-1,i=t.length;++u0;)l.push(o=h[c-1]),l.area+=o.area,"squarify"!==d||(a=r(l,g))<=p?(h.pop(),p=a):(l.area-=l.pop().area,u(l,g,f,!1),g=Math.min(f.dx,f.dy),l.length=l.area=0,p=1/0);l.length&&(u(l,g,f,!0),l.length=l.area=0),i.forEach(n)}}function e(n){var r=n.children;if(r&&r.length){var i,o=s(n),a=r.slice(),c=[];for(t(a,o.dx*o.dy/n.value),c.area=0;i=a.pop();)c.push(i),c.area+=i.area,null!=i.z&&(u(c,i.z?o.dx:o.dy,o,!a.length),c.length=c.area=0);r.forEach(e)}}function r(t,n){for(var e,r=t.area,u=0,i=1/0,o=-1,a=t.length;++ou&&(u=e));return r*=r,n*=n,r?Math.max(n*u*p/r,r/(n*i*p)):1/0}function u(t,n,e,r){var u,i=-1,o=t.length,a=e.x,f=e.y,l=n?c(t.area/n):0;if(n==e.dx){for((r||l>e.dy)&&(l=e.dy);++ie.dx)&&(l=e.dx);++i1);return t+n*e*Math.sqrt(-2*Math.log(u)/u)}},logNormal:function(){var t=ho.random.normal.apply(ho,arguments);return function(){return Math.exp(t())}},bates:function(t){var n=ho.random.irwinHall(t);return function(){return n()/t}},irwinHall:function(t){return function(){for(var n=0,e=0;es?0:1;if(f=Yo)return n(f,d)+(t?n(t,1-d):"")+"Z";var p,g,v,y,_,m,x,b,w,M,k,E,N=0,S=0,j=[];if((y=(+c.apply(this,arguments)||0)/2)&&(v=i===Oc?Math.sqrt(t*t+f*f):+i.apply(this,arguments),d||(S*=-1),f&&(S=ot(v/f*Math.sin(y))),t&&(N=ot(v/t*Math.sin(y)))),f){_=f*Math.cos(l+S),m=f*Math.sin(l+S),x=f*Math.cos(s-S),b=f*Math.sin(s-S);var C=Math.abs(s-l-2*S)<=Bo?0:1;if(S&&wi(_,m,x,b)===d^C){var A=(l+s)/2;_=f*Math.cos(A),m=f*Math.sin(A),x=b=null}}else _=m=0;if(t){w=t*Math.cos(s-N),M=t*Math.sin(s-N),k=t*Math.cos(l+N),E=t*Math.sin(l+N);var L=Math.abs(l-s+2*N)<=Bo?0:1;if(N&&wi(w,M,k,E)===1-d^L){var T=(l+s)/2;w=t*Math.cos(T),M=t*Math.sin(T),k=E=null}}else w=M=0;if(h>Uo&&(p=Math.min(Math.abs(f-t)/2,+u.apply(this,arguments)))>.001){g=tBo)+",1 "+n}function u(t,n,e,r){return"Q 0,0 "+r}var i=ke,o=Ee,a=$i,c=mi,f=xi;return t.radius=function(n){return arguments.length?(a=Lt(n),t):a},t.source=function(n){return arguments.length?(i=Lt(n),t):i},t.target=function(n){return arguments.length?(o=Lt(n),t):o},t.startAngle=function(n){return arguments.length?(c=Lt(n),t):c},t.endAngle=function(n){return arguments.length?(f=Lt(n),t):f},t},ho.svg.diagonal=function(){function t(t,u){var i=n.call(this,t,u),o=e.call(this,t,u),a=(i.y+o.y)/2,c=[i,{x:i.x,y:a},{x:o.x,y:a},o];return c=c.map(r),"M"+c[0]+"C"+c[1]+" "+c[2]+" "+c[3]}var n=ke,e=Ee,r=Gi;return t.source=function(e){return arguments.length?(n=Lt(e),t):n},t.target=function(n){return arguments.length?(e=Lt(n),t):e},t.projection=function(n){return arguments.length?(r=n,t):r},t},ho.svg.diagonal.radial=function(){var t=ho.svg.diagonal(),n=Gi,e=t.projection;return t.projection=function(t){return arguments.length?e(Zi(n=t)):n},t},ho.svg.symbol=function(){function t(t,r){return(Dc.get(n.call(this,t,r))||Ki)(e.call(this,t,r))}var n=Ji,e=Xi;return t.type=function(e){return arguments.length?(n=Lt(e),t):n},t.size=function(n){return arguments.length?(e=Lt(n),t):e},t};var Dc=ho.map({circle:Ki,cross:function(t){var n=Math.sqrt(t/5)/2;return"M"+-3*n+","+-n+"H"+-n+"V"+-3*n+"H"+n+"V"+-n+"H"+3*n+"V"+n+"H"+n+"V"+3*n+"H"+-n+"V"+n+"H"+-3*n+"Z"},diamond:function(t){var n=Math.sqrt(t/(2*Uc)),e=n*Uc;return"M0,"+-n+"L"+e+",0 0,"+n+" "+-e+",0Z"},square:function(t){var n=Math.sqrt(t)/2;return"M"+-n+","+-n+"L"+n+","+-n+" "+n+","+n+" "+-n+","+n+"Z"},"triangle-down":function(t){var n=Math.sqrt(t/qc),e=n*qc/2;return"M0,"+e+"L"+n+","+-e+" "+-n+","+-e+"Z"},"triangle-up":function(t){var n=Math.sqrt(t/qc),e=n*qc/2;return"M0,"+-e+"L"+n+","+e+" "+-n+","+e+"Z"}});ho.svg.symbolTypes=Dc.keys();var qc=Math.sqrt(3),Uc=Math.tan(30*Vo);To.transition=function(t){for(var n,e,r=Fc||++Hc,u=ro(t),i=[],o=Bc||{time:Date.now(),ease:Lr,delay:0,duration:250},a=-1,c=this.length;++arect,.s>rect").attr("width",s[1]-s[0])}function r(t){t.select(".extent").attr("y",h[0]),t.selectAll(".extent,.e>rect,.w>rect").attr("height",h[1]-h[0])}function u(){function u(){32==ho.event.keyCode&&(j||(m=null,L[0]-=s[1],L[1]-=h[1],j=2),C())}function g(){32==ho.event.keyCode&&2==j&&(L[0]+=s[1],L[1]+=h[1],j=0,C())}function v(){var t=ho.mouse(b),u=!1;x&&(t[0]+=x[0],t[1]+=x[1]),j||(ho.event.altKey?(m||(m=[(s[0]+s[1])/2,(h[0]+h[1])/2]),L[0]=s[+(t[0]i){var o=u;u=i,i=o}return u+h+i+h+(f.isUndefined(r)?l:r)}function a(t,n,e,r){var u=""+n,i=""+e;if(!t&&u>i){var o=u;u=i,i=o}var a={v:u,w:i};return r&&(a.name=r),a}function c(t,n){return o(t,n.v,n.w,n.name)}var f=e(0);t.exports=r;var l="\0",s="\0",h="";r.prototype._nodeCount=0,r.prototype._edgeCount=0,r.prototype.isDirected=function(){return this._isDirected},r.prototype.isMultigraph=function(){return this._isMultigraph},r.prototype.isCompound=function(){return this._isCompound},r.prototype.setGraph=function(t){return this._label=t,this},r.prototype.graph=function(){return this._label},r.prototype.setDefaultNodeLabel=function(t){return f.isFunction(t)||(t=f.constant(t)),this._defaultNodeLabelFn=t,this},r.prototype.nodeCount=function(){return this._nodeCount},r.prototype.nodes=function(){return f.keys(this._nodes)},r.prototype.sources=function(){return f.filter(this.nodes(),f.bind(function(t){return f.isEmpty(this._in[t])},this))},r.prototype.sinks=function(){return f.filter(this.nodes(),f.bind(function(t){return f.isEmpty(this._out[t])},this))},r.prototype.setNodes=function(t,n){var e=arguments;return f.each(t,f.bind(function(t){e.length>1?this.setNode(t,n):this.setNode(t)},this)),this},r.prototype.setNode=function(t,n){return f.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=s,this._children[t]={},this._children[s][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},r.prototype.node=function(t){return this._nodes[t]},r.prototype.hasNode=function(t){return f.has(this._nodes,t)},r.prototype.removeNode=function(t){var n=this;if(f.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],f.each(this.children(t),f.bind(function(t){this.setParent(t)},this)),delete this._children[t]),f.each(f.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],f.each(f.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},r.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(f.isUndefined(n))n=s;else{n+="";for(var e=n;!f.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},r.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},r.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==s)return n}},r.prototype.children=function(t){if(f.isUndefined(t)&&(t=s),this._isCompound){var n=this._children[t];if(n)return f.keys(n)}else{if(t===s)return this.nodes();if(this.hasNode(t))return[]}},r.prototype.predecessors=function(t){var n=this._preds[t];if(n)return f.keys(n)},r.prototype.successors=function(t){var n=this._sucs[t];if(n)return f.keys(n)},r.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return f.union(n,this.successors(t))},r.prototype.filterNodes=function(t){function n(t){var i=r.parent(t);return void 0===i||e.hasNode(i)?(u[t]=i,i):i in u?u[i]:n(i)}var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph()),f.each(this._nodes,f.bind(function(n,r){t(r)&&e.setNode(r,n)},this)),f.each(this._edgeObjs,f.bind(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,this.edge(t))},this));var r=this,u={};return this._isCompound&&f.each(e.nodes(),function(t){e.setParent(t,n(t))}),e},r.prototype.setDefaultEdgeLabel=function(t){return f.isFunction(t)||(t=f.constant(t)),this._defaultEdgeLabelFn=t,this},r.prototype.edgeCount=function(){return this._edgeCount},r.prototype.edges=function(){return f.values(this._edgeObjs)},r.prototype.setPath=function(t,n){var e=this,r=arguments;return f.reduce(t,function(t,u){return r.length>1?e.setEdge(t,u,n):e.setEdge(t,u),u}),this},r.prototype.setEdge=function(){var t,n,e,r,i=!1,c=arguments[0];"object"==typeof c&&null!==c&&"v"in c?(t=c.v,n=c.w,e=c.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=c,n=arguments[1],e=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,n=""+n,f.isUndefined(e)||(e=""+e);var l=o(this._isDirected,t,n,e);if(f.has(this._edgeLabels,l))return i&&(this._edgeLabels[l]=r),this;if(!f.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[l]=i?r:this._defaultEdgeLabelFn(t,n,e);var s=a(this._isDirected,t,n,e);return t=s.v,n=s.w,Object.freeze(s),this._edgeObjs[l]=s,u(this._preds[n],t),u(this._sucs[t],n),this._in[n][l]=s,this._out[t][l]=s,this._edgeCount++,this},r.prototype.edge=function(t,n,e){var r=1===arguments.length?c(this._isDirected,arguments[0]):o(this._isDirected,t,n,e);return this._edgeLabels[r]},r.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?c(this._isDirected,arguments[0]):o(this._isDirected,t,n,e);return f.has(this._edgeLabels,r)},r.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?c(this._isDirected,arguments[0]):o(this._isDirected,t,n,e),u=this._edgeObjs[r];return u&&(t=u.v,n=u.w,delete this._edgeLabels[r],delete this._edgeObjs[r],i(this._preds[n],t),i(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},r.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=f.values(e);return n?f.filter(r,function(t){return t.v===n}):r}},r.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=f.values(e);return n?f.filter(r,function(t){return t.w===n}):r}},r.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);if(e)return e.concat(this.outEdges(t,n))}},function(t,n,e){"use strict";function r(t,n,e,r){var u=t.x,i=t.y,o=u-r.x,a=i-r.y,c=Math.sqrt(n*n*a*a+e*e*o*o),f=Math.abs(n*e*o/c);r.x0&&(u=c.removeMin(),i=a[u],i.distance!==Number.POSITIVE_INFINITY);)r(u).forEach(f);return a}var i=e(0),o=e(9);t.exports=r;var a=i.constant(1)},function(t,n,e){function r(){this._arr=[],this._keyIndices={}}var u=e(0);t.exports=r,r.prototype.size=function(){return this._arr.length},r.prototype.keys=function(){return this._arr.map(function(t){return t.key})},r.prototype.has=function(t){return u.has(this._keyIndices,t)},r.prototype.priority=function(t){var n=this._keyIndices[t];if(void 0!==n)return this._arr[n].priority},r.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},r.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!u.has(e,t)){var r=this._arr,i=r.length;return e[t]=i,r.push({key:t,priority:n}),this._decrease(i),!0}return!1},r.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},r.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},r.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,u=t;e>1,!(e[n].priorityMath.abs(u)*a?(i<0&&(a=-a),c=a*u/i,f=a):(u<0&&(o=-o),c=o,f=o*i/u),{x:e+c,y:r+f}}function f(t){var n=_.default.map(_.default.range(d(t)+1),function(){return[]});return _.default.each(t.nodes(),function(e){var r=t.node(e),u=r.rank;_.default.isUndefined(u)||(n[u][r.order]=e)}),n}function l(t){var n=_.default.min(_.default.map(t.nodes(),function(n){return t.node(n).rank}));_.default.each(t.nodes(),function(e){var r=t.node(e);_.default.has(r,"rank")&&(r.rank-=n)})}function s(t){var n=_.default.min(_.default.map(t.nodes(),function(n){return t.node(n).rank})),e=[];_.default.each(t.nodes(),function(r){var u=t.node(r).rank-n;e[u]||(e[u]=[]),e[u].push(r)});var r=0,u=t.graph().nodeRankFactor;_.default.each(e,function(n,e){_.default.isUndefined(n)&&e%u!=0?--r:r&&_.default.each(n,function(n){t.node(n).rank+=r})})}function h(t,n,e,u){var i={width:0,height:0};return arguments.length>=4&&(i.rank=e,i.order=u),r(t,"border",i,n)}function d(t){return _.default.max(_.default.map(t.nodes(),function(n){var e=t.node(n).rank;if(!_.default.isUndefined(e))return e}))}function p(t,n){var e={lhs:[],rhs:[]};return _.default.each(t,function(t){n(t)?e.lhs.push(t):e.rhs.push(t)}),e}function g(t,n){var e=_.default.now();try{return n()}finally{console.log(t+" time: "+(_.default.now()-e)+"ms")}}function v(t,n){return n()}Object.defineProperty(n,"__esModule",{value:!0}),n.addDummyNode=r,n.simplify=u,n.asNonCompoundGraph=i,n.successorWeights=o,n.predecessorWeights=a,n.intersectRect=c,n.buildLayerMatrix=f,n.normalizeRanks=l,n.removeEmptyRanks=s,n.addBorderNode=h,n.maxRank=d,n.partition=p,n.time=g,n.notime=v;var y=e(0),_=function(t){return t&&t.__esModule?t:{default:t}}(y),m=e(2);n.default={addDummyNode:r,simplify:u,asNonCompoundGraph:i,successorWeights:o,predecessorWeights:a,intersectRect:c,buildLayerMatrix:f,normalizeRanks:l,removeEmptyRanks:s,addBorderNode:h,maxRank:d,partition:p,time:g,notime:v}},function(t,n){t.exports=e(4)},function(t,n,e){"use strict";function r(t){function n(r){var u=t.node(r);if(o.default.has(e,r))return u.rank;e[r]=!0;var i=o.default.min(o.default.map(t.outEdges(r),function(e){return n(e.w)-t.edge(e).minlen}))||0;return u.rank=i}var e={};o.default.each(t.sources(),n)}function u(t,n){return t.node(n.w).rank-t.node(n.v).rank-t.edge(n).minlen}Object.defineProperty(n,"__esModule",{value:!0}),n.longestPath=r,n.slack=u;var i=e(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i);n.default={longestPath:r,slack:u}},function(t,n,e){"use strict";function r(t){var n=new f.Graph({directed:!1}),e=t.nodes()[0],r=t.nodeCount();n.setNode(e,{});for(var a=void 0,c=void 0;u(n,t)0;--c)if(a=n[c].dequeue()){r=r.concat(o(t,n,e,a,!0));break}}return r}function o(t,n,e,r,u){var i=u?[]:void 0;return l.default.each(t.inEdges(r.v),function(r){var o=t.edge(r),a=t.node(r.v);u&&i.push({v:r.v,w:r.w}),a.out-=o,c(n,e,a)}),l.default.each(t.outEdges(r.v),function(r){var u=t.edge(r),i=r.w,o=t.node(i);o.in-=u,c(n,e,o)}),t.removeNode(r.v),i}function a(t,n){var e=new s.Graph,r=0,u=0;l.default.each(t.nodes(),function(t){e.setNode(t,{v:t,in:0,out:0})}),l.default.each(t.edges(),function(t){var i=e.edge(t.v,t.w)||0,o=n(t),a=i+o;e.setEdge(t.v,t.w,a),u=Math.max(u,e.node(t.v).out+=o),r=Math.max(r,e.node(t.w).in+=o)});var i=l.default.range(u+r+3).map(function(){return new d.default}),o=r+1;return l.default.each(e.nodes(),function(t){c(i,o,e.node(t))}),{graph:e,buckets:i,zeroIdx:o}}function c(t,n,e){e.out?e.in?t[e.out-e.in+n].enqueue(e):t[t.length-1].enqueue(e):t[0].enqueue(e)}Object.defineProperty(n,"__esModule",{value:!0});var f=e(0),l=r(f),s=e(2),h=e(9),d=r(h),p=l.default.constant(1);n.default=u},function(t,n,e){"use strict";function r(){var t={};t._next=t._prev=t,this._sentinel=t}function u(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,n){if("_next"!==t&&"_prev"!==t)return n}Object.defineProperty(n,"__esModule",{value:!0}),r.prototype.dequeue=function(){var t=this._sentinel,n=t._prev;if(n!==t)return u(n),n},r.prototype.enqueue=function(t){var n=this._sentinel;t._prev&&t._next&&u(t),t._next=n._next,n._next._prev=t,n._next=t,t._prev=n},r.prototype.toString=function(){for(var t=[],n=this._sentinel,e=n._prev;e!==n;)t.push(JSON.stringify(e,i)),e=e._prev;return"["+t.join(", ")+"]"},n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t){t.graph().dummyChains=[],c.default.each(t.edges(),function(n){i(t,n)})}function i(t,n){var e=n.v,r=t.node(e).rank,u=n.w,i=t.node(u).rank,o=n.name,a=t.edge(n),c=a.labelRank;if(i!==r+1){t.removeEdge(n);var f=void 0,s=void 0,h=void 0;for(h=0,++r;ro.lim&&(a=o,c=!0);var f=y.default.filter(n.edges(),function(n){return c===g(t,t.node(n.v),a)&&c!==g(t,t.node(n.w),a)});return y.default.minBy(f,function(t){return(0,b.slack)(n,t)})}function h(t,n,e,r){var u=e.v,o=e.w;t.removeEdge(u,o),t.setEdge(r.v,r.w,{}),c(t),i(t,n),d(t,n)}function d(t,n){var e=y.default.find(t.nodes(),function(t){return!n.node(t).parent}),r=M(t,e);r=r.slice(1),y.default.each(r,function(e){var r=t.node(e).parent,u=n.edge(e,r),i=!1;u||(u=n.edge(r,e),i=!0),n.node(e).rank=n.node(r).rank+(i?u.minlen:-u.minlen)})}function p(t,n,e){return t.hasEdge(n,e)}function g(t,n,e){return e.low<=n.lim&&n.lim<=e.lim}Object.defineProperty(n,"__esModule",{value:!0});var v=e(0),y=r(v),_=e(2),m=e(4),x=r(m),b=e(3),w=e(1),M=_.alg.preorder,k=_.alg.postorder;u.initLowLimValues=c,u.initCutValues=i,u.calcCutValue=a,u.leaveEdge=l,u.enterEdge=s,u.exchangeEdges=h,n.default=u},function(t,n,e){"use strict";function r(t){var n=i(t);a.default.each(t.graph().dummyChains,function(e){for(var r=t.node(e),i=r.edgeObj,o=u(t,n,i.v,i.w),a=o.path,c=o.lca,f=0,l=a[f],s=!0;e!==i.w;){if(r=t.node(e),s){for(;(l=a[f])!==c&&t.node(l).maxRanko||a>n[c].lim));for(f=c,c=r;(c=t.parent(c))!==f;)i.push(c);return{path:u.concat(i.reverse()),lca:f}}function i(t){function n(u){var i=r;a.default.each(t.children(u),n),e[u]={low:i,lim:r++}}var e={},r=0;return a.default.each(t.children(),n),e}Object.defineProperty(n,"__esModule",{value:!0});var o=e(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t){var n=h.default.addDummyNode(t,"root",{},"_root"),e=o(t),r=l.default.max(l.default.values(e))-1,u=2*r+1;t.graph().nestingRoot=n,l.default.each(t.edges(),function(n){t.edge(n).minlen*=u});var c=a(t)+1;l.default.each(t.children(),function(o){i(t,n,u,c,r,e,o)}),t.graph().nodeRankFactor=u}function i(t,n,e,r,u,o,a){var c=t.children(a);if(!c.length)return void(a!==n&&t.setEdge(n,a,{weight:0,minlen:e}));var f=h.default.addBorderNode(t,"_bt"),s=h.default.addBorderNode(t,"_bb"),d=t.node(a);t.setParent(f,a),d.borderTop=f,t.setParent(s,a),d.borderBottom=s,l.default.each(c,function(c){i(t,n,e,r,u,o,c);var l=t.node(c),h=l.borderTop?l.borderTop:c,d=l.borderBottom?l.borderBottom:c,p=l.borderTop?r:2*r,g=h!==d?1:u-o[a]+1;t.setEdge(f,h,{weight:p,minlen:g,nestingEdge:!0}),t.setEdge(d,s,{weight:p,minlen:g,nestingEdge:!0})}),t.parent(a)||t.setEdge(n,f,{weight:0,minlen:u+o[a]})}function o(t){function n(r,u){var i=t.children(r);i&&i.length&&l.default.each(i,function(t){n(t,u+1)}),e[r]=u}var e={};return l.default.each(t.children(),function(t){n(t,1)}),e}function a(t){return l.default.reduce(t.edges(),function(n,e){return n+t.edge(e).weight},0)}function c(t){var n=t.graph();t.removeNode(n.nestingRoot),delete n.nestingRoot,l.default.each(t.edges(),function(n){t.edge(n).nestingEdge&&t.removeEdge(n)})}Object.defineProperty(n,"__esModule",{value:!0});var f=e(0),l=r(f),s=e(1),h=r(s);n.default={run:u,cleanup:c}},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t){function n(e){var r=t.children(e),u=t.node(e);if(r.length&&a.default.each(r,n),a.default.has(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(var o=u.minRank,c=u.maxRank+1;o=2),u=w.default.buildLayerMatrix(t);var g=(0,p.default)(t,u);g0;)n%2&&(e+=c[n+1]),n=n-1>>1,c[n]+=t.weight;f+=t.weight*e})),f}Object.defineProperty(n,"__esModule",{value:!0});var i=e(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i);n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n,e,r){var a=t.children(n),f=t.node(n),s=f?f.borderLeft:void 0,d=f?f.borderRight:void 0,g={};s&&(a=c.default.filter(a,function(t){return t!==s&&t!==d}));var v=(0,l.default)(t,a);c.default.each(v,function(n){if(t.children(n.v).length){var i=u(t,n.v,e,r);g[n.v]=i,c.default.has(i,"barycenter")&&o(n,i)}});var y=(0,h.default)(v,e);i(y,g);var _=(0,p.default)(y,r);if(s&&(_.vs=c.default.flatten([s,_.vs,d],!0),t.predecessors(s).length)){var m=t.node(t.predecessors(s)[0]),x=t.node(t.predecessors(d)[0]);c.default.has(_,"barycenter")||(_.barycenter=0,_.weight=0),_.barycenter=(_.barycenter*_.weight+m.order+x.order)/(_.weight+2),_.weight+=2}return _}function i(t,n){c.default.each(t,function(t){t.vs=c.default.flatten(t.vs.map(function(t){return n[t]?n[t].vs:t}),!0)})}function o(t,n){c.default.isUndefined(t.barycenter)?(t.barycenter=n.barycenter,t.weight=n.weight):(t.barycenter=(t.barycenter*t.weight+n.barycenter*n.weight)/(t.weight+n.weight),t.weight+=n.weight)}Object.defineProperty(n,"__esModule",{value:!0});var a=e(0),c=r(a),f=e(21),l=r(f),s=e(22),h=r(s),d=e(23),p=r(d);n.default=u},function(t,n,e){"use strict";function r(t,n){return i.default.map(n,function(n){var e=t.inEdges(n);if(e.length){var r=i.default.reduce(e,function(n,e){var r=t.edge(e),u=t.node(e.v);return{sum:n.sum+r.weight*u.order,weight:n.weight+r.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}return{v:n}})}Object.defineProperty(n,"__esModule",{value:!0});var u=e(0),i=function(t){return t&&t.__esModule?t:{default:t}}(u);n.default=r},function(t,n,e){"use strict";function r(t,n){var e={};return a.default.each(t,function(t,n){var r=e[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:n};a.default.isUndefined(t.barycenter)||(r.barycenter=t.barycenter,r.weight=t.weight)}),a.default.each(n.edges(),function(t){var n=e[t.v],r=e[t.w];a.default.isUndefined(n)||a.default.isUndefined(r)||(r.indegree++,n.out.push(e[t.w]))}),u(a.default.filter(e,function(t){return!t.indegree}))}function u(t){for(var n=[];t.length;){var e=t.pop();n.push(e),a.default.each(e.in.reverse(),function(t){return function(n){n.merged||(a.default.isUndefined(n.barycenter)||a.default.isUndefined(t.barycenter)||n.barycenter>=t.barycenter)&&i(t,n)}}(e)),a.default.each(e.out,function(n){return function(e){e.in.push(n),0==--e.indegree&&t.push(e)}}(e))}return a.default.chain(n).filter(function(t){return!t.merged}).map(function(t){return a.default.pick(t,["vs","i","barycenter","weight"])}).value()}function i(t,n){var e=0,r=0;t.weight&&(e+=t.barycenter*t.weight,r+=t.weight),n.weight&&(e+=n.barycenter*n.weight,r+=n.weight),t.vs=n.vs.concat(t.vs),t.barycenter=e/r,t.weight=r,t.i=Math.min(n.i,t.i),n.merged=!0}Object.defineProperty(n,"__esModule",{value:!0});var o=e(0),a=function(t){return t&&t.__esModule?t:{default:t}}(o);n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n){var e=l.default.partition(t,function(t){return c.default.has(t,"barycenter")}),r=e.lhs,u=c.default.sortBy(e.rhs,function(t){return-t.i}),a=[],f=0,s=0,h=0;r.sort(o(!!n)),h=i(a,u,h),c.default.each(r,function(t){h+=t.vs.length,a.push(t.vs),f+=t.barycenter*t.weight,s+=t.weight,h=i(a,u,h)});var d={vs:c.default.flatten(a,!0)};return s&&(d.barycenter=f/s,d.weight=s),d}function i(t,n,e){for(var r=void 0;n.length&&(r=c.default.last(n)).i<=e;)n.pop(),t.push(r.vs),e++;return e}function o(t){return function(n,e){return n.barycentere.barycenter?1:t?e.i-n.i:n.i-e.i}}Object.defineProperty(n,"__esModule",{value:!0});var a=e(0),c=r(a),f=e(1),l=r(f);n.default=u},function(t,n,e){"use strict";function r(t,n,e){var r=u(t),i=new a.Graph({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(n){return t.node(n)});return o.default.each(t.nodes(),function(u){var a=t.node(u),c=t.parent(u);(a.rank===n||a.minRank<=n&&n<=a.maxRank)&&(i.setNode(u),i.setParent(u,c||r),o.default.each(t[e](u),function(n){var e=n.v===u?n.w:n.v,r=i.edge(e,u),a=o.default.isUndefined(r)?0:r.weight;i.setEdge(e,u,{weight:t.edge(n).weight+a})}),o.default.has(a,"minRank")&&i.setNode(u,{borderLeft:a.borderLeft[n],borderRight:a.borderRight[n]}))}),i}function u(t){for(var n=void 0;t.hasNode(n=o.default.uniqueId("_root")););return n}Object.defineProperty(n,"__esModule",{value:!0});var i=e(0),o=function(t){return t&&t.__esModule?t:{default:t}}(i),a=e(2);n.default=r},function(t,n,e){"use strict";function r(t,n,e){var r={},u=void 0;i.default.each(e,function(e){for(var i=t.parent(e),o=void 0,a=void 0;i;){if(o=t.parent(i),o?(a=r[o],r[o]=i):(a=u,u=i),a&&a!==i)return void n.setEdge(a,i);i=o}})}Object.defineProperty(n,"__esModule",{value:!0});var u=e(0),i=function(t){return t&&t.__esModule?t:{default:t}}(u);n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t){t=f.default.asNonCompoundGraph(t),i(t),a.default.each((0,l.positionX)(t),function(n,e){t.node(e).x=n})}function i(t){var n=f.default.buildLayerMatrix(t),e=t.graph().ranksep,r=0;a.default.each(n,function(n){var u=a.default.max(a.default.map(n,function(n){return t.node(n).height}));a.default.each(n,function(n){t.node(n).y=r+u/2}),r+=u+e})}Object.defineProperty(n,"__esModule",{value:!0});var o=e(0),a=r(o),c=e(1),f=r(c),l=e(27);n.default=u},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n){function e(n,e){var u=0,i=0,c=n.length,f=m.default.last(e);return m.default.each(e,function(n,l){var s=o(t,n),h=s?t.node(s).order:c;(s||n===f)&&(m.default.each(e.slice(i,l+1),function(n){m.default.each(t.predecessors(n),function(e){var i=t.node(e),o=i.order;!(oo)&&a(u,n,c)})})}function r(n,r){var u=-1,i=void 0,o=0;return m.default.each(r,function(a,c){if("border"===t.node(a).dummy){var f=t.predecessors(a);f.length&&(i=t.node(f[0]).order,e(r,o,c,u,i),o=c,u=i)}e(r,o,r.length,i,n.length)}),r}var u={};return m.default.reduce(n,r),u}function o(t,n){if(t.node(n).dummy)return m.default.find(t.predecessors(n),function(n){return t.node(n).dummy})}function a(t,n,e){if(n>e){var r=n;n=e,e=r}var u=t[n];u||(t[n]=u={}),u[e]=!0}function c(t,n,e){if(n>e){var r=n;n=e,e=r}return m.default.has(t[n],e)}function f(t,n,e,r){var u={},i={},o={};return m.default.each(n,function(t){m.default.each(t,function(t,n){u[t]=t,i[t]=t,o[t]=n})}),m.default.each(n,function(t){var n=-1;m.default.each(t,function(t){var a=r(t);if(a.length){a=m.default.sortBy(a,function(t){return o[t]});for(var f=(a.length-1)/2,l=Math.floor(f),s=Math.ceil(f);l<=s;++l){var h=a[l];i[t]===t&&n",main:"dist/dagre-layout.js",keywords:["graph","layout","dagre"],scripts:{lint:"standard",jest:"jest --coverage",karma:"node -r babel-register node_modules/.bin/karma start",test:"yarn lint && yarn jest && yarn karma --single-run",bench:"node -r babel-register src/bench.js",build:"node -r babel-register node_modules/.bin/webpack --progress --colors","build:watch":"yarn build --watch",upgrade:"yarn-upgrade-all"},dependencies:{graphlib:"^2.1.1",lodash:"^4.17.4"},devDependencies:{"babel-core":"^6.26.0","babel-loader":"^7.1.2","babel-preset-env":"^1.6.0","babel-preset-es2015":"^6.24.1",benchmark:"^2.1.4",chai:"^4.1.2",coveralls:"^2.13.1",jest:"^21.0.1",karma:"^1.7.1","karma-chrome-launcher":"^2.2.0","karma-firefox-launcher":"^1.0.1","karma-mocha":"^1.3.0","karma-safari-launcher":"^1.0.0",mocha:"^3.5.0",sprintf:"^0.1.5",standard:"^10.0.3",webpack:"^3.5.6","webpack-node-externals":"^1.6.0","yarn-upgrade-all":"^0.1.8"},repository:{type:"git",url:"https://github.com/tylingsoft/dagre-layout.git"},license:"MIT",files:["dist/","lib/","index.js"],standard:{ignore:["dist/**/*.js","coverage/**/*.js"]},jest:{testRegex:"test/.+?-test\\.js",testPathIgnorePatterns:["test/bundle-test\\.js"]}}}]).default})},function(t,n,e){"use strict";function r(t,n){return t.intersect(n)}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},function(t,n,e){"use strict";function r(t,n,e){return(0,i.default)(t,n,n,e)}Object.defineProperty(n,"__esModule",{value:!0});var u=e(6),i=function(t){return t&&t.__esModule?t:{default:t}}(u);n.default=r},function(t,n,e){"use strict";function r(t,n,e){var r=t.x,u=t.y,o=[],a=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;n.forEach(function(t){a=Math.min(a,t.x),c=Math.min(c,t.y)});for(var f=r-t.width/2-a,l=u-t.height/2-c,s=0;s1&&o.sort(function(t,n){var r=t.x-e.x,u=t.y-e.y,i=Math.sqrt(r*r+u*u),o=n.x-e.x,a=n.y-e.y,c=Math.sqrt(o*o+a*a);return iMath.abs(u)*a?(i<0&&(a=-a),c=0===i?0:a*u/i,f=a):(u<0&&(o=-o),c=o,f=0===u?0:o*i/u),{x:e+c,y:r+f}}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var u=e(3),i=r(u),o=e(4),a=r(o),c=e(13),f=r(c),l=e(33),s=r(l),h=e(35),d=r(h),p=e(1),g=r(p),v=e(48);n.default={d3:i.default,graphlib:a.default,dagre:f.default,intersect:s.default,render:d.default,util:g.default,version:v.version}},function(t,n,e){t.exports={Graph:e(5),version:e(22)}},function(t,n){var e;e=function(){return this}();try{e=e||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n){t.exports="2.1.1"},function(t,n,e){function r(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:u(t),edges:i(t)};return a.isUndefined(t.graph())||(n.value=a.clone(t.graph())),n}function u(t){return a.map(t.nodes(),function(n){var e=t.node(n),r=t.parent(n),u={v:n};return a.isUndefined(e)||(u.value=e),a.isUndefined(r)||(u.parent=r),u})}function i(t){return a.map(t.edges(),function(n){var e=t.edge(n),r={v:n.v,w:n.w};return a.isUndefined(n.name)||(r.name=n.name),a.isUndefined(e)||(r.value=e),r})}function o(t){var n=new c(t.options).setGraph(t.value);return a.each(t.nodes,function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)}),a.each(t.edges,function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)}),n}var a=e(0),c=e(5);t.exports={write:r,read:o}},function(t,n,e){t.exports={components:e(25),dijkstra:e(8),dijkstraAll:e(26),findCycles:e(27),floydWarshall:e(28),isAcyclic:e(29),postorder:e(30),preorder:e(31),prim:e(32),tarjan:e(10),topsort:e(11)}},function(t,n,e){function r(t){function n(i){u.has(r,i)||(r[i]=!0,e.push(i),u.each(t.successors(i),n),u.each(t.predecessors(i),n))}var e,r={},i=[];return u.each(t.nodes(),function(t){e=[],n(t),e.length&&i.push(e)}),i}var u=e(0);t.exports=r},function(t,n,e){function r(t,n,e){return i.transform(t.nodes(),function(r,i){r[i]=u(t,i,n,e)},{})}var u=e(8),i=e(0);t.exports=r},function(t,n,e){function r(t){return u.filter(i(t),function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])})}var u=e(0),i=e(10);t.exports=r},function(t,n,e){function r(t,n,e){return u(t,n||o,e||function(n){return t.outEdges(n)})}function u(t,n,e){var r={},u=t.nodes();return u.forEach(function(t){r[t]={},r[t][t]={distance:0},u.forEach(function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})}),e(t).forEach(function(e){var u=e.v===t?e.w:e.v,i=n(e);r[t][u]={distance:i,predecessor:t}})}),u.forEach(function(t){var n=r[t];u.forEach(function(e){var i=r[e];u.forEach(function(e){var r=i[t],u=n[e],o=i[e],a=r.distance+u.distance;a0;){if(r=f.removeMin(),u.has(c,r))a.setEdge(r,c[r]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(r).forEach(e)}return a}var u=e(0),i=e(5),o=e(9);t.exports=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(n,"__esModule",{value:!0});var u=e(14),i=r(u),o=e(15),a=r(o),c=e(6),f=r(c),l=e(16),s=r(l),h=e(17),d=r(h);n.default={node:i.default,circle:a.default,ellipse:f.default,polygon:s.default,rect:d.default}},function(t,n,e){"use strict";function r(t,n,e,r){var i=n.y-t.y,o=t.x-n.x,a=n.x*t.y-t.x*n.y,c=i*e.x+o*e.y+a,f=i*r.x+o*r.y+a;if(0===c||0===f||!u(c,f)){var l=r.y-e.y,s=e.x-r.x,h=r.x*e.y-e.x*r.y,d=l*t.x+s*t.y+h,p=l*n.x+s*n.y+h;if(0===d||0===p||!u(d,p)){var g=i*s-l*o;if(0!==g){var v=Math.abs(g/2),y=o*h-s*a,_=y<0?(y-v)/g:(y+v)/g;y=l*a-i*h;return{x:_,y:y<0?(y-v)/g:(y+v)/g}}}}}function u(t,n){return t*n>0}Object.defineProperty(n,"__esModule",{value:!0}),n.default=r},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(){var t=_.default,n=x.default,e=w.default,r=k.default,u=N.default,c=j.default,f=function(f,s){i(s);var d=a(f,"output"),g=a(d,"clusters"),y=a(d,"edgePaths"),_=e(a(d,"edgeLabels"),s),m=t(a(d,"nodes"),s,u);(0,l.layout)(s),(0,h.default)(m,s),(0,p.default)(_,s),r(y,s,c);var x=n(g,s);(0,v.default)(x,s),o(s)};return f.createNodes=function(n){return arguments.length?(t=n,f):t},f.createClusters=function(t){return arguments.length?(n=t,f):n},f.createEdgeLabels=function(t){return arguments.length?(e=t,f):e},f.createEdgePaths=function(t){return arguments.length?(r=t,f):r},f.shapes=function(t){return arguments.length?(u=t,f):u},f.arrows=function(t){return arguments.length?(c=t,f):c},f}function i(t){t.nodes().forEach(function(n){var e=t.node(n);f.default.has(e,"label")||t.children(n).length||(e.label=n),f.default.has(e,"paddingX")&&f.default.defaults(e,{paddingLeft:e.paddingX,paddingRight:e.paddingX}),f.default.has(e,"paddingY")&&f.default.defaults(e,{paddingTop:e.paddingY,paddingBottom:e.paddingY}),f.default.has(e,"padding")&&f.default.defaults(e,{paddingLeft:e.padding,paddingRight:e.padding,paddingTop:e.padding,paddingBottom:e.padding}),f.default.defaults(e,C),f.default.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(t){e[t]=Number(e[t])}),f.default.has(e,"width")&&(e._prevWidth=e.width),f.default.has(e,"height")&&(e._prevHeight=e.height)}),t.edges().forEach(function(n){var e=t.edge(n);f.default.has(e,"label")||(e.label=""),f.default.defaults(e,A)})}function o(t){f.default.each(t.nodes(),function(n){var e=t.node(n);f.default.has(e,"_prevWidth")?e.width=e._prevWidth:delete e.width,f.default.has(e,"_prevHeight")?e.height=e._prevHeight:delete e.height,delete e._prevWidth,delete e._prevHeight})}function a(t,n){var e=t.select("g."+n);return e.empty()&&(e=t.append("g").attr("class",n)),e}Object.defineProperty(n,"__esModule",{value:!0});var c=e(2),f=r(c),l=e(13),s=e(36),h=r(s),d=e(37),p=r(d),g=e(38),v=r(g),y=e(39),_=r(y),m=e(43),x=r(m),b=e(44),w=r(b),M=e(45),k=r(M),E=e(46),N=r(E),S=e(47),j=r(S),C={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},A={arrowhead:"normal",lineInterpolate:"linear"};n.default=u},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n){function e(t){var e=n.node(t);return"translate("+e.x+","+e.y+")"}t.filter(function(){return!o.default.select(this).classed("update")}).attr("transform",e),c.default.applyTransition(t,n).style("opacity",1).attr("transform",e)}Object.defineProperty(n,"__esModule",{value:!0});var i=e(3),o=r(i),a=e(1),c=r(a);n.default=u},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n){function e(t){var e=n.edge(t);return c.default.has(e,"x")?"translate("+e.x+","+e.y+")":""}t.filter(function(){return!o.default.select(this).classed("update")}).attr("transform",e),l.default.applyTransition(t,n).style("opacity",1).attr("transform",e)}Object.defineProperty(n,"__esModule",{value:!0});var i=e(3),o=r(i),a=e(2),c=r(a),f=e(1),l=r(f);n.default=u},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n){function e(t){var e=n.node(t);return"translate("+e.x+","+e.y+")"}var r=t.filter(function(){return!o.default.select(this).classed("update")});r.attr("transform",e),c.default.applyTransition(t,n).style("opacity",1).attr("transform",e),c.default.applyTransition(r.selectAll("rect"),n).attr("width",function(t){return n.node(t).width}).attr("height",function(t){return n.node(t).height}).attr("x",function(t){return-n.node(t).width/2}).attr("y",function(t){return-n.node(t).height/2})}Object.defineProperty(n,"__esModule",{value:!0});var i=e(3),o=r(i),a=e(1),c=r(a);n.default=u},function(t,n,e){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function u(t,n,e){var r=n.nodes().filter(function(t){return!h.default.isSubgraph(n,t)}),u=t.selectAll("g.node").data(r,function(t){return t}).classed("update",!0);return u.selectAll("*").remove(),u.enter().append("g").attr("class","node").style("opacity",0),u.each(function(t){var r=n.node(t),u=c.default.select(this),i=u.append("g").attr("class","label"),a=(0,l.default)(i,r),f=e[r.shape],s=o.default.pick(a.node().getBBox(),"width","height");r.elem=this,r.id&&u.attr("id",r.id),r.labelId&&i.attr("id",r.labelId),h.default.applyClass(u,r.class,(u.classed("update")?"update ":"")+"node"),o.default.has(r,"width")&&(s.width=r.width),o.default.has(r,"height")&&(s.height=r.height),s.width+=r.paddingLeft+r.paddingRight,s.height+=r.paddingTop+r.paddingBottom,i.attr("transform","translate("+(r.paddingLeft-r.paddingRight)/2+","+(r.paddingTop-r.paddingBottom)/2+")");var d=f(c.default.select(this),s,r);h.default.applyStyle(d,r.style);var p=d.node().getBBox();r.width=p.width,r.height=p.height}),h.default.applyTransition(u.exit(),n).style("opacity",0).remove(),u}Object.defineProperty(n,"__esModule",{value:!0});var i=e(2),o=r(i),a=e(3),c=r(a),f=e(7),l=r(f),s=e(1),h=r(s);n.default=u},function(t,n,e){"use strict";function r(t,n){for(var e=t.append("text"),r=u(n.label).split("\n"),i=0;i