1import{g as mc}from"./_commonjsHelpers.gnU0ypJ3WcXM0xgO.js";import{c as Zr}from"./_commonjs-dynamic-modules.TDtrdbi37hy-Z63m.js";function yc(Bn,Kr){for(var $t=0;$t<Kr.length;$t++){const te=Kr[$t];if(typeof te!="string"&&!Array.isArray(te)){for(const ue in te)if(ue!=="default"&&!(ue in Bn)){const i=Object.getOwnPropertyDescriptor(te,ue);i&&Object.defineProperty(Bn,ue,i.get?i:{enumerable:!0,get:()=>te[ue]})}}}return Object.freeze(Object.defineProperty(Bn,Symbol.toStringTag,{value:"Module"}))}var aa={exports:{}},Au;function xc(){return Au||(Au=1,function(Bn,Kr){(function($t){Bn.exports=$t()})(function(){return function $t(te,ue,i){function u(x,F){if(!ue[x]){if(!te[x]){var A=typeof Zr=="function"&&Zr;if(!F&&A)return A(x,!0);if(m)return m(x,!0);var d=new Error("Cannot find module '"+x+"'");throw d.code="MODULE_NOT_FOUND",d}var v=ue[x]={exports:{}};te[x][0].call(v.exports,function(y){var w=te[x][1][y];return u(w||y)},v,v.exports,$t,te,ue,i)}return ue[x].exports}for(var m=typeof Zr=="function"&&Zr,E=0;E<i.length;E++)u(i[E]);return u}({1:[function($t,te,ue){te.exports={default:$t("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":4}],2:[function($t,te,ue){te.exports={default:$t("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":5}],3:[function($t,te,ue){ue.default=function(i){return i&&i.__esModule?i:{default:i}},ue.__esModule=!0},{}],4:[function($t,te,ue){$t("../../modules/es6.object.assign"),te.exports=$t("../../modules/$.core").Object.assign},{"../../modules/$.core":8,"../../modules/es6.object.assign":18}],5:[function($t,te,ue){var i=$t("../../modules/$");te.exports=function(m,E){return i.create(m,E)}},{"../../modules/$":15}],6:[function($t,te,ue){te.exports=function(i){if(typeof i!="function")throw TypeError(i+" is not a function!");return i}},{}],7:[function($t,te,ue){var i={}.toString;te.exports=function(u){return i.call(u).slice(8,-1)}},{}],8:[function($t,te,ue){var i=te.exports={version:"1.2.6"};typeof __e=="number"&&(__e=i)},{}],9:[function($t,te,ue){var i=$t("./$.a-function");te.exports=function(u,m,E){if(i(u),m===void 0)return u;switch(E){case 1:return function(x){return u.call(m,x)};case 2:return function(x,F){return u.call(m,x,F)};case 3:return function(x,F,A){return u.call(m,x,F,A)}}return function(){return u.apply(m,arguments)}}},{"./$.a-function":6}],10:[function($t,te,ue){te.exports=function(i){if(i==null)throw TypeError("Can't call method on "+i);return i}},{}],11:[function($t,te,ue){var i=$t("./$.global"),u=$t("./$.core"),m=$t("./$.ctx"),E="prototype",x=function(F,A,d){var v=F&x.F,y=F&x.G,w=F&x.S,T=F&x.P,j=F&x.B,G=F&x.W,P=y?u:u[A]||(u[A]={}),tt=y?i:w?i[A]:(i[A]||{})[E],N,I,q;y&&(d=A);for(N in d)I=!v&&tt&&N in tt,!(I&&N in P)&&(q=I?tt[N]:d[N],P[N]=y&&typeof tt[N]!="function"?d[N]:j&&I?m(q,i):G&&tt[N]==q?function(H){var b=function(W){return this instanceof H?new H(W):H(W)};return b[E]=H[E],b}(q):T&&typeof q=="function"?m(Function.call,q):q,T&&((P[E]||(P[E]={}))[N]=q))};x.F=1,x.G=2,x.S=4,x.P=8,x.B=16,x.W=32,te.exports=x},{"./$.core":8,"./$.ctx":9,"./$.global":13}],12:[function($t,te,ue){te.exports=function(i){try{return!!i()}catch{return!0}}},{}],13:[function($t,te,ue){var i=te.exports=typeof window<"u"&&window.Math==Math?window:typeof self<"u"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=i)},{}],14:[function($t,te,ue){var i=$t("./$.cof");te.exports=Object("z").propertyIsEnumerable(0)?Object:function(u){return i(u)=="String"?u.split(""):Object(u)}},{"./$.cof":7}],15:[function($t,te,ue){var i=Object;te.exports={create:i.create,getProto:i.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:i.getOwnPropertyDescriptor,setDesc:i.defineProperty,setDescs:i.defineProperties,getKeys:i.keys,getNames:i.getOwnPropertyNames,getSymbols:i.getOwnPropertySymbols,each:[].forEach}},{}],16:[function($t,te,ue){var i=$t("./$"),u=$t("./$.to-object"),m=$t("./$.iobject");te.exports=$t("./$.fails")(function(){var E=Object.assign,x={},F={},A=Symbol(),d="abcdefghijklmnopqrst";return x[A]=7,d.split("").forEach(function(v){F[v]=v}),E({},x)[A]!=7||Object.keys(E({},F)).join("")!=d})?function(x,F){for(var A=u(x),d=arguments,v=d.length,y=1,w=i.getKeys,T=i.getSymbols,j=i.isEnum;v>y;)for(var G=m(d[y++]),P=T?w(G).concat(T(G)):w(G),tt=P.length,N=0,I;tt>N;)j.call(G,I=P[N++])&&(A[I]=G[I]);return A}:Object.assign},{"./$":15,"./$.fails":12,"./$.iobject":14,"./$.to-object":17}],17:[function($t,te,ue){var i=$t("./$.defined");te.exports=function(u){return Object(i(u))}},{"./$.defined":10}],18:[function($t,te,ue){var i=$t("./$.export");i(i.S+i.F,"Object",{assign:$t("./$.object-assign")})},{"./$.export":11,"./$.object-assign":16}],19:[function($t,te,ue){(function(){var i={version:"3.5.17"},u=[].slice,m=function(t){return u.call(t)},E=this.document;function x(t){return t&&(t.ownerDocument||t.document||t).documentElement}function F(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}if(E)try{m(E.documentElement.childNodes)[0].nodeType}catch{m=function(e){for(var n=e.length,r=new Array(n);n--;)r[n]=e[n];return r}}if(Date.now||(Date.now=function(){return+new Date}),E)try{E.createElement("DIV").style.setProperty("opacity",0,"")}catch{var A=this.Element.prototype,d=A.setAttribute,v=A.setAttributeNS,y=this.CSSStyleDeclaration.prototype,w=y.setProperty;A.setAttribute=function(e,n){d.call(this,e,n+"")},A.setAttributeNS=function(e,n,r){v.call(this,e,n,r+"")},y.setProperty=function(e,n,r){w.call(this,e,n+"",r)}}i.ascending=T;function T(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}i.descending=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},i.min=function(t,e){var n=-1,r=t.length,a,o;if(arguments.length===1){for(;++n<r;)if((o=t[n])!=null&&o>=o){a=o;break}for(;++n<r;)(o=t[n])!=null&&a>o&&(a=o)}else{for(;++n<r;)if((o=e.call(t,t[n],n))!=null&&o>=o){a=o;break}for(;++n<r;)(o=e.call(t,t[n],n))!=null&&a>o&&(a=o)}return a},i.max=function(t,e){var n=-1,r=t.length,a,o;if(arguments.length===1){for(;++n<r;)if((o=t[n])!=null&&o>=o){a=o;break}for(;++n<r;)(o=t[n])!=null&&o>a&&(a=o)}else{for(;++n<r;)if((o=e.call(t,t[n],n))!=null&&o>=o){a=o;break}for(;++n<r;)(o=e.call(t,t[n],n))!=null&&o>a&&(a=o)}return a},i.extent=function(t,e){var n=-1,r=t.length,a,o,l;if(arguments.length===1){for(;++n<r;)if((o=t[n])!=null&&o>=o){a=l=o;break}for(;++n<r;)(o=t[n])!=null&&(a>o&&(a=o),l<o&&(l=o))}else{for(;++n<r;)if((o=e.call(t,t[n],n))!=null&&o>=o){a=l=o;break}for(;++n<r;)(o=e.call(t,t[n],n))!=null&&(a>o&&(a=o),l<o&&(l=o))}return[a,l]};function j(t){return t===null?NaN:+t}function G(t){return!isNaN(t)}i.sum=function(t,e){var n=0,r=t.length,a,o=-1;if(arguments.length===1)for(;++o<r;
vendor: 4,158 bytes, line 1
1)G(a=+t[o])&&(n+=a);else for(;++o<r;)G(a=+e.call(t,t[o],o))&&(n+=a);return n},i.mean=function(t,e){var n=0,r=t.length,a,o=-1,l=r;if(arguments.length===1)for(;++o<r;)G(a=j(t[o]))?n+=a:--l;else for(;++o<r;)G(a=j(e.call(t,t[o],o)))?n+=a:--l;if(l)return n/l},i.quantile=function(t,e){var n=(t.length-1)*e+1,r=Math.floor(n),a=+t[r-1],o=n-r;return o?a+o*(t[r]-a):a},i.median=function(t,e){var n=[],r=t.length,a,o=-1;if(arguments.length===1)for(;++o<r;)G(a=j(t[o]))&&n.push(a);else for(;++o<r;)G(a=j(e.call(t,t[o],o)))&&n.push(a);if(n.length)return i.quantile(n.sort(T),.5)},i.variance=function(t,e){var n=t.length,r=0,a,o,l=0,s=-1,c=0;if(arguments.length===1)for(;++s<n;)G(a=j(t[s]))&&(o=a-r,r+=o/++c,l+=o*(a-r));else for(;++s<n;)G(a=j(e.call(t,t[s],s)))&&(o=a-r,r+=o/++c,l+=o*(a-r));if(c>1)return l/(c-1)},i.deviation=function(){var t=i.variance.apply(this,arguments);return t&&Math.sqrt(t)};function P(t){return{left:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r<a;){var o=r+a>>>1;t(e[o],n)<0?r=o+1:a=o}return r},right:function(e,n,r,a){for(arguments.length<3&&(r=0),arguments.length<4&&(a=e.length);r<a;){var o=r+a>>>1;t(e[o],n)>0?a=o:r=o+1}return r}}}var tt=P(T);i.bisectLeft=tt.left,i.bisect=i.bisectRight=tt.right,i.bisector=function(t){return P(t.length===1?function(e,n){return T(t(e),n)}:t)},i.shuffle=function(t,e,n){(r=arguments.length)<3&&(n=t.length,r<2&&(e=0));for(var r=n-e,a,o;r;)o=Math.random()*r--|0,a=t[r+e],t[r+e]=t[o+e],t[o+e]=a;return t},i.permute=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},i.pairs=function(t){for(var e=0,n=t.length-1,r=t[0],a=new Array(n<0?0:n);e<n;)a[e]=[r,r=t[++e]];return a},i.transpose=function(t){if(!(o=t.length))return[];for(var e=-1,n=i.min(t,N),r=new Array(n);++e<n;)for(var a=-1,o,l=r[e]=new Array(o);++a<o;)l[a]=t[a][e];return r};function N(t){return t.length}i.zip=function(){return i.transpose(arguments)},i.keys=function(t){var e=[];for(var n in t)e.push(n);return e},i.values=function(t){var e=[];for(var n in t)e.push(t[n]);return e},i.entries=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},i.merge=function(t){for(var e=t.length,n,r=-1,a=0,o,l;++r<e;)a+=t[r].length;for(o=new Array(a);--e>=0;)for(l=t[e],n=l.length;--n>=0;)o[--a]=l[n];return o};var I=Math.abs;i.range=function(t,e,n){if(arguments.length<3&&(n=1,arguments.length<2&&(e=t,t=0)),(e-t)/n===1/0)throw new Error("infinite range");var r=[],a=q(I(n)),o=-1,l;if(t*=a,e*=a,n*=a,n<0)for(;(l=t+n*++o)>e;)r.push(l/a);else for(;(l=t+n*++o)<e;)r.push(l/a);return r};function q(t){for(var e=1;t*e%1;)e*=10;return e}function H(t,e){for(var n in e)Object.defineProperty(t.prototype,n,{value:e[n],enumerable:!1})}i.map=function(t,e){var n=new b;if(t instanceof b)t.forEach(function(s,c){n.set(s,c)});else if(Array.isArray(t)){var r=-1,a=t.length,o;if(arguments.length===1)for(;++r<a;)n.set(r,t[r]);else for(;++r<a;)n.set(e.call(t,o=t[r],r),o)}else for(var l in t)n.set(l,t[l]);return n};function b(){this._=Object.create(null)}var W="__proto__",O="\0";H(b,{has:rt,get:function(t){return this._[K(t)]},set:function(t,e){return this._[K(t)]=e},remove:p,keys:z,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:V(e),value:this._[e]});return t},size:et,empty:S,forEach:function(t){for(var e in this._)t.call(this,V(e),this._[e])}});function K(t){return(t+="")===W||t[0]===O?O+t:t}function V(t){return(t+="")[0]===O?t.slice(1):t}function rt(t){return K(t)in this._}function p(t){return(t=K(t))in this._&&delete this._[t]}function z(){var t=[];for(var e in this._)t.push(V(e));return t}function et(){var t=0;for(var e in this._)++t;return t}function S(){for(var t in this._)return!1;return!0}i.nest=function(){var t={},e=[],n=[],r,a;function o(s,c,f){if(f>=e.length)return a?a.call(t,c):r?c.sort(r):c;for(var h=-1,k=c.length,C=e[f++],U,ct,Y,X=new b,Z;++h<k;)(Z=X.get(U=C(ct=c[h])))?Z.push(ct):X.set(U,[ct]);return s?(ct=s(),Y=function(ft,it){ct.set(ft,o(s,it,f))}):(ct={},Y=function(ft,it){ct[ft]=o(s,it,f)}),X.forEach(Y),ct}function l(s,c){if(c>=e.length)return s;var f=[],h=n[c++];
vendor: 30,527 bytes, lines 1-4
1return s.forEach(function(k,C){f.push({key:k,values:l(C,c)})}),h?f.sort(function(k,C){return h(k.key,C.key)}):f}return t.map=function(s,c){return o(c,s,0)},t.entries=function(s){return l(o(i.map,s,0),0)},t.key=function(s){return e.push(s),t},t.sortKeys=function(s){return n[e.length-1]=s,t},t.sortValues=function(s){return r=s,t},t.rollup=function(s){return a=s,t},t},i.set=function(t){var e=new M;if(t)for(var n=0,r=t.length;n<r;++n)e.add(t[n]);return e};function M(){this._=Object.create(null)}H(M,{has:rt,add:function(t){return this._[K(t+="")]=!0,t},remove:p,values:z,size:et,empty:S,forEach:function(t){for(var e in this._)t.call(this,V(e))}}),i.behavior={};function nt(t){return t}i.rebind=function(t,e){for(var n=1,r=arguments.length,a;++n<r;)t[a=arguments[n]]=pt(t,e,e[a]);return t};function pt(t,e,n){return function(){var r=n.apply(e,arguments);return r===e?t:r}}function xt(t,e){if(e in t)return e;e=e.charAt(0).toUpperCase()+e.slice(1);for(var n=0,r=st.length;n<r;++n){var a=st[n]+e;if(a in t)return a}}var st=["webkit","ms","moz","Moz","o","O"];function R(){}i.dispatch=function(){for(var t=new L,e=-1,n=arguments.length;++e<n;)t[arguments[e]]=g(t);return t};function L(){}L.prototype.on=function(t,e){var n=t.indexOf("."),r="";if(n>=0&&(r=t.slice(n+1),t=t.slice(0,n)),t)return arguments.length<2?this[t].on(r):this[t].on(r,e);if(arguments.length===2){if(e==null)for(t in this)this.hasOwnProperty(t)&&this[t].on(r,null);return this}};function g(t){var e=[],n=new b;function r(){for(var a=e,o=-1,l=a.length,s;++o<l;)(s=a[o].on)&&s.apply(this,arguments);return t}return r.on=function(a,o){var l=n.get(a),s;return arguments.length<2?l&&l.on:(l&&(l.on=null,e=e.slice(0,s=e.indexOf(l)).concat(e.slice(s+1)),n.remove(a)),o&&e.push(n.set(a,{on:o})),t)},r}i.event=null;function B(){i.event.preventDefault()}function J(){for(var t=i.event,e;e=t.sourceEvent;)t=e;return t}function ot(t){for(var e=new L,n=0,r=arguments.length;++n<r;)e[arguments[n]]=g(e);return e.of=function(a,o){return function(l){try{var s=l.sourceEvent=i.event;l.target=t,i.event=l,e[l.type].apply(a,o)}finally{i.event=s}}},e}i.requote=function(t){return t.replace(ht,"\\$&")};var ht=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,vt={}.__proto__?function(t,e){t.__proto__=e}:function(t,e){for(var n in e)t[n]=e[n]};function at(t){return vt(t,gt),t}var yt=function(t,e){return e.querySelector(t)},D=function(t,e){return e.querySelectorAll(t)},dt=function(t,e){var n=t.matches||t[xt(t,"matchesSelector")];return dt=function(r,a){return n.call(r,a)},dt(t,e)};typeof Sizzle=="function"&&(yt=function(t,e){return Sizzle(t,e)[0]||null},D=Sizzle,dt=Sizzle.matchesSelector),i.selection=function(){return i.select(E.documentElement)};var gt=i.selection.prototype=[];gt.select=function(t){var e=[],n,r,a,o;t=Q(t);for(var l=-1,s=this.length;++l<s;){e.push(n=[]),n.parentNode=(a=this[l]).parentNode;for(var c=-1,f=a.length;++c<f;)(o=a[c])?(n.push(r=t.call(o,o.__data__,c,l)),r&&"__data__"in o&&(r.__data__=o.__data__)):n.push(null)}return at(e)};function Q(t){return typeof t=="function"?t:function(){return yt(t,this)}}gt.selectAll=function(t){var e=[],n,r;t=kt(t);for(var a=-1,o=this.length;++a<o;)for(var l=this[a],s=-1,c=l.length;++s<c;)(r=l[s])&&(e.push(n=m(t.call(r,r.__data__,s,a))),n.parentNode=r);return at(e)};function kt(t){return typeof t=="function"?t:function(){return D(t,this)}}var Rt="http://www.w3.org/1999/xhtml",Ut={svg:"http://www.w3.org/2000/svg",xhtml:Rt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};i.ns={prefix:Ut,qualify:function(t){var e=t.indexOf(":"),n=t;return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),Ut.hasOwnProperty(n)?{space:Ut[n],local:t}:t}},gt.attr=function(t,e){if(arguments.length<2){if(typeof t=="string"){var n=this.node();return t=i.ns.qualify(t),t.local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(e in t)this.each(Jt(e,t[e]));return this}return this.each(Jt(t,e))};function Jt(t,e){t=i.ns.qualify(t);function n(){this.removeAttribute(t)}function r(){this.removeAttributeNS(t.space,t.local)}function a(){this.setAttribute(t,e)}function o(){this.setAttributeNS(t.space,t.local,e)}function l(){var c=e.apply(this,arguments);c==null?this.removeAttribute(t):this.setAttribute(t,c)}function s(){var c=e.apply(this,arguments);c==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,c)}return e==null?t.local?r:n:typeof e=="function"?t.local?s:l:t.local?o:a}function zt(t){return t.trim().replace(/\s+/g," ")}gt.classed=function(t,e){if(arguments.length<2){if(typeof t=="string"){var n=this.node(),r=(t=oe(t)).length,a=-1;if(e=n.classList){for(;++a<r;)if(!e.contains(t[a]))return!1}else for(e=n.getAttribute("class");++a<r;)if(!Ht(t[a]).test(e))return!1;return!0}for(e in t)this.each(se(e,t[e]));return this}return this.each(se(t,e))};function Ht(t){return new RegExp("(?:^|\\s+)"+i.requote(t)+"(?:\\s+|$)","g")}function oe(t){return(t+"").trim().split(/^|\s+/)}function se(t,e){t=oe(t).map(pe);var n=t.length;function r(){for(var o=-1;++o<n;)t[o](this,e)}function a(){for(var o=-1,l=e.apply(this,arguments);++o<n;)t[o](this,l)}return typeof e=="function"?a:r}function pe(t){var e=Ht(t);return function(n,r){if(a=n.classList)return r?a.add(t):a.remove(t);var a=n.getAttribute("class")||"";r?(e.lastIndex=0,e.test(a)||n.setAttribute("class",zt(a+" "+t))):n.setAttribute("class",zt(a.replace(e," ")))}}gt.style=function(t,e,n){var r=arguments.length;if(r<3){if(typeof t!="string"){r<2&&(e="");for(n in t)this.each(mt(n,t[n],e));return this}if(r<2){var a=this.node();return F(a).getComputedStyle(a,null).getPropertyValue(t)}n=""}return this.each(mt(t,e,n))};function mt(t,e,n){function r(){this.style.removeProperty(t)}function a(){this.style.setProperty(t,e,n)}function o(){var l=e.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,n)}return e==null?r:typeof e=="function"?o:a}gt.property=function(t,e){if(arguments.length<2){if(typeof t=="string")return this.node()[t];for(e in t)this.each(Dt(e,t[e]));return this}return this.each(Dt(t,e))};function Dt(t,e){function n(){delete this[t]}function r(){this[t]=e}function a(){var o=e.apply(this,arguments);o==null?delete this[t]:this[t]=o}return e==null?n:typeof e=="function"?a:r}gt.text=function(t){return arguments.length?this.each(typeof t=="function"?function(){var e=t.apply(this,arguments);this.textContent=e??""}:t==null?function(){this.textContent=""}:function(){this.textContent=t}):this.node().textContent},gt.html=function(t){return arguments.length?this.each(typeof t=="function"?function(){var e=t.apply(this,arguments);this.innerHTML=e??""}:t==null?function(){this.innerHTML=""}:function(){this.innerHTML=t}):this.node().innerHTML},gt.append=function(t){return t=Kt(t),this.select(function(){return this.appendChild(t.apply(this,arguments))})};function Kt(t){function e(){var r=this.ownerDocument,a=this.namespaceURI;return a===Rt&&r.documentElement.namespaceURI===Rt?r.createElement(t):r.createElementNS(a,t)}function n(){return this.ownerDocument.createElementNS(t.space,t.local)}return typeof t=="function"?t:(t=i.ns.qualify(t)).local?n:e}gt.insert=function(t,e){return t=Kt(t),e=Q(e),this.select(function(){return this.insertBefore(t.apply(this,arguments),e.apply(this,arguments)||null)})},gt.remove=function(){return this.each(qt)};function qt(){var t=this.parentNode;t&&t.removeChild(this)}gt.data=function(t,e){var n=-1,r=this.length,a,o;if(!arguments.length){for(t=new Array(r=(a=this[0]).length);++n<r;)(o=a[n])&&(t[n]=o.__data__);return t}function l(h,k){var C,U=h.length,ct=k.length,Y=Math.min(U,ct),X=new Array(ct),Z=new Array(ct),ft=new Array(U),it,ut;if(e){var Mt=new b,wt=new Array(U),_t;for(C=-1;++C<U;)(it=h[C])&&(Mt.has(_t=e.call(it,it.__data__,C))?ft[C]=it:Mt.set(_t,it),wt[C]=_t);for(C=-1;++C<ct;)(it=Mt.get(_t=e.call(k,ut=k[C],C)))?it!==!0&&(X[C]=it,it.__data__=ut):Z[C]=jt(ut),Mt.set(_t,!0);for(C=-1;++C<U;)C in wt&&Mt.get(wt[C])!==!0&&(ft[C]=h[C])}else{for(C=-1;++C<Y;)it=h[C],ut=k[C],it?(it.__data__=ut,X[C]=it):Z[C]=jt(ut);for(;C<ct;++C)Z[C]=jt(k[C]);for(;C<U;++C)ft[C]=h[C]}Z.update=X,Z.parentNode=X.parentNode=ft.parentNode=h.parentNode,s.push(Z),c.push(X),f.push(ft)}var s=ae([]),c=at([]),f=at([]);if(typeof t=="function")for(;++n<r;)l(a=this[n],t.call(a,a.parentNode.__data__,n));else for(;++n<r;)l(a=this[n],t);return c.enter=function(){return s},c.exit=function(){return f},c};function jt(t){return{__data__:t}}gt.datum=function(t){return arguments.length?this.property("__data__",t):this.property("__data__")},gt.filter=function(t){var e=[],n,r,a;typeof t!="function"&&(t=Nt(t));for(var o=0,l=this.length;o<l;o++){e.push(n=[]),n.parentNode=(r=this[o]).parentNode;for(var s=0,c=r.length;s<c;s++)(a=r[s])&&t.call(a,a.__data__,s,o)&&n.push(a)}return at(e)};function Nt(t){return function(){return dt(this,t)}}gt.order=function(){for(var t=-1,e=this.length;++t<e;)for(var n=this[t],r=n.length-1,a=n[r],o;--r>=0;)(o=n[r])&&(a&&a!==o.nextSibling&&a.parentNode.insertBefore(o,a),a=o);return this},gt.sort=function(t){t=Zt.apply(this,arguments);for(var e=-1,n=this.length;++e<n;)this[e].sort(t);return this.order()};function Zt(t){return arguments.length||(t=T),function(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}}gt.each=function(t){return Et(this,function(e,n,r){t.call(e,e.__data__,n,r)})};function Et(t,e){for(var n=0,r=t.length;n<r;n++)for(var a=t[n],o=0,l=a.length,s;o<l;o++)(s=a[o])&&e(s,o,n);return t}gt.call=function(t){var e=m(arguments);return t.apply(e[0]=this,e),this},gt.empty=function(){return!this.node()},gt.node=function(){for(var t=0,e=this.length;t<e;t++)for(var n=this[t],r=0,a=n.length;r<a;r++){var o=n[r];if(o)return o}return null},gt.size=function(){var t=0;return Et(this,function(){++t}),t};function ae(t){return vt(t,de),t}var de=[];i.selection.enter=ae,i.selection.enter.prototype=de,de.append=gt.append,de.empty=gt.empty,de.node=gt.node,de.call=gt.call,de.size=gt.size,de.select=function(t){for(var e=[],n,r,a,o,l,s=-1,c=this.length;++s<c;){a=(o=this[s]).update,e.push(n=[]),n.parentNode=o.parentNode;for(var f=-1,h=o.length;++f<h;)(l=o[f])?(n.push(a[f]=r=t.call(o.parentNode,l.__data__,f,s)),r.__data__=l.__data__):n.push(null)}return at(e)},de.insert=function(t,e){return arguments.length<2&&(e=ke(this)),gt.insert.call(this,t,e)};function ke(t){var e,n;return function(r,a,o){var l=t[o].update,s=l.length,c;for(o!=n&&(n=o,e=0),a>=e&&(e=a+1);!(c=l[e])&&++e<s;);return c}}i.select=function(t){var e;return typeof t=="string"?(e=[yt(t,E)],e.parentNode=E.documentElement):(e=[t],e.parentNode=x(t)),at([e])},i.selectAll=function(t){var e;return typeof t=="string"?(e=m(D(t,E)),e.parentNode=E.documentElement):(e=m(t),e.parentNode=null),at([e])},gt.on=function(t,e,n){var r=arguments.length;if(r<3){if(typeof t!="string"){r<2&&(e=!1);for(n in t)this.each(Ae(n,t[n],e));return this}if(r<2)return(r=this.node()["__on"+t])&&r._;n=!1}return this.each(Ae(t,e,n))};function Ae(t,e,n){var r="__on"+t,a=t.indexOf("."),o=Xt;a>0&&(t=t.slice(0,a));var l=Pt.get(t);l&&(t=l,o=lt);function s(){var h=this[r];h&&(this.removeEventListener(t,h,h.$),delete this[r])}function c(){var h=o(e,m(arguments));s.call(this),this.addEventListener(t,this[r]=h,h.$=n),h._=e}function f(){var h=new RegExp("^__on([^.]+)"+i.requote(t)+"$"),k;for(var C in this)if(k=C.match(h)){var U=this[C];this.removeEventListener(k[1],U,U.$),delete this[C]}}return a?e?c:s:e?R:f}var Pt=i.map({mouseenter:"mouseover",mouseleave:"mouseout"});E&&Pt.forEach(function(t){"on"+t in E&&Pt.remove(t)});function Xt(t,e){return function(n){var r=i.event;i.event=n,e[0]=this.__data__;try{t.apply(this,e)}finally{i.event=r}}}function lt(t,e){var n=Xt(t,e);return function(r){var a=this,o=r.relatedTarget;(!o||o!==a&&!(o.compareDocumentPosition(a)&8))&&n.call(a,r)}}var At,Ct=0;function Ft(t){var e=".dragsuppress-"+ ++Ct,n="click"+e,r=i.select(F(t)).on("touchmove"+e,B).on("dragstart"+e,B).on("selectstart"+e,B);if(At==null&&(At="onselectstart"in t?!1:xt(t.style,"userSelect")),At){var a=x(t).style,o=a[At];a[At]="none"}return function(l){if(r.on(e,null),At&&(a[At]=o),l){var s=function(){r.on(n,null)};r.on(n,function(){B(),s()},!0),setTimeout(s,0)}}}i.mouse=function(t){return fe(t,J())};var ie=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function fe(t,e){e.changedTouches&&(e=e.changedTouches[0]);var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();if(ie<0){var a=F(t);if(a.scrollX||a.scrollY){n=i.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var o=n[0][0].getScreenCTM();ie=!(o.f||o.e),n.remove()}}return ie?(r.x=e.pageX,r.y=e.pageY):(r.x=e.clientX,r.y=e.clientY),r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}var l=t.getBoundingClientRect();return[e.clientX-l.left-t.clientLeft,e.clientY-l.top-t.clientTop]}i.touch=function(t,e,n){if(arguments.length<3&&(n=e,e=J().changedTouches),e){for(var r=0,a=e.length,o;r<a;++r)if((o=e[r]).identifier===n)return fe(t,o)}},i.behavior.drag=function(){var t=ot(a,"drag","dragstart","dragend"),e=null,n=o(R,i.mouse,F,"mousemove","mouseup"),r=o(xe,i.touch,nt,"touchmove","touchend");function a(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function o(l,s,c,f,h){return function(){var k=this,C=i.event.target.correspondingElement||i.event.target,U=k.parentNode,ct=t.of(k,arguments),Y=0,X=l(),Z=".drag"+(X==null?"":"-"+X),ft,it=i.select(c(C)).on(f+Z,wt).on(h+Z,_t),ut=Ft(C),Mt=s(U,X);e?(ft=e.apply(k,arguments),ft=[ft.x-Mt[0],ft.y-Mt[1]]):ft=[0,0],ct({type:"dragstart"});function wt(){var bt=s(U,X),Ot,Bt;bt&&(Ot=bt[0]-Mt[0],Bt=bt[1]-Mt[1],Y|=Ot|Bt,Mt=bt,ct({type:"drag",x:bt[0]+ft[0],y:bt[1]+ft[1],dx:Ot,dy:Bt}))}function _t(){s(U,X)&&(it.on(f+Z,null).on(h+Z,null),ut(Y),ct({type:"dragend"}))}}}return a.origin=function(l){return arguments.length?(e=l,a):e},i.rebind(a,t,"on")};function xe(){return i.event.changedTouches[0].identifier}i.touches=function(t,e){return arguments.length<2&&(e=J().touches),e?m(e).map(function(n){var r=fe(t,n);return r.identifier=n.identifier,r}):[]};var Tt=1e-6,ve=Tt*Tt,ee=Math.PI,ge=2*ee,Ee=ge-Tt,ye=ee/2,ce=ee/180,we=180/ee;function oa(t){return t>0?1:t<0?-1:0}function Qr(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(e[1]-t[1])*(n[0]-t[0])}function ua(t){return t>1?0:t<-1?ee:Math.acos(t)}function nn(t){return t>1?ye:t<-1?-ye:Math.asin(t)}function Cu(t){return((t=Math.exp(t))-1/t)/2}function sa(t){return((t=Math.exp(t))+1/t)/2}function Su(t){return((t=Math.exp(2*t))-1)/(t+1)}function la(t){return(t=Math.sin(t/2))*t}var In=Math.SQRT2,Jr=2,ca=4;i.interpolateZoom=function(t,e){var n=t[0],r=t[1],a=t[2],o=e[0],l=e[1],s=e[2],c=o-n,f=l-r,h=c*c+f*f,k,C;if(h<ve)C=Math.log(s/a)/In,k=function(ft){return[n+ft*c,r+ft*f,a*Math.exp(In*ft*C)]};else{var U=Math.sqrt(h),ct=(s*s-a*a+ca*h)/(2*a*Jr*U),Y=(s*s-a*a-ca*h)/(2*s*Jr*U),X=Math.log(Math.sqrt(ct*ct+1)-ct),Z=Math.log(Math.sqrt(Y*Y+1)-Y);C=(Z-X)/In,k=function(ft){var it=ft*C,ut=sa(X),Mt=a/(Jr*U)*(ut*Su(In*it+X)-Cu(X));return[n+Mt*c,r+Mt*f,a*ut/sa(In*it+X)]}}return k.duration=C*1e3,k},i.behavior.zoom=function(){var t={x:0,y:0,k:1},e,n,r,a=[960,500],o=fa,l=250,s=0,c="mousedown.zoom",f="mousemove.zoom",h="mouseup.zoom",k,C="touchstart.zoom",U,ct=ot(it,"zoomstart","zoom","zoomend"),Y,X,Z,ft;ti||(ti="onwheel"in E?(tr=function(){return-i.event.deltaY*(i.event.deltaMode?120:1)},"wheel"):"onmousewheel"in E?(tr=function(){return i.event.wheelDelta},"mousewheel"):(tr=function(){return-i.event.detail},"MozMousePixelScroll"));function it(Lt){Lt.on(c,Gt).on(ti+".zoom",Wt).on("dblclick.zoom",Vt).on(C,St)}it.event=function(Lt){Lt.each(function(){var It=ct.of(this,arguments),ne=t;bn?i.select(this).transition().each("start.zoom",function(){t=this.__chart__||{x:0,y:0,k:1},Bt(It)}).tween("zoom:zoom",function(){var le=a[0],he=a[1],me=n?n[0]:le/2,_e=n?n[1]:he/2,De=i.interpolateZoom([(me-t.x)/t.k,(_e-t.y)/t.k,le/t.k],[(me-ne.x)/ne.k,(_e-ne.y)/ne.k,le/ne.k]);return function(ze){var Fe=De(ze),We=le/Fe[2];this.__chart__=t={x:me-Fe[0]*We,y:_e-Fe[1]*We,k:We},Qt(It)}}).each("interrupt.zoom",function(){Yt(It)}).each("end.zoom",function(){Yt(It)}):(this.__chart__=t,Bt(It),Qt(It),Yt(It))})},it.translate=function(Lt){return arguments.length?(t={x:+Lt[0],y:+Lt[1],k:t.k},Ot(),it):[t.x,t.y]},it.scale=function(Lt){return arguments.length?(t={x:t.x,y:t.y,k:null},wt(+Lt),Ot(),it):t.k},it.scaleExtent=function(Lt){return arguments.length?(o=Lt==null?fa:[+Lt[0],+Lt[1]],it):o},it.center=function(Lt){return arguments.length?(r=Lt&&[+Lt[0],+Lt[1]],it):r},it.size=function(Lt){return arguments.length?(a=Lt&&[+Lt[0],+Lt[1]],it):a},it.duration=function(Lt){return arguments.length?(l=+Lt,it):l},it.x=function(Lt){return arguments.length?(X=Lt,Y=Lt.copy(),t={x:0,y:0,k:1},it):X},it.y=function(Lt){return arguments.length?(ft=Lt,Z=Lt.copy(),t={x:0,y:0,k:1},it):ft};function ut(Lt){return[(Lt[0]-t.x)/t.k,(Lt[1]-t.y)/t.k]}function Mt(Lt){return[Lt[0]*t.k+t.x,Lt[1]*t.k+t.y]}function wt(Lt){t.k=Math.max(o[0],Math.min(o[1],Lt))}function _t(Lt,It){It=Mt(It),t.x+=Lt[0]-It[0],t.y+=Lt[1]-It[1]}function bt(Lt,It,ne,le){Lt.__chart__={x:t.x,y:t.y,k:t.k},wt(Math.pow(2,le)),_t(n=It,ne),Lt=i.select(Lt),l>0&&(Lt=Lt.transition().duration(l)),Lt.call(it.event)}function Ot(){X&&X.domain(Y.range().map(function(Lt){return(Lt-t.x)/t.k}).map(Y.invert)),ft&&ft.domain(Z.range().map(function(Lt){return(Lt-t.y)/t.k}).map(Z.invert))}function Bt(Lt){s++||Lt({type:"zoomstart"})}function Qt(Lt){Ot(),Lt({type:"zoom",scale:t.k,translate:[t.x,t.y]})}function Yt(Lt){--s||(Lt({type:"zoomend"}),n=null)}function Gt(){var Lt=this,It=ct.of(Lt,arguments),ne=0,le=i.select(F(Lt)).on(f,_e).on(h,De),he=ut(i.mouse(Lt)),me=Ft(Lt);qr.call(Lt),Bt(It);function _e(){ne=1,_t(i.mouse(Lt),he),Qt(It)}function De(){le.on(f,null).on(h,null),me(ne),Yt(It)}}function St(){var Lt=this,It=ct.of(Lt,arguments),ne={},le=0,he,me=".zoom-"+i.event.changedTouches[0].identifier,_e="touchmove"+me,De="touchend"+me,ze=[],Fe=i.select(Lt),We=Ft(Lt);Pe(),Bt(It),Fe.on(c,null).on(C,Pe);function Ne(){var Xe=i.touches(Lt);return he=t.k,Xe.forEach(function(Se){Se.identifier in ne&&(ne[Se.identifier]=ut(Se))}),Xe}function Pe(){var Xe=i.event.target;i.select(Xe).on(_e,wn).on(De,vc),ze.push(Xe);for(var Se=i.event.changedTouches,Re=0,Ke=Se.length;Re<Ke;++Re)ne[Se[Re].identifier]=null;var Ve=Ne(),Pn=Date.now();if(Ve.length===1){if(Pn-U<500){var kn=Ve[0];bt(Lt,kn,ne[kn.identifier],Math.floor(Math.log(t.k)/Math.LN2)+1),B()}U=Pn}else if(Ve.length>1){var kn=Ve[0],cn=Ve[1],$r=kn[0]-cn[0],Mu=kn[1]-cn[1];le=$r*$r+Mu*Mu}}function wn(){var Xe=i.touches(Lt),Se,Re,Ke,Ve;qr.call(Lt);for(var Pn=0,kn=Xe.length;Pn<kn;++Pn,Ve=null)if(Ke=Xe[Pn],Ve=ne[Ke.identifier]){if(Re)break;Se=Ke,Re=Ve}if(Ve){var cn=(cn=Ke[0]-Se[0])*cn+(cn=Ke[1]-Se[1])*cn,$r=le&&Math.sqrt(cn/le);Se=[(Se[0]+Ke[0])/2,(Se[1]+Ke[1])/2],Re=[(Re[0]+Ve[0])/2,(Re[1]+Ve[1])/2],wt($r*he)}U=null,_t(Se,Re),Qt(It)}function vc(){if(i.event.touches.length){for(var Xe=i.event.changedTouches,Se=0,Re=Xe.length;Se<Re;++Se)delete ne[Xe[Se].identifier];for(var Ke in ne)return void Ne()}i.selectAll(ze).on(me,null),Fe.on(c,Gt).on(C,St),We(),Yt(It)}}function Wt(){var Lt=ct.of(this,arguments);k?clearTimeout(k):(qr.call(this),e=ut(n=r||i.mouse(this)),Bt(Lt)),k=setTimeout(function(){k=null,Yt(Lt)},50),B(),wt(Math.pow(2,tr()*.002)*t.k),_t(n,e),Qt(Lt)}function Vt(){var Lt=i.mouse(this),It=Math.log(t.k)/Math.LN2;bt(this,Lt,ut(Lt),i.event.shiftKey?Math.ceil(It)-1:Math.floor(It)+1)}return i.rebind(it,ct,"on")};var fa=[0,1/0],tr,ti;i.color=fn;function fn(){}fn.prototype.toString=function(){return this.rgb()+""},i.hsl=Ue;function Ue(t,e,n){return this instanceof Ue?(this.h=+t,this.s=+e,void(this.l=+n)):arguments.length<2?t instanceof Ue?new Ue(t.h,t.s,t.l):ya(""+t,xa,Ue):new Ue(t,e,n)}var ei=Ue.prototype=new fn;ei.brighter=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ue(this.h,this.s,this.l/t)},ei.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Ue(this.h,this.s,t*this.l)},ei.rgb=function(){return ni(this.h,this.s,this.l)};function ni(t,e,n){var r,a;t=isNaN(t)?0:(t%=360)<0?t+360:t,e=isNaN(e)||e<0?0:e>1?1:e,n=n<0?0:n>1?1:n,a=n<=.5?n*(1+e):n+e-n*e,r=2*n-a;function o(s){return s>360?s-=360:s<0&&(s+=360),s<60?r+(a-r)*s/60:s<180?a:s<240?r+(a-r)*(240-s)/60:r}function l(s){return Math.round(o(s)*255)}return new Te(l(t+120),l(t),l(t-120))}i.hcl=He;function He(t,e,n){return this instanceof He?(this.h=+t,this.c=+e,void(this.l=+n)):arguments.length<2?t instanceof He?new He(t.h,t.c,t.l):t instanceof Ye?va(t.l,t.a,t.b):va((t=ba((t=i.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new He(t,e,n)}var ri=He.prototype=new fn;ri.brighter=function(t){return new He(this.h,this.c,Math.min(100,this.l+er*(arguments.length?t:1)))},ri.darker=function(t){return new He(this.h,this.c,Math.max(0,this.l-er*(arguments.length?t:1)))},ri.rgb=function(){return ii(this.h,this.c,this.l).rgb()};function ii(t,e,n){return isNaN(t)&&(t=0),isNaN(e)&&(e=0),new Ye(n,Math.cos(t*=ce)*e,Math.sin(t)*e)}i.lab=Ye;function Ye(t,e,n){return this instanceof Ye?(this.l=+t,this.a=+e,void(this.b=+n)):arguments.length<2?t instanceof Ye?new Ye(t.l,t.a,t.b):t instanceof He?ii(t.h,t.c,t.l):ba((t=Te(t)).r,t.g,t.b):new Ye(t,e,n)}var er=18,da=.95047,ha=1,ga=1.08883,ai=Ye.prototype=new fn;ai.brighter=function(t){return new Ye(Math.min(100,this.l+er*(arguments.length?t:1)),this.a,this.b)},ai.darker=function(t){return new Ye(Math.max(0,this.l-er*(arguments.length?t:1)),this.a,this.b)},ai.rgb=function(){return pa(this.l,this.a,this.b)};function pa(t,e,n){var r=(t+16)/116,a=r+e/500,o=r-n/200;return a=oi(a)*da,r=oi(r)*ha,o=oi(o)*ga,new Te(si(3.2404542*a-1.5371385*r-.4985314*o),si(-.969266*a+1.8760108*r+.041556*o),si(.0556434*a-.2040259*r+1.0572252*o))}function va(t,e,n){return t>0?new He(Math.atan2(n,e)*we,Math.sqrt(e*e+n*n),t):new He(NaN,NaN,t)}function oi(t){return t>.206893034?t*t*t:(t-4/29)/7.787037}function ui(t){return t>.008856?Math.pow(t,1/3):7.787037*t+4/29}function si(t){return Math.round(255*(t<=.00304?12.92*t:1.055*Math.pow(t,1/2.4)-.055))}i.rgb=Te;function Te(t,e,n){return this instanceof Te?(this.r=~~t,this.g=~~e,void(this.b=~~n)):arguments.length<2?t instanceof Te?new Te(t.r,t.g,t.b):ya(""+t,Te,ni):new Te(t,e,n)}function ma(t){return new Te(t>>16,t>>8&255,t&255)}function nr(t){return ma(t)+""}var rr=Te.prototype=new fn;rr.brighter=function(t){t=Math.pow(.7,arguments.length?t:1);var e=this.r,n=this.g,r=this.b,a=30;return!e&&!n&&!r?new Te(a,a,a):(e&&e<a&&(e=a),n&&n<a&&(n=a),r&&r<a&&(r=a),new Te(Math.min(255,e/t),Math.min(255,n/t),Math.min(255,r/t)))},rr.darker=function(t){return t=Math.pow(.7,arguments.length?t:1),new Te(t*this.r,t*this.g,t*this.b)},rr.hsl=function(){return xa(this.r,this.g,this.b)},rr.toString=function(){return"#"+Mn(this.r)+Mn(this.g)+Mn(this.b)};function Mn(t){return t<16?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function ya(t,e,n){var r=0,a=0,o=0,l,s,c;if(l=/([a-z]+)\((.*)\)/.exec(t=t.toLowerCase()),l)switch(s=l[2].split(","),l[1]){case"hsl":return n(parseFloat(s[0]),parseFloat(s[1])/100,parseFloat(s[2])/100);case"rgb":return e(ci(s[0]),ci(s[1]),ci(s[2]))}return(c=ir.get(t))?e(c.r,c.g,c.b):(t!=null&&t.charAt(0)==="#"&&!isNaN(c=parseInt(t.slice(1),16))&&(t.length===4?(r=(c&3840)>>4,r=r>>4|r,a=c&240,a=a>>4|a,o=c&15,o=o<<4|o):t.length===7&&(r=(c&16711680)>>16,a=(c&65280)>>8,o=c&255)),e(r,a,o))}function xa(t,e,n){var r=Math.min(t/=255,e/=255,n/=255),a=Math.max(t,e,n),o=a-r,l,s,c=(a+r)/2;return o?(s=c<.5?o/(a+r):o/(2-a-r),t==a?l=(e-n)/o+(e<n?6:0):e==a?l=(n-t)/o+2:l=(t-e)/o+4,l*=60):(l=NaN,s=c>0&&c<1?0:l),new Ue(l,s,c)}function ba(t,e,n){t=li(t),e=li(e),n=li(n);var r=ui((.4124564*t+.3575761*e+.1804375*n)/da),a=ui((.2126729*t+.7151522*e+.072175*n)/ha),o=ui((.0193339*t+.119192*e+.9503041*n)/ga);return Ye(116*a-16,500*(r-a),200*(a-o))}function li(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function ci(t){var e=parseFloat(t);return t.charAt(t.length-1)==="%"?Math.round(e*2.55):e}var ir=i.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});ir.forEach(function(t,e){ir.set(t,ma(e))});function be(t){return typeof t=="function"?t:function(){return t}}i.functor=be,i.xhr=fi(nt);function fi(t){return function(e,n,r){return arguments.length===2&&typeof n=="function"&&(r=n,n=null),ar(e,n,t,r)}}function ar(t,e,n,r){var a={},o=i.dispatch("beforesend","progress","load","error"),l={},s=new XMLHttpRequest,c=null;this.XDomainRequest&&!("withCredentials"in s)&&/^(http(s)?:)?\/\//.test(t)&&(s=new XDomainRequest),"onload"in s?s.onload=s.onerror=f:s.onreadystatechange=function(){s.readyState>3&&f()};function f(){var h=s.status,k;if(!h&&Nu(s)||h>=200&&h<300||h===304){try{k=n.call(a,s)}catch(C){o.error.call(a,C);return}o.load.call(a,k)}else o.error.call(a,s)}return s.onprogress=function(h){var k=i.event;i.event=h;try{o.progress.call(a,s)}finally{i.event=k}},a.header=function(h,k){return h=(h+"").toLowerCase(),arguments.length<2?l[h]:(k==null?delete l[h]:l[h]=k+"",a)},a.mimeType=function(h){return arguments.length?(e=h==null?null:h+"",a):e},a.responseType=function(h){return arguments.length?(c=h,a):c},a.response=function(h){return n=h,a},["get","post"].forEach(function(h){a[h]=function(){return a.send.apply(a,[h].concat(m(arguments)))}}),a.send=function(h,k,C){if(arguments.length===2&&typeof k=="function"&&(C=k,k=null),s.open(h,t,!0),e!=null&&!("accept"in l)&&(l.accept=e+",*/*"),s.setRequestHeader)for(var U in l)s.setRequestHeader(U,l[U]);return e!=null&&s.overrideMimeType&&s.overrideMimeType(e),c!=null&&(s.responseType=c),C!=null&&a.on("error",C).on("load",function(ct){C(null,ct)}),o.beforesend.call(a,s),s.send(k??null),a},a.abort=function(){return s.abort(),a},i.rebind(a,o,"on"),r==null?a:a.get(Lu(r))}function Lu(t){return t.length===1?function(e,n){t(e==null?n:null)}:t}function Nu(t){var e=t.responseType;return e&&e!=="text"?t.response:t.responseText}i.dsv=function(t,e){var n=new RegExp('["'+t+` 2]`),r=t.charCodeAt(0);function a(f,h,k){arguments.length<3&&(k=h,h=null);var C=ar(f,e,h==null?o:l(h),k);return C.row=function(U){return arguments.length?C.response((h=U)==null?o:l(U)):h},C}function o(f){return a.parse(f.responseText)}function l(f){return function(h){return a.parse(h.responseText,f)}}a.parse=function(f,h){var k;return a.parseRows(f,function(C,U){if(k)return k(C,U-1);var ct=new Function("d","return {"+C.map(function(Y,X){return JSON.stringify(Y)+": d["+X+"]"}).join(",")+"}");k=h?function(Y,X){return h(ct(Y),X)}:ct})},a.parseRows=function(f,h){var k={},C={},U=[],ct=f.length,Y=0,X=0,Z,ft;function it(){if(Y>=ct)return C;if(ft)return ft=!1,k;var Mt=Y;if(f.charCodeAt(Mt)===34){for(var wt=Mt;wt++<ct;)if(f.charCodeAt(wt)===34){if(f.charCodeAt(wt+1)!==34)break;++wt}Y=wt+2;var _t=f.charCodeAt(wt+1);return _t===13?(ft=!0,f.charCodeAt(wt+2)===10&&++Y):_t===10&&(ft=!0),f.slice(Mt+1,wt).replace(/""/g,'"')}for(;Y<ct;){var _t=f.charCodeAt(Y++),bt=1;if(_t===10)ft=!0;else if(_t===13)ft=!0,f.charCodeAt(Y)===10&&(++Y,++bt);else if(_t!==r)continue;return f.slice(Mt,Y-bt)}return f.slice(Mt)}for(;(Z=it())!==C;){for(var ut=[];Z!==k&&Z!==C;)ut.push(Z),Z=it();h&&(ut=h(ut,X++))==null||U.push(ut)}return U},a.format=function(f){if(Array.isArray(f[0]))return a.formatRows(f);var h=new M,k=[];return f.forEach(function(C){for(var U in C)h.has(U)||k.push(h.add(U))}),[k.map(c).join(t)].concat(f.map(function(C){return k.map(function(U){return c(C[U])}).join(t)})).join(` 3`)},a.formatRows=function(f){return f.map(s).join(` 4`)};function s(f){return f.map(c).join(t)}function c(f){return n.test(f)?'"'+f.replace(/\"/g,'""')+'"':f}return a},i.csv=i.dsv(",","text/csv"),i.tsv=i.dsv(" ","text/tab-separated-values");var or,ur,sr,lr,_a=this[xt(this,"requestAnimationFrame")]||function(t){setTimeout(t,17)};i.timer=function(){cr.apply(this,arguments)};function cr(t,e,n){var r=arguments.length;r<2&&(e=0),r<3&&(n=Date.now());var a=n+e,o={c:t,t:a,n:null};return ur?ur.n=o:or=o,ur=o,sr||(lr=clearTimeout(lr),sr=1,_a(di)),o}function di(){var t=wa(),e=ka()-t;e>
424?(isFinite(e)&&(clearTimeout(lr),lr=setTimeout(di,e)),sr=0):(sr=1,_a(di))}i.timer.flush=function(){wa(),ka()};function wa(){for(var t=Date.now(),e=or;e;)t>=e.t&&e.c(t-e.t)&&(e.c=null),e=e.n;return t}function ka(){for(var t,e=or,n=1/0;e;)e.c?(e.t<n&&(n=e.t),e=(t=e).n):e=t?t.n=e.n:or=e.n;return ur=t,n}function hi(t,e){return e-(t?Math.ceil(Math.log(t)/Math.LN10):1)}i.round=function(t,e){return e?Math.round(t*(e=Math.pow(10,e)))/e:Math.round(t)};var Du=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map(Fu);i.formatPrefix=function(t,e){var n=0;return(t=+t)&&(t<0&&(t*=-1),e&&(t=i.round(t,hi(t,e))),n=1+Math.floor(1e-12+Math.log(t)/Math.LN10),n=Math.max(-24,Math.min(24,Math.floor((n-1)/3)*3))),Du[8+n/3]};function Fu(t,e){var n=Math.pow(10,I(8-e)*3);return{scale:e>8?function(r){return r/n}:function(r){return r*n},symbol:t}}function Ou(t){var e=t.decimal,n=t.thousands,r=t.grouping,a=t.currency,o=r&&n?function(l,s){for(var c=l.length,f=[],h=0,k=r[0],C=0;c>0&&k>0&&(C+k+1>s&&(k=Math.max(1,s-C)),f.push(l.substring(c-=k,c+k)),!((C+=k+1)>s));)k=r[h=(h+1)%r.length];return f.reverse().join(n)}:nt;return function(l){var s=Ma.exec(l),c=s[1]||" ",f=s[2]||">",h=s[3]||"-",k=s[4]||"",C=s[5],U=+s[6],ct=s[7],Y=s[8],X=s[9],Z=1,ft="",it="",ut=!1,Mt=!0;switch(Y&&(Y=+Y.substring(1)),(C||c==="0"&&f==="=")&&(C=c="0",f="="),X){case"n":ct=!0,X="g";break;case"%":Z=100,it="%",X="f";break;case"p":Z=100,it="%",X="r";break;case"b":case"o":case"x":case"X":k==="#"&&(ft="0"+X.toLowerCase());case"c":Mt=!1;case"d":ut=!0,Y=0;break;case"s":Z=-1,X="r";break}k==="$"&&(ft=a[0],it=a[1]),X=="r"&&!Y&&(X="g"),Y!=null&&(X=="g"?Y=Math.max(1,Math.min(21,Y)):(X=="e"||X=="f")&&(Y=Math.max(0,Math.min(20,Y)))),X=zu.get(X)||Tu;var wt=C&&ct;return function(_t){var bt=it;if(ut&&_t%1)return"";var Ot=_t<0||_t===0&&1/_t<0?(_t=-_t,"-"):h==="-"?"":h;if(Z<0){var Bt=i.formatPrefix(_t,Y);_t=Bt.scale(_t),bt=Bt.symbol+it}else _t*=Z;_t=X(_t,Y);var Qt=_t.lastIndexOf("."),Yt,Gt;if(Qt<0){var St=Mt?_t.lastIndexOf("e"):-1;St<0?(Yt=_t,Gt=""):(Yt=_t.substring(0,St),Gt=_t.substring(St))}else Yt=_t.substring(0,Qt),Gt=e+_t.substring(Qt+1);!C&&ct&&(Yt=o(Yt,1/0));var Wt=ft.length+Yt.length+Gt.length+(wt?0:Ot.length),Vt=Wt<U?new Array(Wt=U-Wt+1).join(c):"";return wt&&(Yt=o(Vt+Yt,Vt.length?U-Gt.length:1/0)),Ot+=ft,_t=Yt+Gt,(f==="<"?Ot+_t+Vt:f===">"?Vt+Ot+_t:f==="^"?Vt.substring(0,Wt>>=1)+Ot+_t+Vt.substring(Wt):Ot+(wt?_t:Vt+_t))+bt}}}var Ma=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,zu=i.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,e){return t.toPrecision(e)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},r:function(t,e){return(t=i.round(t,hi(t,e))).toFixed(Math.max(0,Math.min(20,hi(t*(1+1e-15),e))))}});function Tu(t){return t+""}var re=i.time={},Le=Date;function Qe(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}Qe.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(){Je.setUTCDate.apply(this._,arguments)},setDay:function(){Je.setUTCDay.apply(this._,arguments)},setFullYear:function(){Je.setUTCFullYear.apply(this._,arguments)},setHours:function(){Je.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){Je.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){Je.setUTCMinutes.apply(this._,arguments)},setMonth:function(){Je.setUTCMonth.apply(this._,arguments)},setSeconds:function(){Je.setUTCSeconds.apply(this._,arguments)},setTime:function(){Je.setTime.apply(this._,arguments)}};var Je=Date.prototype;function dn(t,e,n){function r(f){var h=t(f),k=o(h,1);return f-h<k-f?h:k}function a(f){return e(f=t(new Le(f-1)),1),f}function o(f,h){return e(f=new Le(+f),h),f}function l(f,h,k){var C=a(f),U=[];if(k>1)for(;C<h;)n(C)%k||U.push(new Date(+C)),e(C,1);else for(;C<h;)U.push(new Date(+C)),e(C,1);return U}function s(f,h,k){try{Le=Qe;var C=new Qe;return C._=f,l(C,h,k)}finally{Le=Date}}t.floor=t,t.round=r,t.ceil=a,t.offset=o,t.range=l;var c=t.utc=fr(t);return c.floor=c,c.round=fr(r),c.ceil=fr(a),c.offset=fr(o),c.range=s,t}function fr(t){return function(e,n){try{Le=Qe;var r=new Qe;return r._=e,t(r,n)._}finally{Le=Date}}}re.year=dn(function(t){return t=re.day(t),t.setMonth(0,1),t},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t){return t.getFullYear()}),re.years=re.year.range,re.years.utc=re.year.utc.range,re.day=dn(function(t){var e=new Le(2e3,0);return e.setFullYear(t.getFullYear(),t.getMonth(),t.getDate()),e},function(t,e){t.setDate(t.getDate()+e)},function(t){return t.getDate()-1}),re.days=re.day.range,re.days.utc=re.day.utc.range,re.dayOfYear=function(t){var e=re.year(t);return Math.floor((t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach(function(t,e){e=7-e;var n=re[t]=dn(function(r){return(r=re.day(r)).setDate(r.getDate()-(r.getDay()+e)%7),r},function(r,a){r.setDate(r.getDate()+Math.floor(a)*7)},function(r){var a=re.year(r).getDay();
4return Math.floor((re.dayOfYear(r)+(a+e)%7)/7)-(a!==e)});re[t+"s"]=n.range,re[t+"s"].utc=n.utc.range,re[t+"OfYear"]=function(r){var a=re.year(r).getDay();return Math.floor((re.dayOfYear(r)+(a+e)%7)/7)}}),re.week=re.sunday,re.weeks=re.sunday.range,re.weeks.utc=re.sunday.utc.range,re.weekOfYear=re.sundayOfYear;function Wu(t){var e=t.dateTime,n=t.date,r=t.time,a=t.periods,o=t.days,l=t.shortDays,s=t.months,c=t.shortMonths;function f(St){var Wt=St.length;function Vt(Lt){for(var It=[],ne=-1,le=0,he,me,_e;++ne<Wt;)St.charCodeAt(ne)===37&&(It.push(St.slice(le,ne)),(me=Aa[he=St.charAt(++ne)])!=null&&(he=St.charAt(++ne)),(_e=ut[he])&&(he=_e(Lt,me??(he==="e"?" ":"0"))),It.push(he),le=ne+1);return It.push(St.slice(le,ne)),It.join("")}return Vt.parse=function(Lt){var It={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null},ne=h(It,St,Lt,0);if(ne!=Lt.length)return null;"p"in It&&(It.H=It.H%12+It.p*12);var le=It.Z!=null&&Le!==Qe,he=new(le?Qe:Le);return"j"in It?he.setFullYear(It.y,0,It.j):"W"in It||"U"in It?("w"in It||(It.w="W"in It?1:0),he.setFullYear(It.y,0,1),he.setFullYear(It.y,0,"W"in It?(It.w+6)%7+It.W*7-(he.getDay()+5)%7:It.w+It.U*7-(he.getDay()+6)%7)):he.setFullYear(It.y,It.m,It.d),he.setHours(It.H+(It.Z/100|0),It.M+It.Z%100,It.S,It.L),le?he._:he},Vt.toString=function(){return St},Vt}function h(St,Wt,Vt,Lt){for(var It,ne,le,he=0,me=Wt.length,_e=Vt.length;he<me;){if(Lt>=_e)return-1;if(It=Wt.charCodeAt(he++),It===37){if(le=Wt.charAt(he++),ne=Mt[le in Aa?Wt.charAt(he++):le],!ne||(Lt=ne(St,Vt,Lt))<0)return-1}else if(It!=Vt.charCodeAt(Lt++))return-1}return Lt}f.utc=function(St){var Wt=f(St);function Vt(Lt){try{Le=Qe;var It=new Le;return It._=Lt,Wt(It)}finally{Le=Date}}return Vt.parse=function(Lt){try{Le=Qe;var It=Wt.parse(Lt);return It&&It._}finally{Le=Date}},Vt.toString=Wt.toString,Vt},f.multi=f.utc.multi=Ku;var k=i.map(),C=dr(o),U=hr(o),ct=dr(l),Y=hr(l),X=dr(s),Z=hr(s),ft=dr(c),it=hr(c);a.forEach(function(St,Wt){k.set(St.toLowerCase(),Wt)});var ut={a:function(St){return l[St.getDay()]},A:function(St){return o[St.getDay()]},b:function(St){return c[St.getMonth()]},B:function(St){return s[St.getMonth()]},c:f(e),d:function(St,Wt){return Oe(St.getDate(),Wt,2)},e:function(St,Wt){return Oe(St.getDate(),Wt,2)},H:function(St,Wt){return Oe(St.getHours(),Wt,2)},I:function(St,Wt){return Oe(St.getHours()%12||12,Wt,2)},j:function(St,Wt){return Oe(1+re.dayOfYear(St),Wt,3)},L:function(St,Wt){return Oe(St.getMilliseconds(),Wt,3)},m:function(St,Wt){return Oe(St.getMonth()+1,Wt,2)},M:function(St,Wt){return Oe(St.getMinutes(),Wt,2)},p:function(St){return a[+(St.getHours()>=12)]},S:function(St,Wt){return Oe(St.getSeconds(),Wt,2)},U:function(St,Wt){return Oe(re.sundayOfYear(St),Wt,2)},w:function(St){return St.getDay()},W:function(St,Wt){return Oe(re.mondayOfYear(St),Wt,2)},x:f(n),X:f(r),y:function(St,Wt){return Oe(St.getFullYear()%100,Wt,2)},Y:function(St,Wt){return Oe(St.getFullYear()%1e4,Wt,4)},Z:$u,"%":function(){return"%"}},Mt={a:wt,A:_t,b:bt,B:Ot,c:Bt,d:Ca,e:Ca,H:Sa,I:Sa,j:qu,L:Uu,m:ju,M:Gu,p:Gt,S:Xu,U:Bu,w:Pu,W:Iu,x:Qt,X:Yt,y:Vu,Y:Ru,Z:Hu,"%":Zu};function wt(St,Wt,Vt){ct.lastIndex=0;var Lt=ct.exec(Wt.slice(Vt));return Lt?(St.w=Y.get(Lt[0].toLowerCase()),Vt+Lt[0].length):-1}function _t(St,Wt,Vt){C.lastIndex=0;var Lt=C.exec(Wt.slice(Vt));return Lt?(St.w=U.get(Lt[0].toLowerCase()),Vt+Lt[0].length):-1}function bt(St,Wt,Vt){ft.lastIndex=0;var Lt=ft.exec(Wt.slice(Vt));return Lt?(St.m=it.get(Lt[0].toLowerCase()),Vt+Lt[0].length):-1}function Ot(St,Wt,Vt){X.lastIndex=0;var Lt=X.exec(Wt.slice(Vt));return Lt?(St.m=Z.get(Lt[0].toLowerCase()),Vt+Lt[0].length):-1}function Bt(St,Wt,Vt){return h(St,ut.c.toString(),Wt,Vt)}function Qt(St,Wt,Vt){return h(St,ut.x.toString(),Wt,Vt)}function Yt(St,Wt,Vt){return h(St,ut.X.toString(),Wt,Vt)}function Gt(St,Wt,Vt){var Lt=k.get(Wt.slice(Vt,Vt+=2).toLowerCase());return Lt==null?-1:(St.p=Lt,Vt)}return f}var Aa={"-":"",_:" ",0:"0"},Me=/^\s*\d+/,Ea=/^%/;function Oe(t,e,n){var r=t<0?"-":"",a=(r?-t:t)+"",o=a.length;return r+(o<n?new Array(n-o+1).join(e)+a:a)}function dr(t){return new RegExp("^(?:"+t.map(i.requote).join("|")+")","i")}function hr(t){for(var e=new b,n=-1,r=t.length;++n<r;)e.set(t[n].toLowerCase(),n);return e}function Pu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Bu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n));return r?(t.U=+r[0],n+r[0].length):-1}function Iu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n));return r?(t.W=+r[0],n+r[0].length):-1}function Ru(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function Vu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.y=Yu(+r[0]),n+r[0].length):-1}function Hu(t,e,n){return/^[+-]\d{4}$/.test(e=e.slice(n,n+5))?(t.Z=-e,n+5):-1}function Yu(t){return t+(t>68?1900:2e3)}function ju(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Ca(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function qu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+3));return r?(t.j=+r[0],n+r[0].length):-1}function Sa(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Gu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Xu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Uu(t,e,n){Me.lastIndex=0;var r=Me.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function $u(t){var e=t.getTimezoneOffset(),n=e>0?"-":"+",r=I(e)/60|0,a=I(e)%60;return n+Oe(r,"0",2)+Oe(a,"0",2)}function Zu(t,e,n){Ea.lastIndex=0;var r=Ea.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ku(t){for(var e=t.length,n=-1;++n<e;)t[n][0]=this(t[n][0]);return function(r){for(var a=0,o=t[a];!o[1](r);)o=t[++a];return o[0](r)}}i.locale=function(t){return{numberFormat:Ou(t),timeFormat:Wu(t)}};var La=i.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","Frid
4ay","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"]});i.format=La.numberFormat,i.geo={};function gi(){}gi.prototype={s:0,t:0,add:function(t){Na(t,this.t,gr),Na(gr.s,this.s,this),this.s?this.t+=gr.t:this.s=gr.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var gr=new gi;function Na(t,e,n){var r=n.s=t+e,a=r-t,o=r-a;n.t=t-o+(e-a)}i.geo.stream=function(t,e){t&&Da.hasOwnProperty(t.type)?Da[t.type](t,e):pr(t,e)};function pr(t,e){t&&Fa.hasOwnProperty(t.type)&&Fa[t.type](t,e)}var Da={Feature:function(t,e){pr(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,a=n.length;++r<a;)pr(n[r].geometry,e)}},Fa={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){pi(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)pi(n[r],e,0)},Polygon:function(t,e){Oa(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)Oa(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,a=n.length;++r<a;)pr(n[r],e)}};function pi(t,e,n){var r=-1,a=t.length-n,o;for(e.lineStart();++r<a;)o=t[r],e.point(o[0],o[1],o[2]);e.lineEnd()}function Oa(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)pi(t[n],e,1);e.polygonEnd()}i.geo.area=function(t){return vr=0,i.geo.stream(t,Be),vr};var vr,hn=new gi,Be={sphere:function(){vr+=4*ee},point:R,lineStart:R,lineEnd:R,polygonStart:function(){hn.reset(),Be.lineStart=Qu},polygonEnd:function(){var t=2*hn;vr+=t<0?4*ee+t:t,Be.lineStart=Be.lineEnd=Be.point=R}};function Qu(){var t,e,n,r,a;Be.point=function(l,s){Be.point=o,n=(t=l)*ce,r=Math.cos(s=(e=s)*ce/2+ee/4),a=Math.sin(s)};function o(l,s){l*=ce,s=s*ce/2+ee/4;var c=l-n,f=c>=0?1:-1,h=f*c,k=Math.cos(s),C=Math.sin(s),U=a*C,ct=r*k+U*Math.cos(h),Y=U*f*Math.sin(h);hn.add(Math.atan2(Y,ct)),n=l,r=k,a=C}Be.lineEnd=function(){o(t,e)}}function gn(t){var e=t[0],n=t[1],r=Math.cos(n);return[r*Math.cos(e),r*Math.sin(e),Math.sin(n)]}function mr(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function An(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function vi(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function yr(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function xr(t){var e=Math.sqrt(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function br(t){return[Math.atan2(t[1],t[0]),nn(t[2])]}function _r(t,e){return I(t[0]-e[0])<Tt&&I(t[1]-e[1])<Tt}i.geo.bounds=function(){var t,e,n,r,a,o,l,s,c,f,h,k={point:C,lineStart:ct,lineEnd:Y,polygonStart:function(){k.point=X,k.lineStart=Z,k.lineEnd=ft,c=0,Be.polygonStart()},polygonEnd:function(){Be.polygonEnd(),k.point=C,k.lineStart=ct,k.lineEnd=Y,hn<0?(t=-(n=180),e=-(r=90)):c>Tt?r=90:c<-Tt&&(e=-90),h[0]=t,h[1]=n}};function C(wt,_t){f.push(h=[t=wt,n=wt]),_t<e&&(e=_t),_t>r&&(r=_t)}function U(wt,_t){var bt=gn([wt*ce,_t*ce]);if(s){var Ot=An(s,bt),Bt=[Ot[1],-Ot[0],0],Qt=An(Bt,Ot);xr(Qt),Qt=br(Qt);var Yt=wt-a,Gt=Yt>0?1:-1,St=Qt[0]*we*Gt,Wt=I(Yt)>180;if(Wt^(Gt*a<St&&St<Gt*wt)){var Vt=Qt[1]*we;Vt>r&&(r=Vt)}else if(St=(St+360)%360-180,Wt^(Gt*a<St&&St<Gt*wt)){var Vt=-Qt[1]*we;Vt<e&&(e=Vt)}else _t<e&&(e=_t),_t>r&&(r=_t);Wt?wt<a?it(t,wt)>it(t,n)&&(n=wt):it(wt,n)>it(t,n)&&(t=wt):n>=t?(wt<t&&(t=wt),wt>n&&(n=wt)):wt>a?it(t,wt)>it(t,n)&&(n=wt):it(wt,n)>it(t,n)&&(t=wt)}else C(wt,_t);s=bt,a=wt}function ct(){k.point=U}function Y(){h[0]=t,h[1]=n,k.point=C,s=null}function X(wt,_t){if(s){var bt=wt-a;c+=I(bt)>180?bt+(bt>0?360:-360):bt}else o=wt,l=_t;Be.point(wt,_t),U(wt,_t)}function Z(){Be.lineStart()}function ft(){X(o,l),Be.lineEnd(),I(c)>Tt&&(t=-(n=180)),h[0]=t,h[1]=n,s=null}function it(wt,_t){return(_t-=wt)<0?_t+360:_t}function ut(wt,_t){return wt[0]-_t[0]}function Mt(wt,_t){return _t[0]<=_t[1]?_t[0]<=wt&&wt<=_t[1]:wt<_t[0]||_t[1]<wt}return function(wt){r=n=-(t=e=1/0),f=[],i.geo.stream(wt,k);var _t=f.length;if(_t){f.sort(ut);for(var bt=1,Ot=f[0],Bt,Qt=[Ot];bt<_t;++bt)Bt=f[bt],Mt(Bt[0],Ot)||Mt(Bt[1],Ot)?(it(Ot[0],Bt[1])>it(Ot[0],Ot[1])&&(Ot[1]=Bt[1]),it(Bt[0],Ot[1])>it(Ot[0],Ot[1])&&(Ot[0]=Bt[0])):Qt.push(Ot=Bt);for(var Yt=-1/0,Gt,_t=Qt.length-1,bt=0,Ot=Qt[_t],Bt;bt<=_t;Ot=Bt,++bt)Bt=Qt[bt],(Gt=it(Ot[1],Bt[0]))>Yt&&(Yt=Gt,t=Bt[0],n=Ot[1])}return f=h=null,t===1/0||e===1/0?[[NaN,NaN],[NaN,NaN]]:[[t,e],[n,r]]}}(),i.geo.centroid=function(t){Rn=wr=pn=vn=tn=rn=an=$e=En=Cn=on=0,i.geo.stream(t,je);var e=En,n=Cn,r=on,a=e*e+n*n+r*r;return a<ve&&(e=rn,n=an,r=$e,wr<Tt&&(e=pn,n=vn,r=tn),a=e*e+n*n+r*r,a<ve)?[NaN,NaN]:[Math.atan2(n,e)*we,nn(r/Math.sqrt(a))*we]};var Rn,wr,pn,vn,tn,rn,an,$e,En,Cn,on,je={sphere:R,point:mi,lineStart:za,lineEnd:Ta,polygonStart:function(){je.lineStart=Ju},polygonEnd:function(){je.lineStart=za}};function mi(t,e){t*=ce;var n=Math.cos(e*=ce);Vn(n*Math.cos(t),n*Math.sin(t),Math.sin(e))}function Vn(t,e,n){++Rn,pn+=(t-pn)/Rn,vn+=(e-vn)/Rn,tn+=(n-tn)/Rn}function za(){var t,e,n;je.point=function(a,o){a*=ce;var l=Math.cos(o*=ce);t=l*Math.cos(a),e=l*Math.sin(a),n=Math.sin(o),je.point=r,Vn(t,e,n)};function r(a,o){a*=ce;var l=Math.cos(o*=ce),s=l*Math.cos(a),c=l*Math.sin(a),f=Math.sin(o),h=Math.atan2(Math.sqrt((h=e*f-n*c)*h+(h=n*s-t*f)*h+(h=t*c-e*s)*h),t*s+e*c+n*f);wr+=h,rn+=h*(t+(t=s)),an+=h*(e+(e=c)),$e+=h*(n+(n=f)),Vn(t,e,n)}}function Ta(){je.point=mi}function Ju(){var t,e,n,r,a;je.point=function(l,s){t=l,e=s,je.point=o,l*=ce;var c=Math.cos(s*=ce);n=c*Math.cos(l),r=c*Math.sin(l),a=Math.sin(s),Vn(n,r,a)},je.lineEnd=function(){o(t,e),je.lineEnd=Ta,je.point=mi};function o(l,s){l*=ce;var c=Math.cos(s*=ce),f=c*Math.cos(l),h=c*Math.sin(l),k=Math.sin(s),C=r*k-a*h,U=a*f-n*k,ct=n*h-r*f,Y=Math.sqrt(C*C+U*U+ct*ct),X=n*f+r*h+a*k,Z=Y&&-ua(X)/Y,ft=Math.atan2(Y,X);En+=Z*C,Cn+=Z*U,on+=Z*ct,wr+=ft,rn+=ft*(n+(n=f)),an+=ft*(r+(r=h)),$e+=ft*(a+(a=k)),Vn(n,r,a)}}function Wa(t,e){function n(r,a){return r=t(r,a),e(r[0],r[1])}return t.invert&&e.invert&&(n.invert=function(r,a){return r=e.invert(r,a),r&&t.invert(r[0],r[1])}),n}function Hn(){return!0}function Pa(t,e,n,r,a){var o=[],l=[];
4if(t.forEach(function(Y){if(!((X=Y.length-1)<=0)){var X,Z=Y[0],ft=Y[X];if(_r(Z,ft)){a.lineStart();for(var it=0;it<X;++it)a.point((Z=Y[it])[0],Z[1]);a.lineEnd();return}var ut=new kr(Z,Y,null,!0),Mt=new kr(Z,null,ut,!1);ut.o=Mt,o.push(ut),l.push(Mt),ut=new kr(ft,Y,null,!1),Mt=new kr(ft,null,ut,!0),ut.o=Mt,o.push(ut),l.push(Mt)}}),l.sort(e),Ba(o),Ba(l),!!o.length){for(var s=0,c=n,f=l.length;s<f;++s)l[s].e=c=!c;for(var h=o[0],k,C;;){for(var U=h,ct=!0;U.v;)if((U=U.n)===h)return;k=U.z,a.lineStart();do{if(U.v=U.o.v=!0,U.e){if(ct)for(var s=0,f=k.length;s<f;++s)a.point((C=k[s])[0],C[1]);else r(U.x,U.n.x,1,a);U=U.n}else{if(ct){k=U.p.z;for(var s=k.length-1;s>=0;--s)a.point((C=k[s])[0],C[1])}else r(U.x,U.p.x,-1,a);U=U.p}U=U.o,k=U.z,ct=!ct}while(!U.v);a.lineEnd()}}}function Ba(t){if(e=t.length){for(var e,n=0,r=t[0],a;++n<e;)r.n=a=t[n],a.p=r,r=a;r.n=a=t[0],a.p=r}}function kr(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function Ia(t,e,n,r){return function(a,o){var l=e(o),s=a.invert(r[0],r[1]),c={point:f,lineStart:k,lineEnd:C,polygonStart:function(){c.point=it,c.lineStart=ut,c.lineEnd=Mt,U=[],Z=[]},polygonEnd:function(){c.point=f,c.lineStart=k,c.lineEnd=C,U=i.merge(U);var wt=as(s,Z);U.length?(X||(o.polygonStart(),X=!0),Pa(U,es,wt,n,o)):wt&&(X||(o.polygonStart(),X=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),X&&(o.polygonEnd(),X=!1),U=Z=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function f(wt,_t){var bt=a(wt,_t);t(wt=bt[0],_t=bt[1])&&o.point(wt,_t)}function h(wt,_t){var bt=a(wt,_t);l.point(bt[0],bt[1])}function k(){c.point=h,l.lineStart()}function C(){c.point=f,l.lineEnd()}var U,ct=Ra(),Y=e(ct),X=!1,Z,ft;function it(wt,_t){ft.push([wt,_t]);var bt=a(wt,_t);Y.point(bt[0],bt[1])}function ut(){Y.lineStart(),ft=[]}function Mt(){it(ft[0][0],ft[0][1]),Y.lineEnd();var wt=Y.clean(),_t=ct.buffer(),bt,Ot=_t.length;if(ft.pop(),Z.push(ft),ft=null,!!Ot){if(wt&1){bt=_t[0];var Ot=bt.length-1,Bt=-1,Qt;if(Ot>
40){for(X||(o.polygonStart(),X=!0),o.lineStart();++Bt<Ot;)o.point((Qt=bt[Bt])[0],Qt[1]);o.lineEnd()}return}Ot>1&&wt&2&&_t.push(_t.pop().concat(_t.shift())),U.push(_t.filter(ts))}}return c}}function ts(t){return t.length>1}function Ra(){var t=[],e;return{lineStart:function(){t.push(e=[])},point:function(n,r){e.push([n,r])},lineEnd:R,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function es(t,e){return((t=t.x)[0]<0?t[1]-ye-Tt:ye-t[1])-((e=e.x)[0]<0?e[1]-ye-Tt:ye-e[1])}var Va=Ia(Hn,ns,is,[-ee,-ee/2]);function ns(t){var e=NaN,n=NaN,r=NaN,a;return{lineStart:function(){t.lineStart(),a=1},point:function(o,l){var s=o>0?ee:-ee,c=I(o-e);I(c-ee)<Tt?(t.point(e,n=(n+l)/2>0?ye:-ye),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),t.point(o,n),a=0):r!==s&&c>=ee&&(I(e-r)<Tt&&(e-=r*Tt),I(o-s)<Tt&&(o-=s*Tt),n=rs(e,n,o,l),t.point(r,n),t.lineEnd(),t.lineStart(),t.point(s,n),a=0),t.point(e=o,n=l),r=s},lineEnd:function(){t.lineEnd(),e=n=NaN},clean:function(){return 2-a}}}function rs(t,e,n,r){var a,o,l=Math.sin(t-n);return I(l)>Tt?Math.atan((Math.sin(e)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(a=Math.cos(e))*Math.sin(t))/(a*o*l)):(e+r)/2}function is(t,e,n,r){var a;if(t==null)a=n*ye,r.point(-ee,a),r.point(0,a),r.point(ee,a),r.point(ee,0),r.point(ee,-a),r.point(0,-a),r.point(-ee,-a),r.point(-ee,0),r.point(-ee,a);else if(I(t[0]-e[0])>Tt){var o=t[0]<e[0]?ee:-ee;a=n*o/2,r.point(-o,a),r.point(0,a),r.point(o,a)}else r.point(e[0],e[1])}function as(t,e){var n=t[0],r=t[1],a=[Math.sin(n),-Math.cos(n),0],o=0,l=0;hn.reset();for(var s=0,c=e.length;s<c;++s){var f=e[s],h=f.length;if(h)for(var k=f[0],C=k[0],U=k[1]/2+ee/4,ct=Math.sin(U),Y=Math.cos(U),X=1;;){X===h&&(X=0),t=f[X];var Z=t[0],ft=t[1]/2+ee/4,it=Math.sin(ft),ut=Math.cos(ft),Mt=Z-C,wt=Mt>=0?1:-1,_t=wt*Mt,bt=_t>ee,Ot=ct*it;if(hn.add(Math.atan2(Ot*wt*Math.sin(_t),Y*ut+Ot*Math.cos(_t))),o+=bt?Mt+wt*ge:Mt,bt^C>=n^Z>=n){var Bt=An(gn(k),gn(t));xr(Bt);var Qt=An(a,Bt);xr(Qt);var Yt=(bt^Mt>=0?-1:1)*nn(Qt[2]);(r>Yt||r===Yt&&(Bt[0]||Bt[1]))&&(l+=bt^Mt>=0?1:-1)}if(!X++)break;C=Z,ct=it,Y=ut,k=t}}return(o<-Tt||o<Tt&&hn<-Tt)^l&1}function os(t){var e=Math.cos(t),n=e>0,r=I(e)>Tt,a=ki(t,6*ce);return Ia(o,l,a,n?[0,-t]:[-ee,t-ee]);function o(f,h){return Math.cos(f)*Math.cos(h)>e}function l(f){var h,k,C,U,ct;return{lineStart:function(){U=C=!1,ct=1},point:function(Y,X){var Z=[Y,X],ft,it=o(Y,X),ut=n?it?0:c(Y,X):it?c(Y+(Y<0?ee:-ee),X):0;if(!h&&(U=C=it)&&f.lineStart(),it!==C&&(ft=s(h,Z),(_r(h,ft)||_r(Z,ft))&&(Z[0]+=Tt,Z[1]+=Tt,it=o(Z[0],Z[1]))),it!==C)ct=0,it?(f.lineStart(),ft=s(Z,h),f.point(ft[0],ft[1])):(ft=s(h,Z),f.point(ft[0],ft[1]),f.lineEnd()),h=ft;else if(r&&h&&n^it){var Mt;!(ut&k)&&(Mt=s(Z,h,!0))&&(ct=0,n?(f.lineStart(),f.point(Mt[0][0],Mt[0][1]),f.point(Mt[1][0],Mt[1][1]),f.lineEnd()):(f.point(Mt[1][0],Mt[1][1]),f.lineEnd(),f.lineStart(),f.point(Mt[0][0],Mt[0][1])))}it&&(!h||!_r(h,Z))&&f.point(Z[0],Z[1]),h=Z,C=it,k=ut},lineEnd:function(){C&&f.lineEnd(),h=null},clean:function(){return ct|(U&&C)<<1}}}function s(f,h,k){var C=gn(f),U=gn(h),ct=[1,0,0],Y=An(C,U),X=mr(Y,Y),Z=Y[0],ft=X-Z*Z;if(!ft)return!k&&f;var it=e*X/ft,ut=-e*Z/ft,Mt=An(ct,Y),wt=yr(ct,it),_t=yr(Y,ut);vi(wt,_t);var bt=Mt,Ot=mr(wt,bt),Bt=mr(bt,bt),Qt=Ot*Ot-Bt*(mr(wt,wt)-1);if(!(Qt<0)){var Yt=Math.sqrt(Qt),Gt=yr(bt,(-Ot-Yt)/Bt);if(vi(Gt,wt),Gt=br(Gt),!k)return Gt;var St=f[0],Wt=h[0],Vt=f[1],Lt=h[1],It;Wt<St&&(It=St,St=Wt,Wt=It);var ne=Wt-St,le=I(ne-ee)<Tt,he=le||ne<Tt;if(!le&&Lt<Vt&&(It=Vt,Vt=Lt,Lt=It),he?le?Vt+Lt>0^Gt[1]<(I(Gt[0]-St)<Tt?Vt:Lt):Vt<=Gt[1]&&Gt[1]<=Lt:ne>ee^(St<=Gt[0]&&Gt[0]<=Wt)){var me=yr(bt,(-Ot+Yt)/Bt);return vi(me,wt),[Gt,br(me)]}}}function c(f,h){var k=n?t:ee-t,C=0;return f<-k?C|=1:f>k&&(C|=2),h<-k?C|=4:h>k&&(C|=8),C}}function Ha(t,e,n,r){return function(a){var o=a.a,l=a.b,s=o.x,c=o.y,f=l.x,h=l.y,k=0,C=1,U=f-s,ct=h-c,Y;if(Y=t-s,!(!U&&Y>0)){if(Y/=U,U<0){if(Y<k)return;Y<C&&(C=Y)}else if(U>0){if(Y>C)return;Y>k&&(k=Y)}if(Y=n-s,!(!U&&Y<0)){if(Y/=U,U<0){if(Y>C)return;Y>k&&(k=Y)}else if(U>0){if(Y<k)return;Y<C&&(C=Y)}if(Y=e-c,!(!ct&&Y>0)){if(Y/=ct,ct<0){if(Y<k)return;Y<C&&(C=Y)}else if(ct>0){if(Y>C)return;Y>k&&(k=Y)}if(Y=r-c,!(!ct&&Y<0)){if(Y/=ct,ct<0){if(Y>C)return;Y>k&&(k=Y)}else if(ct>0){if(Y<k)return;Y<C&&(C=Y)}return k>0&&(a.a={x:s+k*U,y:c+k*ct}),C<1&&(a.b={x:s+C*U,y:c+C*ct}),a}}}}}}var Mr=1e9;
4i.geo.clipExtent=function(){var t,e,n,r,a,o,l={stream:function(s){return a&&(a.valid=!1),a=o(s),a.valid=!0,a},extent:function(s){return arguments.length?(o=Ya(t=+s[0][0],e=+s[0][1],n=+s[1][0],r=+s[1][1]),a&&(a.valid=!1,a=null),l):[[t,e],[n,r]]}};return l.extent([[0,0],[960,500]])};function Ya(t,e,n,r){return function(s){var c=s,f=Ra(),h=Ha(t,e,n,r),k,C,U,ct={point:ft,lineStart:Qt,lineEnd:Yt,polygonStart:function(){s=f,k=[],C=[],Bt=!0},polygonEnd:function(){s=c,k=i.merge(k);var St=Y([t,r]),Wt=Bt&&St,Vt=k.length;(Wt||Vt)&&(s.polygonStart(),Wt&&(s.lineStart(),X(null,null,1,s),s.lineEnd()),Vt&&Pa(k,o,St,X,s),s.polygonEnd()),k=C=U=null}};function Y(St){for(var Wt=0,Vt=C.length,Lt=St[1],It=0;It<Vt;++It)for(var ne=1,le=C[It],he=le.length,me=le[0],_e;ne<he;++ne)_e=le[ne],me[1]<=Lt?_e[1]>Lt&&Qr(me,_e,St)>0&&++Wt:_e[1]<=Lt&&Qr(me,_e,St)<0&&--Wt,me=_e;return Wt!==0}function X(St,Wt,Vt,Lt){var It=0,ne=0;if(St==null||(It=a(St,Vt))!==(ne=a(Wt,Vt))||l(St,Wt)<0^Vt>0)do Lt.point(It===0||It===3?t:n,It>1?r:e);while((It=(It+Vt+4)%4)!==ne);else Lt.point(Wt[0],Wt[1])}function Z(St,Wt){return t<=St&&St<=n&&e<=Wt&&Wt<=r}function ft(St,Wt){Z(St,Wt)&&s.point(St,Wt)}var it,ut,Mt,wt,_t,bt,Ot,Bt;function Qt(){ct.point=Gt,C&&C.push(U=[]),Ot=!0,bt=!1,wt=_t=NaN}function Yt(){k&&(Gt(it,ut),Mt&&bt&&f.rejoin(),k.push(f.buffer())),ct.point=ft,bt&&s.lineEnd()}function Gt(St,Wt){St=Math.max(-Mr,Math.min(Mr,St)),Wt=Math.max(-Mr,Math.min(Mr,Wt));var Vt=Z(St,Wt);if(C&&U.push([St,Wt]),Ot)it=St,ut=Wt,Mt=Vt,Ot=!1,Vt&&(s.lineStart(),s.point(St,Wt));else if(Vt&&bt)s.point(St,Wt);else{var Lt={a:{x:wt,y:_t},b:{x:St,y:Wt}};h(Lt)?(bt||(s.lineStart(),s.point(Lt.a.x,Lt.a.y)),s.point(Lt.b.x,Lt.b.y),Vt||s.lineEnd(),Bt=!1):Vt&&(s.lineStart(),s.point(St,Wt),Bt=!1)}wt=St,_t=Wt,bt=Vt}return ct};function a(s,c){return I(s[0]-t)<Tt?c>0?0:3:I(s[0]-n)<Tt?c>0?2:1:I(s[1]-e)<Tt?c>0?1:0:c>0?3:2}function o(s,c){return l(s.x,c.x)}function l(s,c){var f=a(s,1),h=a(c,1);return f!==h?f-h:f===0?c[1]-s[1]:f===1?s[0]-c[0]:f===2?s[1]-c[1]:c[0]-s[0]}}function yi(t){var e=0,n=ee/3,r=_i(t),a=r(e,n);return a.parallels=function(o){return arguments.length?r(e=o[0]*ee/180,n=o[1]*ee/180):[e/ee*180,n/ee*180]},a}function ja(t,e){var n=Math.sin(t),r=(n+Math.sin(e))/2,a=1+n*(2*r-n),o=Math.sqrt(a)/r;function l(s,c){var f=Math.sqrt(a-2*r*Math.sin(c))/r;return[f*Math.sin(s*=r),o-f*Math.cos(s)]}return l.invert=function(s,c){var f=o-c;return[Math.atan2(s,f)/r,nn((a-(s*s+f*f)*r*r)/(2*r))]},l}(i.geo.conicEqualArea=function(){return yi(ja)}).raw=ja,i.geo.albers=function(){return i.geo.conicEqualArea().rotate([96,0]).center([-.6,38.7]).parallels([29.5,45.5]).scale(1070)},i.geo.albersUsa=function(){var t=i.geo.albers(),e=i.geo.conicEqualArea().rotate([154,0]).center([-2,58.5]).parallels([55,65]),n=i.geo.conicEqualArea().rotate([157,0]).center([-3,19.9]).parallels([8,18]),r,a={point:function(f,h){r=[f,h]}},o,l,s;function c(f){var h=f[0],k=f[1];return r=null,o(h,k),r||(l(h,k),r)||s(h,k),r}return c.invert=function(f){var h=t.scale(),k=t.translate(),C=(f[0]-k[0])/h,U=(f[1]-k[1])/h;return(U>=.12&&U<.234&&C>=-.425&&C<-.214?e:U>=.166&&U<.234&&C>=-.214&&C<-.115?n:t).invert(f)},c.stream=function(f){var h=t.stream(f),k=e.stream(f),C=n.stream(f);return{point:function(U,ct){h.point(U,ct),k.point(U,ct),C.point(U,ct)},sphere:function(){h.sphere(),k.sphere(),C.sphere()},lineStart:function(){h.lineStart(),k.lineStart(),C.lineStart()},lineEnd:function(){h.lineEnd(),k.lineEnd(),C.lineEnd()},polygonStart:function(){h.polygonStart(),k.polygonStart(),C.polygonStart()},polygonEnd:function(){h.polygonEnd(),k.polygonEnd(),C.polygonEnd()}}},c.precision=function(f){return arguments.length?(t.precision(f),e.precision(f),n.precision(f),c):t.precision()},c.scale=function(f){return arguments.length?(t.scale(f),e.scale(f*.35),n.scale(f),c.translate(t.translate())):t.scale()},c.translate=function(f){if(!arguments.length)return t.translate();var h=t.scale(),k=+f[0],C=+f[1];return o=t.translate(f).clipExtent([[k-.455*h,C-.238*h],[k+.455*h,C+.238*h]]).stream(a).point,l=e.translate([k-.307*h,C+.201*h]).clipExtent([[k-.425*h+Tt,C+.12*h+Tt],[k-.214*h-Tt,C+.234*h-Tt]]).stream(a).point,s=n.translate([k-.205*h,C+.212*h]).clipExtent([[k-.214*h+Tt,C+.166*h+Tt],[k-.115*h-Tt,C+.234*h-Tt]]).stream(a).point,c},c.scale(1070)};var xi,bi,un={point:R,lineStart:R,lineEnd:R,polygonStart:function(){bi=0,un.lineStart=us},polygonEnd:function(){un.lineStart=un.lineEnd=un.point=R,xi+=I(bi/2)}};function us(){var t,e,n,r;un.point=function(o,l){un.point=a,t=n=o,e=r=l};function a(o,l){bi+=r*o-n*l,n=o,r=l}un.lineEnd=function(){a(t,e)}}var Ar,Er,Cr,Sr,ss={point:ls,lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R};function ls(t,e){t<Ar&&(Ar=t),t>Cr&&(Cr=t),e<Er&&(Er=e),e>Sr&&(Sr=e)}function cs(){var t=qa(4.5),e=[],n={point:r,lineStart:function(){n.point=a},lineEnd:l,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=l,n.point=r},pointRadius:function(c){return t=qa(c),n},result:function(){if(e.length){var c=e.join("");return e=[],c}}};function r(c,f){e.push("M",c,",",f,t)}function a(c,f){e.push("M",c,",",f),n.point=o}function o(c,f){e.push("L",c,",",f)}function l(){n.point=r}function s(){e.push("Z")}return n}function qa(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}var qe={point:mn,lineStart:Ga,lineEnd:Xa,polygonStart:function(){qe.lineStart=fs}
4,polygonEnd:function(){qe.point=mn,qe.lineStart=Ga,qe.lineEnd=Xa}};function mn(t,e){pn+=t,vn+=e,++tn}function Ga(){var t,e;qe.point=function(r,a){qe.point=n,mn(t=r,e=a)};function n(r,a){var o=r-t,l=a-e,s=Math.sqrt(o*o+l*l);rn+=s*(t+r)/2,an+=s*(e+a)/2,$e+=s,mn(t=r,e=a)}}function Xa(){qe.point=mn}function fs(){var t,e,n,r;qe.point=function(o,l){qe.point=a,mn(t=n=o,e=r=l)};function a(o,l){var s=o-n,c=l-r,f=Math.sqrt(s*s+c*c);rn+=f*(n+o)/2,an+=f*(r+l)/2,$e+=f,f=r*o-n*l,En+=f*(n+o),Cn+=f*(r+l),on+=f*3,mn(n=o,r=l)}qe.lineEnd=function(){a(t,e)}}function ds(t){var e=4.5,n={point:r,lineStart:function(){n.point=a},lineEnd:l,polygonStart:function(){n.lineEnd=s},polygonEnd:function(){n.lineEnd=l,n.point=r},pointRadius:function(c){return e=c,n},result:R};function r(c,f){t.moveTo(c+e,f),t.arc(c,f,e,0,ge)}function a(c,f){t.moveTo(c,f),n.point=o}function o(c,f){t.lineTo(c,f)}function l(){n.point=r}function s(){t.closePath()}return n}function Ua(t){var e=.5,n=Math.cos(30*ce),r=16;function a(c){return(r?l:o)(c)}function o(c){return Za(c,function(f,h){f=t(f,h),c.point(f[0],f[1])})}function l(c){var f,h,k,C,U,ct,Y,X,Z,ft,it,ut,Mt={point:wt,lineStart:_t,lineEnd:Ot,polygonStart:function(){c.polygonStart(),Mt.lineStart=Bt},polygonEnd:function(){c.polygonEnd(),Mt.lineStart=_t}};function wt(Gt,St){Gt=t(Gt,St),c.point(Gt[0],Gt[1])}function _t(){X=NaN,Mt.point=bt,c.lineStart()}function bt(Gt,St){var Wt=gn([Gt,St]),Vt=t(Gt,St);s(X,Z,Y,ft,it,ut,X=Vt[0],Z=Vt[1],Y=Gt,ft=Wt[0],it=Wt[1],ut=Wt[2],r,c),c.point(X,Z)}function Ot(){Mt.point=wt,c.lineEnd()}function Bt(){_t(),Mt.point=Qt,Mt.lineEnd=Yt}function Qt(Gt,St){bt(f=Gt,St),h=X,k=Z,C=ft,U=it,ct=ut,Mt.point=bt}function Yt(){s(X,Z,Y,ft,it,ut,h,k,f,C,U,ct,r,c),Mt.lineEnd=Ot,Ot()}return Mt}function s(c,f,h,k,C,U,ct,Y,X,Z,ft,it,ut,Mt){var wt=ct-c,_t=Y-f,bt=wt*wt+_t*_t;if(bt>4*e&&ut--){var Ot=k+Z,Bt=C+ft,Qt=U+it,Yt=Math.sqrt(Ot*Ot+Bt*Bt+Qt*Qt),Gt=Math.asin(Qt/=Yt),St=I(I(Qt)-1)<Tt||I(h-X)<Tt?(h+X)/2:Math.atan2(Bt,Ot),Wt=t(St,Gt),Vt=Wt[0],Lt=Wt[1],It=Vt-c,ne=Lt-f,le=_t*It-wt*ne;(le*le/bt>e||I((wt*It+_t*ne)/bt-.5)>.3||k*Z+C*ft+U*it<n)&&(s(c,f,h,k,C,U,Vt,Lt,St,Ot/=Yt,Bt/=Yt,Qt,ut,Mt),Mt.point(Vt,Lt),s(Vt,Lt,St,Ot,Bt,Qt,ct,Y,X,Z,ft,it,ut,Mt))}}return a.precision=function(c){return arguments.length?(r=(e=c*c)>0&&16,a):Math.sqrt(e)},a}i.geo.path=function(){var t=4.5,e,n,r,a,o;function l(c){return c&&(typeof t=="function"&&a.pointRadius(+t.apply(this,arguments)),(!o||!o.valid)&&(o=r(a)),i.geo.stream(c,o)),a.result()}l.area=function(c){return xi=0,i.geo.stream(c,r(un)),xi},l.centroid=function(c){return pn=vn=tn=rn=an=$e=En=Cn=on=0,i.geo.stream(c,r(qe)),on?[En/on,Cn/on]:$e?[rn/$e,an/$e]:tn?[pn/tn,vn/tn]:[NaN,NaN]},l.bounds=function(c){return Cr=Sr=-(Ar=Er=1/0),i.geo.stream(c,r(ss)),[[Ar,Er],[Cr,Sr]]},l.projection=function(c){return arguments.length?(r=(e=c)?c.stream||hs(c):nt,s()):e},l.context=function(c){return arguments.length?(a=(n=c)==null?new cs:new ds(c),typeof t!="function"&&a.pointRadius(t),s()):n},l.pointRadius=function(c){return arguments.length?(t=typeof c=="function"?c:(a.pointRadius(+c),+c),l):t};function s(){return o=null,l}return l.projection(i.geo.albersUsa()).context(null)};function hs(t){var e=Ua(function(n,r){return t([n*we,r*we])});return function(n){return Ka(e(n))}}i.geo.transform=function(t){return{stream:function(e){var n=new $a(e);for(var r in t)n[r]=t[r];return n}}};function $a(t){this.stream=t}$a.prototype={point:function(t,e){this.stream.point(t,e)},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()}};function Za(t,e){return{point:e,sphere:function(){t.sphere()},lineStart:function(){t.lineStart()},lineEnd:function(){t.lineEnd()},polygonStart:function(){t.polygonStart()},polygonEnd:function(){t.polygonEnd()}}}i.geo.projection=sn,i.geo.projectionMutator=_i;function sn(t){return _i(function(){return t})()}function _i(t){var e,n,r,a=Ua(function(bt,Ot){return bt=e(bt,Ot),[bt[0]*o+U,ct-bt[1]*o]}),o=150,l=480,s=250,c=0,f=0,h=0,k=0,C=0,U,ct,Y=Va,X=nt,Z=null,ft=null,it;function ut(bt){return bt=r(bt[0]*ce,bt[1]*ce),[bt[0]*o+U,ct-bt[1]*o]}function Mt(bt){return bt=r.invert((bt[0]-U)/o,(ct-bt[1])/o),bt&&[bt[0]*we,bt[1]*we]}ut.stream=function(bt){return it&&(it.valid=!1),it=Ka(Y(n,a(X(bt)))
vendor: 6,256 bytes, line 4
4),it.valid=!0,it},ut.clipAngle=function(bt){return arguments.length?(Y=bt==null?(Z=bt,Va):os((Z=+bt)*ce),_t()):Z},ut.clipExtent=function(bt){return arguments.length?(ft=bt,X=bt?Ya(bt[0][0],bt[0][1],bt[1][0],bt[1][1]):nt,_t()):ft},ut.scale=function(bt){return arguments.length?(o=+bt,wt()):o},ut.translate=function(bt){return arguments.length?(l=+bt[0],s=+bt[1],wt()):[l,s]},ut.center=function(bt){return arguments.length?(c=bt[0]%360*ce,f=bt[1]%360*ce,wt()):[c*we,f*we]},ut.rotate=function(bt){return arguments.length?(h=bt[0]%360*ce,k=bt[1]%360*ce,C=bt.length>2?bt[2]%360*ce:0,wt()):[h*we,k*we,C*we]},i.rebind(ut,a,"precision");function wt(){r=Wa(n=wi(h,k,C),e);var bt=e(c,f);return U=l-bt[0]*o,ct=s+bt[1]*o,_t()}function _t(){return it&&(it.valid=!1,it=null),ut}return function(){return e=t.apply(this,arguments),ut.invert=e.invert&&Mt,wt()}}function Ka(t){return Za(t,function(e,n){t.point(e*ce,n*ce)})}function Yn(t,e){return[t,e]}(i.geo.equirectangular=function(){return sn(Yn)}).raw=Yn.invert=Yn,i.geo.rotation=function(t){t=wi(t[0]%360*ce,t[1]*ce,t.length>2?t[2]*ce:0);function e(n){return n=t(n[0]*ce,n[1]*ce),n[0]*=we,n[1]*=we,n}return e.invert=function(n){return n=t.invert(n[0]*ce,n[1]*ce),n[0]*=we,n[1]*=we,n},e};function Qa(t,e){return[t>ee?t-ge:t<-ee?t+ge:t,e]}Qa.invert=Yn;function wi(t,e,n){return t?e||n?Wa(to(t),eo(e,n)):to(t):e||n?eo(e,n):Qa}function Ja(t){return function(e,n){return e+=t,[e>ee?e-ge:e<-ee?e+ge:e,n]}}function to(t){var e=Ja(t);return e.invert=Ja(-t),e}function eo(t,e){var n=Math.cos(t),r=Math.sin(t),a=Math.cos(e),o=Math.sin(e);function l(s,c){var f=Math.cos(c),h=Math.cos(s)*f,k=Math.sin(s)*f,C=Math.sin(c),U=C*n+h*r;return[Math.atan2(k*a-U*o,h*n-C*r),nn(U*a+k*o)]}return l.invert=function(s,c){var f=Math.cos(c),h=Math.cos(s)*f,k=Math.sin(s)*f,C=Math.sin(c),U=C*a-k*o;return[Math.atan2(k*a+C*o,h*n+U*r),nn(U*n-h*r)]},l}i.geo.circle=function(){var t=[0,0],e,n=6,r;function a(){var o=typeof t=="function"?t.apply(this,arguments):t,l=wi(-o[0]*ce,-o[1]*ce,0).invert,s=[];return r(null,null,1,{point:function(c,f){s.push(c=l(c,f)),c[0]*=we,c[1]*=we}}),{type:"Polygon",coordinates:[s]}}return a.origin=function(o){return arguments.length?(t=o,a):t},a.angle=function(o){return arguments.length?(r=ki((e=+o)*ce,n*ce),a):e},a.precision=function(o){return arguments.length?(r=ki(e*ce,(n=+o)*ce),a):n},a.angle(90)};function ki(t,e){var n=Math.cos(t),r=Math.sin(t);return function(a,o,l,s){var c=l*e;a!=null?(a=no(n,a),o=no(n,o),(l>0?a<o:a>o)&&(a+=l*ge)):(a=t+l*ge,o=t-.5*c);for(var f,h=a;l>0?h>o:h<o;h-=c)s.point((f=br([n,-r*Math.cos(h),-r*Math.sin(h)]))[0],f[1])}}function no(t,e){var n=gn(e);n[0]-=t,xr(n);var r=ua(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Tt)%(2*Math.PI)}i.geo.distance=function(t,e){var n=(e[0]-t[0])*ce,r=t[1]*ce,a=e[1]*ce,o=Math.sin(n),l=Math.cos(n),s=Math.sin(r),c=Math.cos(r),f=Math.sin(a),h=Math.cos(a),k;return Math.atan2(Math.sqrt((k=h*o)*k+(k=c*f-s*h*l)*k),s*f+c*h*l)},i.geo.graticule=function(){var t,e,n,r,a,o,l,s,c=10,f=c,h=90,k=360,C,U,ct,Y,X=2.5;function Z(){return{type:"MultiLineString",coordinates:ft()}}function ft(){return i.range(Math.ceil(r/h)*h,n,h).map(ct).concat(i.range(Math.ceil(s/k)*k,l,k).map(Y)).concat(i.range(Math.ceil(e/c)*c,t,c).filter(function(it){return I(it%h)>Tt}).map(C)).concat(i.range(Math.ceil(o/f)*f,a,f).filter(function(it){return I(it%k)>Tt}).map(U))}return Z.lines=function(){return ft().map(function(it){return{type:"LineString",coordinates:it}})},Z.outline=function(){return{type:"Polygon",coordinates:[ct(r).concat(Y(l).slice(1),ct(n).reverse().slice(1),Y(s).reverse().slice(1))]}},Z.extent=function(it){return arguments.length?Z.majorExtent(it).minorExtent(it):Z.minorExtent()},Z.majorExtent=function(it){return arguments.length?(r=+it[0][0],n=+it[1][0],s=+it[0][1],l=+it[1][1],r>n&&(it=r,r=n,n=it),s>l&&(it=s,s=l,l=it),Z.precision(X)):[[r,s],[n,l]]},Z.minorExtent=function(it){return arguments.length?(e=+it[0][0],t=+it[1][0],o=+it[0][1],a=+it[1][1],e>t&&(it=e,e=t,t=it),o>a&&(it=o,o=a,a=it),Z.precision(X)):[[e,o],[t,a]]},Z.step=function(it){return arguments.length?Z.majorStep(it).minorStep(it):Z.minorStep()},Z.majorStep=function(it){return arguments.length?(h=+it[0],k=+it[1],Z):[h,k]},Z.minorStep=function(it){return arguments.length?(c=+it[0],f=+it[1],Z):[c,f]},Z.precision=function(it){return arguments.length?(X=+it,C=ro(o,a,90),U=io(e,t,X),ct=ro(s,l,90),Y=io(r,n,X),Z):X},Z.majorExtent([[-180,-90+Tt],[180,90-Tt]]).minorExtent([[-180,-80-Tt],[180,80+Tt]])};function ro(t,e,n){var r=i.range(t,e-Tt,n).concat(e);return function(a){return r.map(function(o){return[a,o]})}}function io(t,e,n){var r=i.range(t,e-Tt,n).concat(e);return function(a){return r.map(function(o){return[o,a]})}}function Mi(t){return t.source}function Ai(t){return t.target}i.geo.greatArc=function(){var t=Mi,e,n=Ai,r;function a(){return{type:"LineString",coordinates:[e||t.apply(this,arguments),r||n.apply(this,arguments)]}}return a.distance=function(){return i.geo.distance(e||t.apply(this,arguments),r||n.apply(this,arguments))},a.source=function(o){return arguments.length?(t=o,e=typeof o=="function"?null:o,a):t},a.target=function(o){return arguments.length?(n=o,r=typeof o=="function"?null:o,a):n},a.precision=function(){return arguments.length?a:0},a},i.geo.interpolate=function(t,e){return gs(t[0]*ce,t[1]*ce,e[0]*ce,e[1]*ce)};function gs(t,e,n,r){var a=Math.cos(e),o=Math.sin(e),l=Math.cos(r),s=Math.sin(r),c=a*Math.cos(t),f=a*Math.sin(t),h=l*Math.cos(n),k=l*Math.sin(n),C=2*Math.asin(Math.sqrt(la(r-e)+a*l*la(n-t))),U=1/Math.sin(C),ct=C?function(Y){var X=Math.sin(Y*=C)*U,Z=Math.sin(C-Y)*U,ft=Z*c+X*h,it=Z*f+X*k,ut=Z*o+X*s;return[Math.atan2(it,ft)*we,Math.atan2(ut,Math.sqrt(ft*ft+it*it))*we]}:function(){return[t*we,e*we]};return ct.distance=C,ct}i.geo.length=function(t){return Ei=0,i.geo.stream(t,Sn),Ei};var Ei,Sn={sphere:R,point:R,lineStart:ps,lineEnd:R,polygonStart:R,polygonEnd:R};function ps(){var t,e,n;Sn.point=function(a,o){t=a*ce,e=Math.sin(o*=ce),n=Math.cos(o),Sn.point=r},Sn.lineEnd=function(){Sn.point=Sn.lineEnd=R};function r(a,o){var l=Math.sin(o*=ce),s=Math.cos(o),c=I((a*=ce)-t),f=Math.cos(c);Ei+=Math.atan2(Math.sqrt((c=s*Math.sin(c))*c+(c=n*l-e*s*f)*c),e*l+n*s*f),t=a,e=l,n=s}}function jn(t,e){function n(r,a){var o=Math.cos(r),l=Math.cos(a),s=t(o*l);
4return[s*l*Math.sin(r),s*Math.sin(a)]}return n.invert=function(r,a){var o=Math.sqrt(r*r+a*a),l=e(o),s=Math.sin(l),c=Math.cos(l);return[Math.atan2(r*s,o*c),Math.asin(o&&a*s/o)]},n}var ao=jn(function(t){return Math.sqrt(2/(1+t))},function(t){return 2*Math.asin(t/2)});(i.geo.azimuthalEqualArea=function(){return sn(ao)}).raw=ao;var oo=jn(function(t){var e=Math.acos(t);return e&&e/Math.sin(e)},nt);(i.geo.azimuthalEquidistant=function(){return sn(oo)}).raw=oo;function uo(t,e){var n=Math.cos(t),r=function(s){return Math.tan(ee/4+s/2)},a=t===e?Math.sin(t):Math.log(n/Math.cos(e))/Math.log(r(e)/r(t)),o=n*Math.pow(r(t),a)/a;if(!a)return Lr;function l(s,c){o>0?c<-ye+Tt&&(c=-ye+Tt):c>ye-Tt&&(c=ye-Tt);var f=o/Math.pow(r(c),a);return[f*Math.sin(a*s),o-f*Math.cos(a*s)]}return l.invert=function(s,c){var f=o-c,h=oa(a)*Math.sqrt(s*s+f*f);return[Math.atan2(s,f)/a,2*Math.atan(Math.pow(o/h,1/a))-ye]},l}(i.geo.conicConformal=function(){return yi(uo)}).raw=uo;function so(t,e){var n=Math.cos(t),r=t===e?Math.sin(t):(n-Math.cos(e))/(e-t),a=n/r+t;if(I(r)<Tt)return Yn;function o(l,s){var c=a-s;return[c*Math.sin(r*l),a-c*Math.cos(r*l)]}return o.invert=function(l,s){var c=a-s;return[Math.atan2(l,c)/r,a-oa(r)*Math.sqrt(l*l+c*c)]},o}(i.geo.conicEquidistant=function(){return yi(so)}).raw=so;var lo=jn(function(t){return 1/t},Math.atan);(i.geo.gnomonic=function(){return sn(lo)}).raw=lo;function Lr(t,e){return[t,Math.log(Math.tan(ee/4+e/2))]}Lr.invert=function(t,e){return[t,2*Math.atan(Math.exp(e))-ye]};function co(t){var e=sn(t),n=e.scale,r=e.translate,a=e.clipExtent,o;return e.scale=function(){var l=n.apply(e,arguments);return l===e?o?e.clipExtent(null):e:l},e.translate=function(){var l=r.apply(e,arguments);return l===e?o?e.clipExtent(null):e:l},e.clipExtent=function(l){var s=a.apply(e,arguments);if(s===e){if(o=l==null){var c=ee*n(),f=r();a([[f[0]-c,f[1]-c],[f[0]+c,f[1]+c]])}}else o&&(s=null);return s},e.clipExtent(null)}(i.geo.mercator=function(){return co(Lr)}).raw=Lr;var fo=jn(function(){return 1},Math.asin);(i.geo.orthographic=function(){return sn(fo)}).raw=fo;var ho=jn(function(t){return 1/(1+t)},function(t){return 2*Math.atan(t)});(i.geo.stereographic=function(){return sn(ho)}).raw=ho;function Ci(t,e){return[Math.log(Math.tan(ee/4+e/2)),-t]}Ci.invert=function(t,e){return[-e,2*Math.atan(Math.exp(t))-ye]},(i.geo.transverseMercator=function(){var t=co(Ci),e=t.center,n=t.rotate;return t.center=function(r){return r?e([-r[1],r[0]]):(r=e(),[r[1],-r[0]])},t.rotate=function(r){return r?n([r[0],r[1],r.length>2?r[2]+90:90]):(r=n(),[r[0],r[1],r[2]-90])},n([0,0,90])}).raw=Ci,i.geom={};function Ln(t){return t[0]}function qn(t){return t[1]}i.geom.hull=function(t){var e=Ln,n=qn;if(arguments.length)return r(t);function r(a){if(a.length<3)return[];var o=be(e),l=be(n),s,c=a.length,f=[],h=[];for(s=0;s<c;s++)f.push([+o.call(this,a[s],s),+l.call(this,a[s],s),s]);for(f.sort(vs),s=0;s<c;s++)h.push([f[s][0],-f[s][1]]);var k=go(f),C=go(h),U=C[0]===k[0],ct=C[C.length-1]===k[k.length-1],Y=[];for(s=k.length-1;s>=0;--s)Y.push(a[f[k[s]][2]]);for(s=+U;s<C.length-ct;++s)Y.push(a[f[C[s]][2]]);return Y}return r.x=function(a){return arguments.length?(e=a,r):e},r.y=function(a){return arguments.length?(n=a,r):n},r};function go(t){for(var e=t.length,n=[0,1],r=2,a=2;a<e;a++){for(;r>1&&Qr(t[n[r-2]],t[n[r-1]],t[a])<=0;)--r;n[r++]=a}return n.slice(0,r)}function vs(t,e){return t[0]-e[0]||t[1]-e[1]}i.geom.polygon=function(t){return vt(t,Nr),t};var Nr=i.geom.polygon.prototype=[];Nr.area=function(){for(var t=-1,e=this.length,n,r=this[e-1],a=0;++t<e;)n=r,r=this[t],a+=n[1]*r[0]-n[0]*r[1];return a*.5},Nr.centroid=function(t){var e=-1,n=this.length,r=0,a=0,o,l=this[n-1],s;for(arguments.length||(t=-1/(6*this.area()));++e<n;)o=l,l=this[e],s=o[0]*l[1]-l[0]*o[1],r+=(o[0]+l[0])*s,a+=(o[1]+l[1])*s;return[r*t,a*t]},Nr.clip=function(t){for(var e,n=po(t),r=-1,a=this.length-po(this),o,l,s=this[a-1],c,f,h;++r<a;){for(e=t.slice(),t.length=0,c=this[r],f=e[(l=e.length-n)-1],o=-1;++o<l;)h=e[o],Si(h,s,c)?(Si(f,s,c)||t.push(Li(f,h,s,c)),t.push(h)):Si(f,s,c)&&t.push(Li(f,h,s,c)),f=h;n&&t.push(t[0]),s=c}return t};function Si(t,e,n){return(n[0]-e[0])*(t[1]-e[1])<(n[1]-e[1])*(t[0]-e[0])}function Li(t,e,n,r){var a=t[0],o=n[0],l=e[0]-a,s=r[0]-o,c=t[1],f=n[1],h=e[1]-c,k=r[1]-f,C=(s*(c-f)-k*(a-o))/(k*l-s*h);return[a+C*l,c+C*h]}function po(t){var e=t[0],n=t[t.length-1];return!(e[0]-n[0]||e[1]-n[1])}var Nn,yn,Dn,vo=[],Ni,Gn,mo=[];function ms(){Or(this),this.edge=this.site=this.circle=null}function yo(t){var e=vo.pop()||new ms;return e.site=t,e}function Di(t){On(t),Dn.remove(t),vo.push(t),Or(t)}function ys(t){var e=t.circle,n=e.x,r=e.cy,a={x:n,y:r},o=t.P,l=t.N,s=[t];Di(t);for(var c=o;c.circle&&I(n-c.circle.x)<Tt&&I(r-c.circle.cy)<Tt;)o=c.P,s.unshift(c),Di(c),c=o;s.unshift(c),On(c);for(var f=l;
vendor: 4,387 bytes, line 4
4f.circle&&I(n-f.circle.x)<Tt&&I(r-f.circle.cy)<Tt;)l=f.N,s.push(f),Di(f),f=l;s.push(f),On(f);var h=s.length,k;for(k=1;k<h;++k)f=s[k],c=s[k-1],Dr(f.edge,c.site,f.site,a);c=s[0],f=s[h-1],f.edge=Xn(c.site,f.site,null,a),Fn(c),Fn(f)}function xs(t){for(var e=t.x,n=t.y,r,a,o,l,s=Dn._;s;)if(o=xo(s,n)-e,o>Tt)s=s.L;else if(l=e-bs(s,n),l>Tt){if(!s.R){r=s;break}s=s.R}else{o>-Tt?(r=s.P,a=s):l>-Tt?(r=s,a=s.N):r=a=s;break}var c=yo(t);if(Dn.insert(r,c),!(!r&&!a)){if(r===a){On(r),a=yo(r.site),Dn.insert(c,a),c.edge=a.edge=Xn(r.site,c.site),Fn(r),Fn(a);return}if(!a){c.edge=Xn(r.site,c.site);return}On(r),On(a);var f=r.site,h=f.x,k=f.y,C=t.x-h,U=t.y-k,ct=a.site,Y=ct.x-h,X=ct.y-k,Z=2*(C*X-U*Y),ft=C*C+U*U,it=Y*Y+X*X,ut={x:(X*ft-U*it)/Z+h,y:(C*it-Y*ft)/Z+k};Dr(a.edge,f,ct,ut),c.edge=Xn(f,t,null,ut),a.edge=Xn(t,ct,null,ut),Fn(r),Fn(a)}}function xo(t,e){var n=t.site,r=n.x,a=n.y,o=a-e;if(!o)return r;var l=t.P;if(!l)return-1/0;n=l.site;var s=n.x,c=n.y,f=c-e;if(!f)return s;var h=s-r,k=1/o-1/f,C=h/f;return k?(-C+Math.sqrt(C*C-2*k*(h*h/(-2*f)-c+f/2+a-o/2)))/k+r:(r+s)/2}function bs(t,e){var n=t.N;if(n)return xo(n,e);var r=t.site;return r.y===e?r.x:1/0}function bo(t){this.site=t,this.edges=[]}bo.prototype.prepare=function(){for(var t=this.edges,e=t.length,n;e--;)n=t[e].edge,(!n.b||!n.a)&&t.splice(e,1);return t.sort(_o),t.length};function _s(t){for(var e=t[0][0],n=t[1][0],r=t[0][1],a=t[1][1],o,l,s,c,f=yn,h=f.length,k,C,U,ct,Y,X;h--;)if(k=f[h],!(!k||!k.prepare()))for(U=k.edges,ct=U.length,C=0;C<ct;)X=U[C].end(),s=X.x,c=X.y,Y=U[++C%ct].start(),o=Y.x,l=Y.y,(I(s-o)>Tt||I(c-l)>Tt)&&(U.splice(C,0,new Fr(As(k.site,X,I(s-e)<Tt&&a-c>Tt?{x:e,y:I(o-e)<Tt?l:a}:I(c-a)<Tt&&n-s>Tt?{x:I(l-a)<Tt?o:n,y:a}:I(s-n)<Tt&&c-r>Tt?{x:n,y:I(o-n)<Tt?l:r}:I(c-r)<Tt&&s-e>Tt?{x:I(l-r)<Tt?o:e,y:r}:null),k.site,null)),++ct)}function _o(t,e){return e.angle-t.angle}function ws(){Or(this),this.x=this.y=this.arc=this.site=this.cy=null}function Fn(t){var e=t.P,n=t.N;if(!(!e||!n)){var r=e.site,a=t.site,o=n.site;if(r!==o){var l=a.x,s=a.y,c=r.x-l,f=r.y-s,h=o.x-l,X=o.y-s,k=2*(c*X-f*h);if(!(k>=-ve)){var C=c*c+f*f,U=h*h+X*X,ct=(X*C-f*U)/k,Y=(c*U-h*C)/k,X=Y+s,Z=mo.pop()||new ws;Z.arc=t,Z.site=a,Z.x=ct+l,Z.y=X+Math.sqrt(ct*ct+Y*Y),Z.cy=X,t.circle=Z;for(var ft=null,it=Gn._;it;)if(Z.y<it.y||Z.y===it.y&&Z.x<=it.x)if(it.L)it=it.L;else{ft=it.P;break}else if(it.R)it=it.R;else{ft=it;break}Gn.insert(ft,Z),ft||(Ni=Z)}}}}function On(t){var e=t.circle;e&&(e.P||(Ni=e.N),Gn.remove(e),mo.push(e),Or(e),t.circle=null)}function ks(t){for(var e=Nn,n=Ha(t[0][0],t[0][1],t[1][0],t[1][1]),r=e.length,a;r--;)a=e[r],(!Ms(a,t)||!n(a)||I(a.a.x-a.b.x)<Tt&&I(a.a.y-a.b.y)<Tt)&&(a.a=a.b=null,e.splice(r,1))}function Ms(t,e){var n=t.b;if(n)return!0;var r=t.a,a=e[0][0],o=e[1][0],l=e[0][1],s=e[1][1],c=t.l,f=t.r,h=c.x,k=c.y,C=f.x,U=f.y,ct=(h+C)/2,Y=(k+U)/2,X,Z;if(U===k){if(ct<a||ct>=o)return;if(h>C){if(!r)r={x:ct,y:l};else if(r.y>=s)return;n={x:ct,y:s}}else{if(!r)r={x:ct,y:s};else if(r.y<l)return;n={x:ct,y:l}}}else if(X=(h-C)/(U-k),Z=Y-X*ct,X<-1||X>1)if(h>C){if(!r)r={x:(l-Z)/X,y:l};else if(r.y>=s)return;n={x:(s-Z)/X,y:s}}else{if(!r)r={x:(s-Z)/X,y:s};else if(r.y<l)return;n={x:(l-Z)/X,y:l}}else if(k<U){if(!r)r={x:a,y:X*a+Z};else if(r.x>=o)return;n={x:o,y:X*o+Z}}else{if(!r)r={x:o,y:X*o+Z};else if(r.x<a)return;n={x:a,y:X*a+Z}}return t.a=r,t.b=n,!0}function wo(t,e){this.l=t,this.r=e,this.a=this.b=null}function Xn(t,e,n,r){var a=new wo(t,e);return Nn.push(a),n&&Dr(a,t,e,n),r&&Dr(a,e,t,r),yn[t.i].edges.push(new Fr(a,t,e)),yn[e.i].edges.push(new Fr(a,e,t)),a}function As(t,e,n){var r=new wo(t,null);return r.a=e,r.b=n,Nn.push(r),r}function Dr(t,e,n,r){!t.a&&!t.b?(t.a=r,t.l=e,t.r=n):t.l===n?t.b=r:t.a=r}function Fr(t,e,n){var r=t.a,a=t.b;this.edge=t,this.site=e,this.angle=n?Math.atan2(n.y-e.y,n.x-e.x):t.l===e?Math.atan2(a.x-r.x,r.y-a.y):Math.atan2(r.x-a.x,a.y-r.y)}Fr.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}};function Fi(){this._=null}function Or(t){t.U=t.C=t.L=t.R=t.P=t.N=null}Fi.prototype={insert:function(t,e){var n,r,a;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=ko(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)r=n.U,n===r.L?(a=r.R,a&&a.C?(n.C=a.C=!1,r.C=!0,t=r):(t===n.R&&(Un(this,n),t=n,n=t.U
vendor: 5,625 bytes, line 4
4),n.C=!1,r.C=!0,$n(this,r))):(a=r.L,a&&a.C?(n.C=a.C=!1,r.C=!0,t=r):(t===n.L&&($n(this,n),t=n,n=t.U),n.C=!1,r.C=!0,Un(this,r))),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e=t.U,n,r=t.L,a=t.R,o,l;if(r?a?o=ko(a):o=r:o=a,e?e.L===t?e.L=o:e.R=o:this._=o,r&&a?(l=o.C,o.C=t.C,o.L=r,r.U=o,o!==a?(e=o.U,o.U=t.U,t=o.R,e.L=t,o.R=a,a.U=o):(o.U=e,e=o,t=o.R)):(l=t.C,t=o),t&&(t.U=e),!l){if(t&&t.C){t.C=!1;return}do{if(t===this._)break;if(t===e.L){if(n=e.R,n.C&&(n.C=!1,e.C=!0,Un(this,e),n=e.R),n.L&&n.L.C||n.R&&n.R.C){(!n.R||!n.R.C)&&(n.L.C=!1,n.C=!0,$n(this,n),n=e.R),n.C=e.C,e.C=n.R.C=!1,Un(this,e),t=this._;break}}else if(n=e.L,n.C&&(n.C=!1,e.C=!0,$n(this,e),n=e.L),n.L&&n.L.C||n.R&&n.R.C){(!n.L||!n.L.C)&&(n.R.C=!1,n.C=!0,Un(this,n),n=e.L),n.C=e.C,e.C=n.L.C=!1,$n(this,e),t=this._;break}n.C=!0,t=e,e=e.U}while(!t.C);t&&(t.C=!1)}}};function Un(t,e){var n=e,r=e.R,a=n.U;a?a.L===n?a.L=r:a.R=r:t._=r,r.U=a,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function $n(t,e){var n=e,r=e.L,a=n.U;a?a.L===n?a.L=r:a.R=r:t._=r,r.U=a,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function ko(t){for(;t.L;)t=t.L;return t}function Oi(t,e){var n=t.sort(Es).pop(),r,a,o;for(Nn=[],yn=new Array(t.length),Dn=new Fi,Gn=new Fi;;)if(o=Ni,n&&(!o||n.y<o.y||n.y===o.y&&n.x<o.x))(n.x!==r||n.y!==a)&&(yn[n.i]=new bo(n),xs(n),r=n.x,a=n.y),n=t.pop();else if(o)ys(o.arc);else break;e&&(ks(e),_s(e));var l={cells:yn,edges:Nn};return Dn=Gn=Nn=yn=null,l}function Es(t,e){return e.y-t.y||e.x-t.x}i.geom.voronoi=function(t){var e=Ln,n=qn,r=e,a=n,o=zr;if(t)return l(t);function l(c){var f=new Array(c.length),h=o[0][0],k=o[0][1],C=o[1][0],U=o[1][1];return Oi(s(c),o).cells.forEach(function(ct,Y){var X=ct.edges,Z=ct.site,ft=f[Y]=X.length?X.map(function(it){var ut=it.start();return[ut.x,ut.y]}):Z.x>=h&&Z.x<=C&&Z.y>=k&&Z.y<=U?[[h,U],[C,U],[C,k],[h,k]]:[];ft.point=c[Y]}),f}function s(c){return c.map(function(f,h){return{x:Math.round(r(f,h)/Tt)*Tt,y:Math.round(a(f,h)/Tt)*Tt,i:h}})}return l.links=function(c){return Oi(s(c)).edges.filter(function(f){return f.l&&f.r}).map(function(f){return{source:c[f.l.i],target:c[f.r.i]}})},l.triangles=function(c){var f=[];return Oi(s(c)).cells.forEach(function(h,k){for(var C=h.site,U=h.edges.sort(_o),ct=-1,Y=U.length,X,Z=U[Y-1].edge,ft=Z.l===C?Z.r:Z.l;++ct<Y;)X=ft,Z=U[ct].edge,ft=Z.l===C?Z.r:Z.l,k<X.i&&k<ft.i&&Cs(C,X,ft)<0&&f.push([c[k],c[X.i],c[ft.i]])}),f},l.x=function(c){return arguments.length?(r=be(e=c),l):e},l.y=function(c){return arguments.length?(a=be(n=c),l):n},l.clipExtent=function(c){return arguments.length?(o=c??zr,l):o===zr?null:o},l.size=function(c){return arguments.length?l.clipExtent(c&&[[0,0],c]):o===zr?null:o&&o[1]},l};var zr=[[-1e6,-1e6],[1e6,1e6]];function Cs(t,e,n){return(t.x-n.x)*(e.y-t.y)-(t.x-e.x)*(n.y-t.y)}i.geom.delaunay=function(t){return i.geom.voronoi().triangles(t)},i.geom.quadtree=function(t,e,n,r,a){var o=Ln,l=qn,s;if(s=arguments.length)return o=Ss,l=Ls,s===3&&(a=n,r=e,n=e=0),c(t);function c(f){var h,k=be(o),C=be(l),U,ct,Y,X,Z,ft,it,ut;if(e!=null)Z=e,ft=n,it=r,ut=a;else if(it=ut=-(Z=ft=1/0),U=[],ct=[],X=f.length,s)for(Y=0;Y<X;++Y)h=f[Y],h.x<Z&&(Z=h.x),h.y<ft&&(ft=h.y),h.x>it&&(it=h.x),h.y>ut&&(ut=h.y),U.push(h.x),ct.push(h.y);else for(Y=0;Y<X;++Y){var Mt=+k(h=f[Y],Y),wt=+C(h,Y);Mt<Z&&(Z=Mt),wt<ft&&(ft=wt),Mt>it&&(it=Mt),wt>ut&&(ut=wt),U.push(Mt),ct.push(wt)}var _t=it-Z,bt=ut-ft;_t>bt?ut=ft+_t:it=Z+bt;function Ot(Yt,Gt,St,Wt,Vt,Lt,It,ne){if(!(isNaN(St)||isNaN(Wt)))if(Yt.leaf){var le=Yt.x,he=Yt.y;if(le!=null)if(I(le-St)+I(he-Wt)<.01)Bt(Yt,Gt,St,Wt,Vt,Lt,It,ne);else{var me=Yt.point;Yt.x=Yt.y=Yt.point=null,Bt(Yt,me,le,he,Vt,Lt,It,ne),Bt(Yt,Gt,St,Wt,Vt,Lt,It,ne)}else Yt.x=St,Yt.y=Wt,Yt.point=Gt}else Bt(Yt,Gt,St,Wt,Vt,Lt,It,ne)}function Bt(Yt,Gt,St,Wt,Vt,Lt,It,ne){var le=(Vt+It)*.5,he=(Lt+ne)*.5,me=St>=le,_e=Wt>=he,De=_e<<1|me;Yt.leaf=!1,Yt=Yt.nodes[De]||(Yt.nodes[De]=Mo()),me?Vt=le:It=le,_e?Lt=he:ne=he,Ot(Yt,Gt,St,Wt,Vt,Lt,It,ne)}var Qt=Mo();if(Qt.add=function(Yt){Ot(Qt,Yt,+k(Yt,++Y),+C(Yt,Y),Z,ft,it,ut)},Qt.visit=function(Yt){Zn(Yt,Qt,Z,ft,it,ut)},Qt.find=function(Yt){return Ns(Qt,Yt[0],Yt[1],Z,ft,it,ut)},Y=-1,e==null){for(;++Y<X;)Ot(Qt,f[Y],U[Y],ct[Y],Z,ft,it,ut);--Y}else f.forEach(Qt.add);return U=ct=f=h=null,Qt}return c.x=function(f){return arguments.length?(o=f,c):o},c.y=function(f){return arguments.length?(l=f,c):l},c.extent=function(f){return arguments.length?(f==null?e=n=r=a=null:(e=+f[0][0],n=+f[0][1],r=+f[1][0],a=+f[1][1]),c):e==null?null:[[e,n],[r,a]]},c.size=function(f){return arguments.length?(f==null?e=n=r=a=null:(e=n=0,r=+f[0],a=+f[1]),c):e==null?null:[r-e,a-n]},c};function Ss(t){return t.x}function Ls(t){return t.y}function Mo(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function Zn(t,e,n,r,a,o){if(!t(e,n,r,a,o)){var l=(n+a)*.5,s=(r+o)*.5,c=e.nodes;c[0]&&Zn(t,c[0],n,r,l,s),c[1]&&Zn(t,c[1],l,r,a,s),c[2]&&Zn(t,c[2],n,s,l,o),c[3]&&Zn(t,c[3],l,s,a,o)}}function Ns(t,e,n,r,a,o,l){var s=1/0,c;return function f(h,k,C,U,ct){if(!(k>o||C>l||U<r||ct<a)){if(Y=h.point){var Y,X=e-h.x,Z=n-h.y,ft=X*X+Z*Z;if(ft<s){var it=Math.sqrt(s=ft);r=e-it,a=n-it,o=e+it,l=n+it,c=Y}}for(var ut=h.nodes,Mt=(k+U)*.5,wt=(C+ct)*.5,_t=e>=Mt,bt=n>=wt,Ot=bt<<1|_t,Bt=Ot+4;Ot<Bt;++Ot)if(h=ut[Ot&3])switch(Ot&3){case 0:f(h,k,C,Mt,wt);break;case 1:f(h,Mt,C,U,wt);break;case 2:f(h,k,wt,Mt,ct);break;case 3:f(h,Mt,wt,U,ct);break}}}(t,r,a,o,l),c}i.interpolateRgb=zi;function zi(t,e){t=i.rgb(t),e=i.rgb(e);var n=t.r,r=t.g,a=t.b,o=e.r-n,l=e.g-r,s=e.b-a;return function(c){return"#"+Mn(Math.round(n+o*c))+Mn(Math.round(r+l*c))+Mn(Math.round(a+s*c))}}i.interpolateObject=Ao;function Ao(t,e){var n={},r={},a;for(a in t)a in e?n[a]=xn(t[a],e[a]):r[a]=t[a];
vendor: 26,629 bytes, line 4
4for(a in e)a in t||(r[a]=e[a]);return function(o){for(a in n)r[a]=n[a](o);return r}}i.interpolateNumber=en;function en(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}i.interpolateString=Eo;function Eo(t,e){var n=Ti.lastIndex=Wi.lastIndex=0,r,a,o,l=-1,s=[],c=[];for(t=t+"",e=e+"";(r=Ti.exec(t))&&(a=Wi.exec(e));)(o=a.index)>n&&(o=e.slice(n,o),s[l]?s[l]+=o:s[++l]=o),(r=r[0])===(a=a[0])?s[l]?s[l]+=a:s[++l]=a:(s[++l]=null,c.push({i:l,x:en(r,a)})),n=Wi.lastIndex;return n<e.length&&(o=e.slice(n),s[l]?s[l]+=o:s[++l]=o),s.length<2?c[0]?(e=c[0].x,function(f){return e(f)+""}):function(){return e}:(e=c.length,function(f){for(var h=0,k;h<e;++h)s[(k=c[h]).i]=k.x(f);return s.join("")})}var Ti=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Wi=new RegExp(Ti.source,"g");i.interpolate=xn;function xn(t,e){for(var n=i.interpolators.length,r;--n>=0&&!(r=i.interpolators[n](t,e)););return r}i.interpolators=[function(t,e){var n=typeof e;return(n==="string"?ir.has(e.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(e)?zi:Eo:e instanceof fn?zi:Array.isArray(e)?Tr:n==="object"&&isNaN(e)?Ao:en)(t,e)}],i.interpolateArray=Tr;function Tr(t,e){var n=[],r=[],a=t.length,o=e.length,l=Math.min(t.length,e.length),s;for(s=0;s<l;++s)n.push(xn(t[s],e[s]));for(;s<a;++s)r[s]=t[s];for(;s<o;++s)r[s]=e[s];return function(c){for(s=0;s<l;++s)r[s]=n[s](c);return r}}var Co=function(){return nt},Ds=i.map({linear:Co,poly:Ps,quad:function(){return zs},cubic:function(){return Ts},sin:function(){return Bs},exp:function(){return Is},circle:function(){return Rs},elastic:Vs,back:Hs,bounce:function(){return Ys}}),Fs=i.map({in:nt,out:So,"in-out":Lo,"out-in":function(t){return Lo(So(t))}});i.ease=function(t){var e=t.indexOf("-"),n=e>=0?t.slice(0,e):t,r=e>=0?t.slice(e+1):"in";return n=Ds.get(n)||Co,r=Fs.get(r)||nt,Os(r(n.apply(null,u.call(arguments,1))))};function Os(t){return function(e){return e<=0?0:e>=1?1:t(e)}}function So(t){return function(e){return 1-t(1-e)}}function Lo(t){return function(e){return .5*(e<.5?t(2*e):2-t(2-2*e))}}function zs(t){return t*t}function Ts(t){return t*t*t}function Ws(t){if(t<=0)return 0;if(t>=1)return 1;var e=t*t,n=e*t;return 4*(t<.5?n:3*(t-e)+n-.75)}function Ps(t){return function(e){return Math.pow(e,t)}}function Bs(t){return 1-Math.cos(t*ye)}function Is(t){return Math.pow(2,10*(t-1))}function Rs(t){return 1-Math.sqrt(1-t*t)}function Vs(t,e){var n;return arguments.length<2&&(e=.45),arguments.length?n=e/ge*Math.asin(1/t):(t=1,n=e/4),function(r){return 1+t*Math.pow(2,-10*r)*Math.sin((r-n)*ge/e)}}function Hs(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function Ys(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}i.interpolateHcl=js;function js(t,e){t=i.hcl(t),e=i.hcl(e);var n=t.h,r=t.c,a=t.l,o=e.h-n,l=e.c-r,s=e.l-a;return isNaN(l)&&(l=0,r=isNaN(r)?e.c:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(c){return ii(n+o*c,r+l*c,a+s*c)+""}}i.interpolateHsl=qs;function qs(t,e){t=i.hsl(t),e=i.hsl(e);var n=t.h,r=t.s,a=t.l,o=e.h-n,l=e.s-r,s=e.l-a;return isNaN(l)&&(l=0,r=isNaN(r)?e.s:r),isNaN(o)?(o=0,n=isNaN(n)?e.h:n):o>180?o-=360:o<-180&&(o+=360),function(c){return ni(n+o*c,r+l*c,a+s*c)+""}}i.interpolateLab=Gs;function Gs(t,e){t=i.lab(t),e=i.lab(e);var n=t.l,r=t.a,a=t.b,o=e.l-n,l=e.a-r,s=e.b-a;return function(c){return pa(n+o*c,r+l*c,a+s*c)+""}}i.interpolateRound=No;function No(t,e){return e-=t,function(n){return Math.round(t+e*n)}}i.transform=function(t){var e=E.createElementNS(i.ns.prefix.svg,"g");return(i.transform=function(n){if(n!=null){e.setAttribute("transform",n);var r=e.transform.baseVal.consolidate()}return new Do(r?r.matrix:Us)})(t)};function Do(t){var e=[t.a,t.b],n=[t.c,t.d],r=Oo(e),a=Fo(e,n),o=Oo(Xs(n,e,-a))||0;e[0]*n[1]<n[0]*e[1]&&(e[0]*=-1,e[1]*=-1,r*=-1,a*=-1),this.rotate=(r?Math.atan2(e[1],e[0]):Math.atan2(-n[0],n[1]))*we,this.translate=[t.e,t.f],this.scale=[r,o],this.skew=o?Math.atan2(a,o)*we:0}Do.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};function Fo(t,e){return t[0]*e[0]+t[1]*e[1]}function Oo(t){var e=Math.sqrt(Fo(t,t));return e&&(t[0]/=e,t[1]/=e),e}function Xs(t,e,n){return t[0]+=n*e[0],t[1]+=n*e[1],t}var Us={a:1,b:0,c:0,d:1,e:0,f:0};i.interpolateTransform=zo;function zn(t){return t.length?t.pop()+",":""}function $s(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var a=n.push("translate(",null,",",null,")");r.push({i:a-4,x:en(t[0],e[0])},{i:a-2,x:en(t[1],e[1])})}else(e[0]||e[1])&&n.push("translate("+e+")")}function Zs(t,e,n,r){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(zn(n)+"rotate(",null,")")-2,x:en(t,e)})):e&&n.push(zn(n)+"rotate("+e+")")}function Ks(t,e,n,r){t!==e?r.push({i:n.push(zn(n)+"skewX(",null,")")-2,x:en(t,e)}):e&&n.push(zn(n)+"skewX("+e+")")}function Qs(t,e,n,r){if(t[0]!==e[0]||t[1]!==e[1]){var a=n.push(zn(n)+"scale(",null,",",null,")");r.push({i:a-4,x:en(t[0],e[0])},{i:a-2,x:en(t[1],e[1])})}else(e[0]!==1||e[1]!==1)&&n.push(zn(n)+"scale("+e+")")}function zo(t,e){var n=[],r=[];return t=i.transform(t),e=i.transform(e),$s(t.translate,e.translate,n,r),Zs(t.rotate,e.rotate,n,r),Ks(t.skew,e.skew,n,r),Qs(t.scale,e.scale,n,r),t=e=null,function(a){for(var o=-1,l=r.length,s;++o<l;)n[(s=r[o]).i]=s.x(a);return n.join("")}}function Js(t,e){return e=(e-=t=+t)||1/e,function(n){return(n-t)/e}}function tl(t,e){return e=(e-=t=+t)||1/e,function(n){return Math.max(0,Math.min(1,(n-t)/e))}}i.layout={},i.layout.bundle=function(){return function(t){for(var e=[],n=-1,r=t.length;++n<r;)e.push(el(t[n]));return e}};function el(t){for(var e=t.source,n=t.target,r=nl(e,n),a=[e];e!==r;)e=e.parent,a.push(e);for(var o=a.length;n!==r;)a.splice(o,0,n),n=n.parent;return a}function To(t){for(var e=[],n=t.parent;n!=null;)e.push(t),t=n,n=n.parent;return e.push(t),e}function nl(t,e){if(t===e)return t;for(var n=To(t),r=To(e),a=n.pop(),o=r.pop(),l=null;a===o;)l=a,a=n.pop(),o=r.pop();return l}i.layout.chord=function(){var t={},e,n,r,a,o=0,l,s,c;function f(){var k={},C=[],U=i.range(a),ct=[],Y,X,Z,ft,it;for(e=[],n=[],Y=0,ft=-1;++ft<a;){for(X=0,it=-1;++it<a;)X+=r[ft][it];C.push(X),ct.push(i.range(a)),Y+=X}for(l&&U.sort(function(Qt,Yt){return l(C[Qt],C[Yt])}),s&&ct.forEach(function(Qt,Yt){Qt.sort(function(Gt,St){return s(r[Yt][Gt],r[Yt][St])})}),Y=(ge-o*a)/Y,X=0,ft=-1;++ft<a;){for(Z=X,it=-1;++it<a;){var ut=U[ft],Mt=ct[ut][it],wt=r[ut][Mt],_t=X,bt=X+=wt*Y;k[ut+"-"+Mt]={index:ut,subindex:Mt,startAngle:_t,endAngle:bt,value:wt}}n[ut]={index:ut,startAngle:Z,endAngle:X,value:C[ut]},X+=o}for(ft=-1;++ft<a;)for(it=ft-1;++it<a;){var Ot=k[ft+"-"+it],Bt=k[it+"-"+ft];(Ot.value||Bt.value)&&e.push(Ot.value<Bt.value?{source:Bt,target:Ot}:{source:Ot,target:Bt})}c&&h()}function h(){e.sort(function(k,C){return c((k.source.value+k.target.value)/2,(C.source.value+C.target.value)/2)})}return t.matrix=function(k){return arguments.length?(a=(r=k)&&r.length,e=n=null,t):r},t.padding=function(k){return arguments.length?(o=k,e=n=null,t):o},t.sortGroups=function(k){return arguments.length?(l=k,e=n=null,t):l},t.sortSubgroups=function(k){return arguments.length?(s=k,e=null,t):s},t.sortChords=function(k){return arguments.length?(c=k,e&&h(),t):c},t.chords=function(){return e||f(),e},t.groups=function(){return n||f(),n},t},i.layout.force=function(){var t={},e=i.dispatch("start","tick","end"),n,r=[1,1],a,o,l=.9,s=ul,c=sl,f=-30,h=ll,k=.1,C=.64,U=[],ct=[],Y,X,Z;function ft(ut){return function(Mt,wt,_t,bt){if(Mt.point!==ut){var Ot=Mt.cx-ut.x,Bt=Mt.cy-ut.y,Qt=bt-wt,Yt=Ot*Ot+Bt*Bt;if(Qt*Qt/C<Yt){if(Yt<h){var Gt=Mt.charge/Yt;ut.px-=Ot*Gt,ut.py-=Bt*Gt}return!0}if(Mt.point&&Yt&&Yt<h){var Gt=Mt.pointCharge/Yt;ut.px-=Ot*Gt,ut.py-=Bt*Gt}}return!Mt.charge}}t.tick=function(){if((o*=.99)<.005)return n=null,e.end({type:"end",alpha:o=0}),!0;var ut=U.length,Mt=ct.length,wt,_t,bt,Ot,Bt,Qt,Yt,Gt,St;for(_t=0;_t<Mt;++_t)bt=ct[_t],Ot=bt.source,Bt=bt.target,Gt=Bt.x-Ot.x,St=Bt.y-Ot.y,(Qt=Gt*Gt+St*St)&&(Qt=o*X[_t]*((Qt=Math.sqrt(Qt))-Y[_t])/Qt,Gt*=Qt,St*=Qt,Bt.x-=Gt*(Yt=Ot.weight+Bt.weight?Ot.weight/(Ot.weight+Bt.weight):.5),Bt.y-=St*Yt,Ot.x+=Gt*(Yt=1-Yt),Ot.y+=St*Yt);if((Yt=o*k)&&(Gt=r[0]/2,St=r[1]/2,_t=-1,Yt))for(;++_t<ut;)bt=U[_t],bt.x+=(Gt-bt.x)*Yt,bt.y+=(St-bt.y)*Yt;if(f)for(Wo(wt=i.geom.quadtree(U),o,Z),_t=-1;++_t<ut;)(bt=U[_t]).fixed||wt.visit(ft(bt));for(_t=-1;++_t<ut;)bt=U[_t],bt.fixed?(bt.x=bt.px,bt.y=bt.py):(bt.x-=(bt.px-(bt.px=bt.x))*l,bt.y-=(bt.py-(bt.py=bt.y))*l);e.tick({type:"tick",alpha:o})},t.nodes=function(ut){return arguments.length?(U=ut,t):U},t.links=function(ut){return arguments.length?(ct=ut,t):ct},t.size=function(ut){return arguments.length?(r=ut,t):r},t.linkDistance=function(ut){return arguments.length?(s=typeof ut=="function"?ut:+ut,t):s},t.distance=t.linkDistance,t.linkStrength=function(ut){return arguments.length?(c=typeof ut=="function"?ut:+ut,t):c},t.friction=function(ut){return arguments.length?(l=+ut,t):l},t.charge=function(ut){return arguments.length?(f=typeof ut=="function"?ut:+ut,t):f},t.chargeDistance=function(ut){return arguments.length?(h=ut*ut,t):Math.sqrt(h)},t.gravity=function(ut){return arguments.length?(k=+ut,t):k},t.theta=function(ut){return arguments.length?(C=ut*ut,t):Math.sqrt(C)},t.alpha=function(ut){return arguments.length?(ut=+ut,o?ut>0?o=ut:(n.c=null,n.t=NaN,n=null,e.end({type:"end",alpha:o=0})):ut>0&&(e.start({type:"start",alpha:o=ut}),n=cr(t.tick)),t):o},t.start=function(){var ut,Mt=U.length,wt=ct.length,_t=r[0],bt=r[1],Ot,Bt;for(ut=0;ut<Mt;++ut)(Bt=U[ut]).index=ut,Bt.weight=0;for(ut=0;ut<wt;++ut)Bt=ct[ut],typeof Bt.source=="number"&&(Bt.source=U[Bt.source]),typeof Bt.target=="number"&&(Bt.target=U[Bt.target]),++Bt.source.weight,++Bt.target.weight;for(ut=0;ut<Mt;++ut)Bt=U[ut],isNaN(Bt.x)&&(Bt.x=Qt("x",_t)),isNaN(Bt.y)&&(Bt.y=Qt("y",bt)),isNaN(Bt.px)&&(Bt.px=Bt.x),isNaN(Bt.py)&&(Bt.py=Bt.y);if(Y=[],typeof s=="function")for(ut=0;ut<wt;++ut)Y[ut]=+s.call(this,ct[ut],ut);else for(ut=0;ut<wt;++ut)Y[ut]=s;if(X=[],typeof c=="function")for(ut=0;ut<wt;++ut)X[ut]=+c.call(this,ct[ut],ut);else for(ut=0;ut<wt;++ut)X[ut]=c;if(Z=[],typeof f=="function")for(ut=0;ut<Mt;++ut)Z[ut]=+f.call(this,U[ut],ut);else for(ut=0;ut<Mt;++ut)Z[ut]=f;function Qt(Yt,Gt){if(!Ot){for(Ot=new Array(Mt),Vt=0;Vt<Mt;++Vt)Ot[Vt]=[];for(Vt=0;Vt<wt;++Vt){var St=ct[Vt];Ot[St.source.index].push(St.target),Ot[St.target.index].push(St.source)}}for(var Wt=Ot[ut],Vt=-1,Lt=Wt.length,It;++Vt<Lt;)if(!isNaN(It=Wt[Vt][Yt]))return It;return Math.random()*Gt}return t.resume()},t.resume=function(){return t.alpha(.1)},t.stop=function(){return t.alpha(0)},t.drag=function(){if(a||(a=i.behavior.drag().origin(nt).on("dragstart.force",rl).on("drag.force",it).on("dragend.force",il)),!arguments.length)return a;this.on("mouseover.force",al).on("mouseout.force",ol).call(a)};function it(ut){ut.px=i.event.x,ut.py=i.event.y,t.resume()}return i.rebind(t,e,"on")};function rl(t){t.fixed|=2}function il(t){t.fixed&=-7}function al(t){t.fixed|=4,t.px=t.x,t.py=t.y}function ol(t){t.fixed&=-5}function Wo(t,e,n){var r=0,a=0;if(t.charge=0,!t.leaf)for(var o=t.nodes,l=o.length,s=-1,c;++s<l;)c=o[s],c!=null&&(Wo(c,e,n),t.charge+=c.charge,r+=c.charge*c.cx,a+=c.charge*c.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var f=e*n[t.point.index];t.charge+=t.pointCharge=f,r+=f*t.point.x,a+=f*t.point.y}t.cx=r/t.charge,t.cy=a/t.charge}var ul=20,sl=1,ll=1/0;i.layout.hierarchy=function(){var t=dl,e=cl,n=fl;function r(a){var o=[a],l=[],s;for(a.depth=0;(s=o.pop())!=null;)if(l.push(s),(f=e.call(r,s,s.depth))&&(c=f.length)){for(var c,f,h;--c>=0;)o.push(h=f[c]),h.parent=s,h.depth=s.depth+1;n&&(s.value=0),s.children=f}else n&&(s.value=+n.call(r,s,s.depth)||0),delete s.children;return Ze(a,function(k){var C,U;t&&(C=k.children)&&C.sort(t),n&&(U=k.parent)&&(U.value+=k.value)}),l}return r.sort=function(a){return arguments.length?(t=a,r):t},r.children=function(a){return arguments.length?(e=a,r):e},r.value=function(a){return arguments.length?(n=a,r):n},r.revalue=function(a){return n&&(Qn(a,function(o){o.children&&(o.value=0)}),Ze(a,function(o){var l;o.children||(o.value=+n.call(r,o,o.depth)||0),(l=o.parent)&&(l.value+=o.value)})),a},r};function Kn(t,e){return i.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=hl,t}function Qn(t,e){for(var n=[t];(t=n.pop())!=null;)if(e(t),(a=t.children)&&(r=a.length))for(var r,a;--r>=0;)n.push(a[r])}function Ze(t,e){for(var n=[t],r=[];(t=n.pop())!=null;)if(r.push(t),(l=t.children)&&(o=l.length))for(var a=-1,o,l;++a<o;)n.push(l[a]);for(;(t=r.pop())!=null;)e(t)}function cl(t){return t.children}function fl(t){return t.value}function dl(t,e){return e.value-t.value}function hl(t){return i.merge(t.map(function(e){return(e.children||[]).map(function(n){return{source:e,target:n}})}))}i.layout.partition=function(){var t=i.layout.hierarchy(),e=[1,1];function n(o,l,s,c){var f=o.children;if(o.x=l,o.y=o.depth*c,o.dx=s,o.dy=c,f&&(k=f.length)){var h=-1,k,C,U;for(s=o.value?s/o.value:0;++h<k;)n(C=f[h],l,U=C.value*s,c),l+=U}}function r(o){var l=o.children,s=0;if(l&&(f=l.length))for(var c=-1,f;++c<f;)s=Math.max(s,r(l[c]));return 1+s}function a(o,l){var s=t.call(this,o,l);return n(s[0],0,e[0],e[1]/r(s[0])),s}return a.size=function(o){return arguments.length?(e=o,a):e},Kn(a,t)},i.layout.pie=function(){var t=Number,e=Po,n=0,r=ge,a=0;function o(l){var s=l.length,c=l.map(function(ft,it){return+t.call(o,ft,it)}),f=+(typeof n=="function"?n.apply(this,arguments):n),h=(typeof r=="function"?r.apply(this,arguments):r)-f,k=Math.min(Math.abs(h)/s,+(typeof a=="function"?a.apply(this,arguments):a)),C=k*(h<0?-1:1),U=i.sum(c),ct=U?(h-s*C)/U:0,Y=i.range(s),X=[],Z;return e!=null&&Y.sort(e===Po?function(ft,it){return c[it]-c[ft]}:function(ft,it){return e(l[ft],l[it])}),Y.forEach(function(ft){X[ft]={data:l[ft],value:Z=c[ft],startAngle:f,endAngle:f+=Z*ct+C,padAngle:k}}),X}return o.value=function(l){return arguments.length?(t=l,o):t},o.sort=function(l){return arguments.length?(e=l,o):e},o.startAngle=function(l){return arguments.length?(n=l,o):n},o.endAngle=function(l){return arguments.length?(r=l,o):r},o.padAngle=function(l){return arguments.length?(a=l,o):a},o};var Po={};i.layout.stack=function(){var t=nt,e=Pi,n=Bi,r=vl,a=gl,o=pl;function l(s,c){if(!(ct=s.length))return s;var f=s.map(function(ft,it){return t.call(l,ft,it)}),h=f.map(function(ft){return ft.map(function(it,ut){return[a.call(l,it,ut),o.call(l,it,ut)]})}),k=e.call(l,h,c);f=i.permute(f,k),h=i.permute(h,k);var C=n.call(l,h,c),U=f[0].length,ct,Y,X,Z;for(X=0;X<U;++X)for(r.call(l,f[0][X],Z=C[X],h[0][X][1]),Y=1;Y<ct;++Y)r.call(l,f[Y][X],Z+=h[Y-1][X][1],h[Y][X][1]);return s}return l.values=function(s){return arguments.length?(t=s,l):t},l.order=function(s){return arguments.length?(e=typeof s=="function"?s:ml.get(s)||Pi,l):e},l.offset=function(s){return arguments.length?(n=typeof s=="function"?s:yl.get(s)||Bi,l):n},l.x=function(s){return arguments.length?(a=s,l):a},l.y=function(s){return arguments.length?(o=s,l):o},l.out=function(s){return arguments.length?(r=s,l):r},l};function gl(t){return t.x}function pl(t){return t.y}function vl(t,e,n){t.y0=e,t.y=n}var ml=i.map({"inside-out":function(t){var e=t.length,n,r,a=t.map(xl),o=t.map(bl),l=i.range(e).sort(function(k,C){return a[k]-a[C]}),s=0,c=0,f=[],h=[];for(n=0;n<e;++n)r=l[n],s<c?(s+=o[r],f.push(r)):(c+=o[r],h.push(r));return h.reverse().concat(f)},reverse:function(t){return i.range(t.length).reverse()},default:Pi}),yl=i.map({silhouette:function(t){var e=t.length,n=t[0].length,r=[],a=0,o,l,s,c=[];for(l=0;l<n;++l){for(o=0,s=0;o<e;o++)s+=t[o][l][1];s>a&&(a=s),r.push(s)}for(l=0;l<n;++l)c[l]=(a-r[l])/2;return c},wiggle:function(t){var e=t.length,n=t[0],r=n.length,a,o,l,s,c,f,h,k,C,U=[];for(U[0]=k=C=0,o=1;o<r;++o){for(a=0,s=0;a<e;++a)s+=t[a][o][1];for(a=0,c=0,h=n[o][0]-n[o-1][0];a<e;++a){for(l=0,f=(t[a][o][1]-t[a][o-1][1])/(2*h);l<a;++l)f+=(t[l][o][1]-t[l][o-1][1])/h;c+=f*t[a][o][1]}U[o]=k-=s?c/s*h:0,k<C&&(C=k)}for(o=0;o<r;++o)U[o]-=C;return U},expand:function(t){var e=t.length,n=t[0].length,r=1/e,a,o,l,s=[];for(o=0;o<n;++o){for(a=0,l=0;a<e;a++)l+=t[a][o][1];if(l)for(a=0;a<e;a++)t[a][o][1]/=l;else for(a=0;a<e;a++)t[a][o][1]=r}for(o=0;o<n;++o)s[o]=0;return s},zero:Bi});function Pi(t){return i.range(t.length)}function Bi(t){for(var e=-1,n=t[0].length,r=[];++e<n;)r[e]=0;return r}function xl(t){for(var e=1,n=0,r=t[0][1],a,o=t.length;e<o;++e)(a=t[e][1])>r&&(n=e,r=a);return n}function bl(t){return t.reduce(_l,0)}function _l(t,e){return t+e[1]}i.layout.histogram=function(){var t=!0,e=Number,n=kl,r=wl;function a(o,C){for(var s=[],c=o.map(e,this),f=n.call(this,c,C),h=r.call(this,f,c,C),k,C=-1,U=c.length,ct=h.length-1,Y=t?1:1/U,X;++C<ct;)k=s[C]=[],k.dx=h[C+1]-(k.x=h[C]),k.y=0;if(ct>0)for(C=-1;++C<U;)X=c[C],X>=f[0]&&X<=f[1]&&(k=s[i.bisect(h,X,1,ct)-1],k.y+=Y,k.push(o[C]));return s}return a.value=function(o){return arguments.length?(e=o,a):e},a.range=function(o){return arguments.length?(n=be(o),a):n},a.bins=function(o){return arguments.length?(r=typeof o=="number"?function(l){return Bo(l,o)}:be(o),a):r},a.frequency=function(o){return arguments.length?(t=!!o,a):t},a};function wl(t,e){return Bo(t,Math.ceil(Math.log(e.length)/Math.LN2+1))}function Bo(t,e){for(var n=-1,r=+t[0],a=(t[1]-r)/e,o=[];++n<=e;)o[n]=a*n+r;return o}function kl(t){return[i.min(t),i.max(t)]}i.layout.pack=function(){var t=i.layout.hierarchy().sort(Ml),e=0,n=[1,1],r;function a(o,l){var s=t.call(this,o,l),c=s[0],f=n[0],h=n[1],k=r==null?Math.sqrt:typeof r=="function"?r:function(){return r};if(c.x=c.y=0,Ze(c,function(U){U.r=+k(U.value)}),Ze(c,Vo),e){var C=e*(r?1:Math.max(2*c.r/f,2*c.r/h))/2;Ze(c,function(U){U.r+=C}),Ze(c,Vo),Ze(c,function(U){U.r-=C})}return Ho(c,f/2,h/2,r?1:1/Math.max(2*c.r/f,2*c.r/h)),s}return a.size=function(o){return arguments.length?(n=o,a):n},a.radius=function(o){return arguments.length?(r=o==null||typeof o=="function"?o:+o,a):r},a.padding=function(o){return arguments.length?(e=+o,a):e},Kn(a,t)};function Ml(t,e){return t.value-e.value}function Ii(t,e){var n=t._pack_next;t._pack_next=e,e._pack_prev=t,e._pack_next=n,n._pack_prev=e}function Io(t,e){t._pack_next=e,e._pack_prev=t}function Ro(t,e){var n=e.x-t.x,r=e.y-t.y,a=t.r+e.r;return .999*a*a>n*n+r*r}function Vo(t){if(!(e=t.children)||!(C=e.length))return;var e,n=1/0,r=-1/0,a=1/0,o=-1/0,l,s,c,f,h,k,C;function U(ut){n=Math.min(ut.x-ut.r,n),r=Math.max(ut.x+ut.r,r),a=Math.min(ut.y-ut.r,a),o=Math.max(ut.y+ut.r,o)}if(e.forEach(Al),l=e[0],l.x=-l.r,l.y=0,U(l),C>1&&(s=e[1],s.x=s.r,s.y=0,U(s),C>2))for(c=e[2],Yo(l,s,c),U(c),Ii(l,c),l._pack_prev=c,Ii(c,s),s=l._pack_next,f=3;f<C;f++){Yo(l,s,c=e[f]);var ct=0,Y=1,X=1;for(h=s._pack_next;h!==s;h=h._pack_next,Y++)if(Ro(h,c)){ct=1;break}if(ct==1)for(k=l._pack_prev;k!==h._pack_prev&&!Ro(k,c);k=k._pack_prev,X++);ct?(Y<X||Y==X&&s.r<l.r?Io(l,s=h):Io(l=k,s),f--):(Ii(l,c),s=c,U(c))}var Z=(n+r)/2,ft=(a+o)/2,it=0;for(f=0;f<C;f++)c=e[f],c.x-=Z,c.y-=ft,it=Math.max(it,c.r+Math.sqrt(c.x*c.x+c.y*c.y));t.r=it,e.forEach(El)}function Al(t){t._pack_next=t._pack_prev=t}function El(t){delete t._pack_next,delete t._pack_prev}function Ho(t,e,n,r){var a=t.children;if(t.x=e+=r*t.x,t.y=n+=r*t.y,t.r*=r,a)for(var o=-1,l=a.length;++o<l;)Ho(a[o],e,n,r)}function Yo(t,e,n){var r=t.r+n.r,a=e.x-t.x,o=e.y-t.y;if(r&&(a||o)){var l=e.r+n.r,s=a*a+o*o;l*=l,r*=r;var c=.5+(r-l)/(2*s),f=Math.sqrt(Math.max(0,2*l*(r+s)-(r-=s)*r-l*l))/(2*s);n.x=t.x+c*a+f*o,n.y=t.y+c*o-f*a}else n.x=t.x+r,n.y=t.y}i.layout.tree=function(){var t=i.layout.hierarchy().sort(null).value(null),e=jo,n=[1,1],r=null;function a(h,k){var C=t.call(this,h,k),U=C[0],ct=o(U);if(Ze(ct,l),ct.parent.m=-ct.z,Qn(ct,s),r)Qn(U,f);else{var Y=U,X=U,Z=U;Qn(U,function(Mt){Mt.x<Y.x&&(Y=Mt),Mt.x>X.x&&(X=Mt),Mt.depth>Z.depth&&(Z=Mt)});var ft=e(Y,X)/2-Y.x,it=n[0]/(X.x+e(X,Y)/2+ft),ut=n[1]/(Z.depth||1);Qn(U,function(Mt){Mt.x=(Mt.x+ft)*it,Mt.y=Mt.depth*ut})}return C}function o(h){for(var k={A:null,children:[h]},C=[k],U;(U=C.pop())!=null;)for(var ct=U.children,Y,X=0,Z=ct.length;X<Z;++X)C.push((ct[X]=Y={_:ct[X],parent:U,children:(Y=ct[X].children)&&Y.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:X}).a=Y);return k.children[0]}function l(h){var k=h.children,C=h.parent.children,U=h.i?C[h.i-1]:null;if(k.length){Sl(h);var ct=(k[0].z+k[k.length-1].z)/2;U?(h.z=U.z+e(h._,U._),h.m=h.z-ct):h.z=ct}else U&&(h.z=U.z+e(h._,U._));h.parent.A=c(h,U,h.parent.A||C[0])}function s(h){h._.x=h.z+h.parent.m,h.m+=h.parent.m}function c(h,k,C){if(k){for(var U=h,ct=h,Y=k,X=U.parent.children[0],Z=U.m,ft=ct.m,it=Y.m,ut=X.m,Mt;Y=Vi(Y),U=Ri(U),Y&&U;)X=Ri(X),ct=Vi(ct),ct.a=h,Mt=Y.z+it-U.z-Z+e(Y._,U._),Mt>0&&(Cl(Ll(Y,h,C),h,Mt),Z+=Mt,ft+=Mt),it+=Y.m,Z+=U.m,ut+=X.m,ft+=ct.m;Y&&!Vi(ct)&&(ct.t=Y,ct.m+=it-ft),U&&!Ri(X)&&(X.t=U,X.m+=Z-ut,C=h)}return C}function f(h){h.x*=n[0],h.y=h.depth*n[1]}return a.separation=function(h){return arguments.length?(e=h,a):e},a.size=function(h){return arguments.length?(r=(n=h)==null?f:null,a):r?null:n},a.nodeSize=function(h){return arguments.length?(r=(n=h)==null?null:f,a):r?n:null},Kn(a,t)};function jo(t,e){return t.parent==e.parent?1:2}function Ri(t){var e=t.children;return e.length?e[0]:t.t}function Vi(t){var e=t.children,n;return(n=e.length)?e[n-1]:t.t}function Cl(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Sl(t){for(var e=0,n=0,r=t.children,a=r.length,o;--a>=0;)o=r[a],o.z+=e,o.m+=e,e+=o.s+(n+=o.c)}function Ll(t,e,n){return t.a.parent===e.parent?t.a:n}i.layout.cluster=function(){var t=i.layout.hierarchy().sort(null).value(null),e=jo,n=[1,1],r=!1;function a(o,l){var s=t.call(this,o,l),c=s[0],f,h=0;Ze(c,function(Y){var X=Y.children;X&&X.length?(Y.x=Dl(X),Y.y=Nl(X)):(Y.x=f?h+=e(Y,f):0,Y.y=0,f=Y)});var k=qo(c),C=Go(c),U=k.x-e(k,C)/2,ct=C.x+e(C,k)/2;return Ze(c,r?function(Y){Y.x=(Y.x-c.x)*n[0],Y.y=(c.y-Y.y)*n[1]}:function(Y){Y.x=(Y.x-U)/(ct-U)*n[0],Y.y=(1-(c.y?Y.y/c.y:1))*n[1]}),s}return a.separation=function(o){return arguments.length?(e=o,a):e},a.size=function(o){return arguments.length?(r=(n=o)==null,a):r?null:n},a.nodeSize=function(o){return arguments.length?(r=(n=o)!=null,a):r?n:null},Kn(a,t)};function Nl(t){return 1+i.max(t,function(e){return e.y})}function Dl(t){return t.reduce(function(e,n){return e+n.x},0)/t.length}function qo(t){var e=t.children;return e&&e.length?qo(e[0]):t}function Go(t){var e=t.children,n;return e&&(n=e.length)?Go(e[n-1]):t}i.layout.treemap=function(){var t=i.layout.hierarchy(),e=Math.round,n=[1,1],r=null,a=Hi,o=!1,l,s="squarify",c=.5*(1+Math.sqrt(5));function f(Y,X){for(var Z=-1,ft=Y.length,it,ut;++Z<ft;)ut=(it=Y[Z]).value*(X<0?0:X),it.area=isNaN(ut)||ut<=0?0:ut}function h(Y){var X=Y.children;if(X&&X.length){var Z=a(Y),ft=[],it=X.slice(),ut,Mt=1/0,wt,_t=s==="slice"?Z.dx:s==="dice"?Z.dy:s==="slice-dice"?Y.depth&1?Z.dy:Z.dx:Math.min(Z.dx,Z.dy),bt;for(f(it,Z.dx*Z.dy/Y.value),ft.area=0;(bt=it.length)>0;)ft.push(ut=it[bt-1]),ft.area+=ut.area,s!=="squarify"||(wt=C(ft,_t))<=Mt?(it.pop(),Mt=wt):(ft.area-=ft.pop().area,U(ft,_t,Z,!1),_t=Math.min(Z.dx,Z.dy),ft.length=ft.area=0,Mt=1/0);ft.length&&(U(ft,_t,Z,!0),ft.length=ft.area=0),X.forEach(h)}}function k(Y){var X=Y.children;if(X&&X.length){var Z=a(Y),ft=X.slice(),it,ut=[];for(f(ft,Z.dx*Z.dy/Y.value),ut.area=0;it=ft.pop();)ut.push(it),ut.area+=it.area,it.z!=null&&(U(ut,it.z?Z.dx:Z.dy,Z,!ft.length),ut.length=ut.area=0);X.forEach(k)}}function C(Y,X){for(var Z=Y.area,ft,it=0,ut=1/0,Mt=-1,wt=Y.length;++Mt<wt;)(ft=Y[Mt].area)&&(ft<ut&&(ut=ft),ft>it&&(it=ft));return Z*=Z,X*=X,Z?Math.max(X*it*c/Z,Z/(X*ut*c)):1/0}function U(Y,X,Z,ft){var it=-1,ut=Y.length,Mt=Z.x,wt=Z.y,_t=X?e(Y.area/X):0,bt;if(X==Z.dx){for((ft||_t>Z.dy)&&(_t=Z.dy);++it<ut;)bt=Y[it],bt.x=Mt,bt.y=wt,bt.dy=_t,Mt+=bt.dx=Math.min(Z.x+Z.dx-Mt,_t?e(bt.area/_t):0);bt.z=!0,bt.dx+=Z.x+Z.dx-Mt,Z.y+=_t,Z.dy-=_t}else{for((ft||_t>Z.dx)&&(_t=Z.dx);++it<ut;)bt=Y[it],bt.x=Mt,bt.y=wt,bt.dx=_t,wt+=bt.dy=Math.min(Z.y+Z.dy-wt,_t?e(bt.area/_t):0);bt.z=!1,bt.dy+=Z.y+Z.dy-wt,Z.x+=_t,Z.dx-=_t}}function ct(Y){var X=l||t(Y),Z=X[0];return Z.x=Z.y=0,Z.value?(Z.dx=n[0],Z.dy=n[1]):Z.dx=Z.dy=0,l&&t.revalue(Z),f([Z],Z.dx*Z.dy/Z.value),(l?k:h)(Z),o&&(l=X),X}return ct.size=function(Y){return arguments.length?(n=Y,ct):n},ct.padding=function(Y){if(!arguments.length)return r;function X(it){var ut=Y.call(ct,it,it.depth);return ut==null?Hi(it):Xo(it,typeof ut=="number"?[ut,ut,ut,ut]:ut)}function Z(it){return Xo(it,Y)}var ft;return a=(r=Y)==null?Hi:(ft=typeof Y)=="function"?X:(ft==="number"&&(Y=[Y,Y,Y,Y]),Z),ct},ct.round=function(Y){return arguments.length?(e=Y?Math.round:Number,ct):e!=Number},ct.sticky=function(Y){return arguments.length?(o=Y,l=null,ct):o},ct.ratio=function(Y){return arguments.length?(c=Y,ct):c},ct.mode=function(Y){return arguments.length?(s=Y+"",ct):s},Kn(ct,t)};function Hi(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function Xo(t,e){var n=t.x+e[3],r=t.y+e[0],a=t.dx-e[1]-e[3],o=t.dy-e[0]-e[2];return a<0&&(n+=a/2,a=0),o<0&&(r+=o/2,o=0),{x:n,y:r,dx:a,dy:o}}i.random={normal:function(t,e){var n=arguments.length;return n<2&&(e=1),n<1&&(t=0),function(){var r,a,o;do r=Math.random()*2-1,a=Math.random()*2-1,o=r*r+a*a;while(!o||o>1);return t+e*r*Math.sqrt(-2*Math.log(o)/o)}},logNormal:function(){var t=i.random.normal.apply(i,arguments);return function(){return Math.exp(t())}},bates:function(t){var e=i.random.irwinHall(t);return function(){return e()/t}},irwinHall:function(t){return function(){for(var e=0,n=0;n<t;n++)e+=Math.random();return e}}},i.scale={};function Tn(t){var e=t[0],n=t[t.length-1];return e<n?[e,n]:[n,e]}function Wr(t){return t.rangeExtent?t.rangeExtent():Tn(t.range())}function Fl(t,e,n,r){var a=n(t[0],t[1]),o=r(e[0],e[1]);return function(l){return o(a(l))}}function Pr(t,e){var n=0,r=t.length-1,a=t[n],o=t[r],l;return o<a&&(l=n,n=r,r=l,l=a,a=o,o=l),t[n]=e.floor(a),t[r]=e.ceil(o),t}function Uo(t){return t?{floor:function(e){return Math.floor(e/t)*t},ceil:function(e){return Math.ceil(e/t)*t}}:Ol}var Ol={floor:nt,ceil:nt};function zl(t,e,n,r){var a=[],o=[],l=0,s=Math.min(t.length,e.length)-1;for(t[s]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++l<=s;)a.push(n(t[l-1],t[l])),o.push(r(e[l-1],e[l]));return function(c){var f=i.bisect(t,c,1,s)-1;return o[f](a[f](c))}}i.scale.linear=function(){return $o([0,1],[0,1],xn,!1)};function $o(t,e,n,r){var a,o;function l(){var c=Math.min(t.length,e.length)>2?zl:Fl,f=r?tl:Js;return a=c(t,e,f,n),o=c(e,t,f,xn),s}function s(c){return a(c)}return s.invert=function(c){return o(c)},s.domain=function(c){return arguments.length?(t=c.map(Number),l()):t},s.range=function(c){return arguments.length?(e=c,l()):e},s.rangeRound=function(c){return s.range(c).interpolate(No)},s.clamp=function(c){return arguments.length?(r=c,l()):r},s.interpolate=function(c){return arguments.length?(n=c,l()):n},s.ticks=function(c){return ji(t,c)}
4,s.tickFormat=function(c,f){return qi(t,c,f)},s.nice=function(c){return Zo(t,c),l()},s.copy=function(){return $o(t,e,n,r)},l()}function Yi(t,e){return i.rebind(t,e,"range","rangeRound","interpolate","clamp")}function Zo(t,e){return Pr(t,Uo(Wn(t,e)[2])),Pr(t,Uo(Wn(t,e)[2])),t}function Wn(t,e){e==null&&(e=10);var n=Tn(t),r=n[1]-n[0],a=Math.pow(10,Math.floor(Math.log(r/e)/Math.LN10)),o=e/r*a;return o<=.15?a*=10:o<=.35?a*=5:o<=.75&&(a*=2),n[0]=Math.ceil(n[0]/a)*a,n[1]=Math.floor(n[1]/a)*a+a*.5,n[2]=a,n}function ji(t,e){return i.range.apply(i,Wn(t,e))}function qi(t,e,n){var r=Wn(t,e);if(n){var a=Ma.exec(n);if(a.shift(),a[8]==="s"){var o=i.formatPrefix(Math.max(I(r[0]),I(r[1])));return a[7]||(a[7]="."+Br(o.scale(r[2]))),a[8]="f",n=i.format(a.join("")),function(l){return n(o.scale(l))+o.symbol}}a[7]||(a[7]="."+Wl(a[8],r)),n=a.join("")}else n=",."+Br(r[2])+"f";return i.format(n)}var Tl={s:1,g:1,p:1,r:1,e:1};function Br(t){return-Math.floor(Math.log(t)/Math.LN10+.01)}function Wl(t,e){var n=Br(e[2]);return t in Tl?Math.abs(n-Br(Math.max(I(e[0]),I(e[1]))))+ +(t!=="e"):n-(t==="%")*2}i.scale.log=function(){return Ko(i.scale.linear().domain([0,1]),10,!0,[1,10])};function Ko(t,e,n,r){function a(s){return(n?Math.log(s<0?0:s):-Math.log(s>0?0:-s))/Math.log(e)}function o(s){return n?Math.pow(e,s):-Math.pow(e,-s)}function l(s){return t(a(s))}return l.invert=function(s){return o(t.invert(s))},l.domain=function(s){return arguments.length?(n=s[0]>=0,t.domain((r=s.map(Number)).map(a)),l):r},l.base=function(s){return arguments.length?(e=+s,t.domain(r.map(a)),l):e},l.nice=function(){var s=Pr(r.map(a),n?Math:Pl);return t.domain(s),r=s.map(o),l},l.ticks=function(){var s=Tn(r),c=[],f=s[0],h=s[1],k=Math.floor(a(f)),C=Math.ceil(a(h)),U=e%1?2:e;if(isFinite(C-k)){if(n){for(;k<C;k++)for(var ct=1;ct<U;ct++)c.push(o(k)*ct);c.push(o(k))}else for(c.push(o(k));k++<C;)for(var ct=U-1;ct>0;ct--)c.push(o(k)*ct);for(k=0;c[k]<f;k++);for(C=c.length;c[C-1]>h;C--);c=c.slice(k,C)}return c},l.tickFormat=function(s,c){if(!arguments.length)return Qo;
vendor: 28,210 bytes, line 4
4arguments.length<2?c=Qo:typeof c!="function"&&(c=i.format(c));var f=Math.max(1,e*s/l.ticks().length);return function(h){var k=h/o(Math.round(a(h)));return k*e<e-.5&&(k*=e),k<=f?c(h):""}},l.copy=function(){return Ko(t.copy(),e,n,r)},Yi(l,t)}var Qo=i.format(".0e"),Pl={floor:function(t){return-Math.ceil(-t)},ceil:function(t){return-Math.floor(-t)}};i.scale.pow=function(){return Jo(i.scale.linear(),1,[0,1])};function Jo(t,e,n){var r=Ir(e),a=Ir(1/e);function o(l){return t(r(l))}return o.invert=function(l){return a(t.invert(l))},o.domain=function(l){return arguments.length?(t.domain((n=l.map(Number)).map(r)),o):n},o.ticks=function(l){return ji(n,l)},o.tickFormat=function(l,s){return qi(n,l,s)},o.nice=function(l){return o.domain(Zo(n,l))},o.exponent=function(l){return arguments.length?(r=Ir(e=l),a=Ir(1/e),t.domain(n.map(r)),o):e},o.copy=function(){return Jo(t.copy(),e,n)},Yi(o,t)}function Ir(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}i.scale.sqrt=function(){return i.scale.pow().exponent(.5)},i.scale.ordinal=function(){return tu([],{t:"range",a:[[]]})};function tu(t,e){var n,r,a;function o(s){return r[((n.get(s)||(e.t==="range"?n.set(s,t.push(s)):NaN))-1)%r.length]}function l(s,c){return i.range(t.length).map(function(f){return s+c*f})}return o.domain=function(s){if(!arguments.length)return t;t=[],n=new b;for(var c=-1,f=s.length,h;++c<f;)n.has(h=s[c])||n.set(h,t.push(h));return o[e.t].apply(o,e.a)},o.range=function(s){return arguments.length?(r=s,a=0,e={t:"range",a:arguments},o):r},o.rangePoints=function(s,c){arguments.length<2&&(c=0);var f=s[0],h=s[1],k=t.length<2?(f=(f+h)/2,0):(h-f)/(t.length-1+c);return r=l(f+k*c/2,k),a=0,e={t:"rangePoints",a:arguments},o},o.rangeRoundPoints=function(s,c){arguments.length<2&&(c=0);var f=s[0],h=s[1],k=t.length<2?(f=h=Math.round((f+h)/2),0):(h-f)/(t.length-1+c)|0;return r=l(f+Math.round(k*c/2+(h-f-(t.length-1+c)*k)/2),k),a=0,e={t:"rangeRoundPoints",a:arguments},o},o.rangeBands=function(s,c,f){arguments.length<2&&(c=0),arguments.length<3&&(f=c);var h=s[1]<s[0],k=s[h-0],C=s[1-h],U=(C-k)/(t.length-c+2*f);return r=l(k+U*f,U),h&&r.reverse(),a=U*(1-c),e={t:"rangeBands",a:arguments},o},o.rangeRoundBands=function(s,c,f){arguments.length<2&&(c=0),arguments.length<3&&(f=c);var h=s[1]<s[0],k=s[h-0],C=s[1-h],U=Math.floor((C-k)/(t.length-c+2*f));return r=l(k+Math.round((C-k-(t.length-c)*U)/2),U),h&&r.reverse(),a=Math.round(U*(1-c)),e={t:"rangeRoundBands",a:arguments},o},o.rangeBand=function(){return a},o.rangeExtent=function(){return Tn(e.a[0])},o.copy=function(){return tu(t,e)},o.domain(t)}i.scale.category10=function(){return i.scale.ordinal().range(Bl)},i.scale.category20=function(){return i.scale.ordinal().range(Il)},i.scale.category20b=function(){return i.scale.ordinal().range(Rl)},i.scale.category20c=function(){return i.scale.ordinal().range(Vl)};var Bl=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(nr),Il=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(nr),Rl=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(nr),Vl=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(nr);i.scale.quantile=function(){return eu([],[])};function eu(t,e){var n;function r(){var o=0,l=e.length;for(n=[];++o<l;)n[o-1]=i.quantile(t,o/l);return a}function a(o){if(!isNaN(o=+o))return e[i.bisect(n,o)]}return a.domain=function(o){return arguments.length?(t=o.map(j).filter(G).sort(T),r()):t},a.range=function(o){return arguments.length?(e=o,r()):e},a.quantiles=function(){return n},a.invertExtent=function(o){return o=e.indexOf(o),o<0?[NaN,NaN]:[o>0?n[o-1]:t[0],o<n.length?n[o]:t[t.length-1]]},a.copy=function(){return eu(t,e)},r()}i.scale.quantize=function(){return nu(0,1,[0,1])};function nu(t,e,n){var r,a;function o(s){return n[Math.max(0,Math.min(a,Math.floor(r*(s-t))))]}function l(){return r=n.length/(e-t),a=n.length-1,o}return o.domain=function(s){return arguments.length?(t=+s[0],e=+s[s.length-1],l()):[t,e]},o.range=function(s){return arguments.length?(n=s,l()):n},o.invertExtent=function(s){return s=n.indexOf(s),s=s<0?NaN:s/r+t,[s,s+1/r]},o.copy=function(){return nu(t,e,n)},l()}i.scale.threshold=function(){return ru([.5],[0,1])};function ru(t,e){function n(r){if(r<=r)return e[i.bisect(t,r)]}return n.domain=function(r){return arguments.length?(t=r,n):t},n.range=function(r){return arguments.length?(e=r,n):e},n.invertExtent=function(r){return r=e.indexOf(r),[t[r-1],t[r]]},n.copy=function(){return ru(t,e)},n}i.scale.identity=function(){return iu([0,1])};function iu(t){function e(n){return+n}return e.invert=e,e.domain=e.range=function(n){return arguments.length?(t=n.map(e),e):t},e.ticks=function(n){return ji(t,n)},e.tickFormat=function(n,r){return qi(t,n,r)},e.copy=function(){return iu(t)},e}i.svg={};function Hl(){return 0}i.svg.arc=function(){var t=Yl,e=jl,n=Hl,r=Rr,a=au,o=ou,l=ql;function s(){var f=Math.max(0,+t.apply(this,arguments)),h=Math.max(0,+e.apply(this,arguments)),k=a.apply(this,arguments)-ye,C=o.apply(this,arguments)-ye,U=Math.abs(C-k),ct=k>C?0:1;if(h<f&&(Y=h,h=f,f=Y),U>=Ee)return c(h,ct)+(f?c(f,1-ct):"")+"Z";var Y,X,Z,ft,it=0,ut=0,Mt,wt,_t,bt,Ot,Bt,Qt,Yt,Gt=[];if((ft=(+l.apply(this,arguments)||0)/2)&&(Z=r===Rr?Math.sqrt(f*f+h*h):+r.apply(this,arguments),ct||(ut*=-1),h&&(ut=nn(Z/h*Math.sin(ft))),f&&(it=nn(Z/f*Math.sin(ft)))),h){Mt=h*Math.cos(k+ut),wt=h*Math.sin(k+ut),_t=h*Math.cos(C-ut),bt=h*Math.sin(C-ut);var St=Math.abs(C-k-2*ut)<=ee?0:1;if(ut&&Vr(Mt,wt,_t,bt)===ct^St){var Wt=(k+C)/2;Mt=h*Math.cos(Wt),wt=h*Math.sin(Wt),_t=bt=null}}else Mt=wt=0;if(f){Ot=f*Math.cos(C-it),Bt=f*Math.sin(C-it),Qt=f*Math.cos(k+it),Yt=f*Math.sin(k+it);var Vt=Math.abs(k-C+2*it)<=ee?0:1;if(it&&Vr(Ot,Bt,Qt,Yt)===1-ct^Vt){var Lt=(k+C)/2;Ot=f*Math.cos(Lt),Bt=f*Math.sin(Lt),Qt=Yt=null}}else Ot=Bt=0;if(U>Tt&&(Y=Math.min(Math.abs(h-f)/2,+n.apply(this,arguments)))>.001){X=f<h^ct?0:1;var It=Y,ne=Y;if(U<ee){var le=Qt==null?[Ot,Bt]:_t==null?[Mt,wt]:Li([Mt,wt],[Qt,Yt],[_t,bt],[Ot,Bt]),he=Mt-le[0],me=wt-le[1],_e=_t-le[0],De=bt-le[1],ze=1/Math.sin(Math.acos((he*_e+me*De)/(Math.sqrt(he*he+me*me)*Math.sqrt(_e*_e+De*De)))/2),Fe=Math.sqrt(le[0]*le[0]+le[1]*le[1]);ne=Math.min(Y,(f-Fe)/(ze-1)),It=Math.min(Y,(h-Fe)/(ze+1))}if(_t!=null){var We=Hr(Qt==null?[Ot,Bt]:[Qt,Yt],[Mt,wt],h,It,ct),Ne=Hr([_t,bt],[Ot,Bt],h,It,ct);Y===It?Gt.push("M",We[0],"A",It,",",It," 0 0,",X," ",We[1],"A",h,",",h," 0 ",1-ct^Vr(We[1][0],We[1][1],Ne[1][0],Ne[1][1]),",",ct," ",Ne[1],"A",It,",",It," 0 0,",X," ",Ne[0]):Gt.push("M",We[0],"A",It,",",It," 0 1,",X," ",Ne[0])}else Gt.push("M",Mt,",",wt);if(Qt!=null){var Pe=Hr([Mt,wt],[Qt,Yt],f,-ne,ct),wn=Hr([Ot,Bt],_t==null?[Mt,wt]:[_t,bt],f,-ne,ct);Y===ne?Gt.push("L",wn[0],"A",ne,",",ne," 0 0,",X," ",wn[1],"A",f,",",f," 0 ",ct^Vr(wn[1][0],wn[1][1],Pe[1][0],Pe[1][1]),",",1-ct," ",Pe[1],"A",ne,",",ne," 0 0,",X," ",Pe[0]):Gt.push("L",wn[0],"A",ne,",",ne," 0 0,",X," ",Pe[0])}else Gt.push("L",Ot,",",Bt)}else Gt.push("M",Mt,",",wt),_t!=null&&Gt.push("A",h,",",h," 0 ",St,",",ct," ",_t,",",bt),Gt.push("L",Ot,",",Bt),Qt!=null&&Gt.push("A",f,",",f," 0 ",Vt,",",1-ct," ",Qt,",",Yt);return Gt.push("Z"),Gt.join("")}function c(f,h){return"M0,"+f+"A"+f+","+f+" 0 1,"+h+" 0,"+-f+"A"+f+","+f+" 0 1,"+h+" 0,"+f}return s.innerRadius=function(f){return arguments.length?(t=be(f),s):t},s.outerRadius=function(f){return arguments.length?(e=be(f),s):e},s.cornerRadius=function(f){return arguments.length?(n=be(f),s):n},s.padRadius=function(f){return arguments.length?(r=f==Rr?Rr:be(f),s):r},s.startAngle=function(f){return arguments.length?(a=be(f),s):a},s.endAngle=function(f){return arguments.length?(o=be(f),s):o},s.padAngle=function(f){return arguments.length?(l=be(f),s):l},s.centroid=function(){var f=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+a.apply(this,arguments)+ +o.apply(this,arguments))/2-ye;return[Math.cos(h)*f,Math.sin(h)*f]},s};var Rr="auto";function Yl(t){return t.innerRadius}function jl(t){return t.outerRadius}function au(t){return t.startAngle}function ou(t){return t.endAngle}function ql(t){return t&&t.padAngle}function Vr(t,e,n,r){return(t-n)*e-(e-r)*t>0?0:1}function Hr(t,e,n,r,a){var o=t[0]-e[0],l=t[1]-e[1],s=(a?r:-r)/Math.sqrt(o*o+l*l),c=s*l,f=-s*o,h=t[0]+c,k=t[1]+f,C=e[0]+c,U=e[1]+f,ct=(h+C)/2,Y=(k+U)/2,X=C-h,Z=U-k,ft=X*X+Z*Z,it=n-r,ut=h*U-C*k,Mt=(Z<0?-1:1)*Math.sqrt(Math.max(0,it*it*ft-ut*ut)),wt=(ut*Z-X*Mt)/ft,_t=(-ut*X-Z*Mt)/ft,bt=(ut*Z+X*Mt)/ft,Ot=(-ut*X+Z*Mt)/ft,Bt=wt-ct,Qt=_t-Y,Yt=bt-ct,Gt=Ot-Y;return Bt*Bt+Qt*Qt>Yt*Yt+Gt*Gt&&(wt=bt,_t=Ot),[[wt-c,_t-f],[wt*n/it,_t*n/it]]}function uu(t){var e=Ln,n=qn,r=Hn,a=Ge,o=a.key,l=.7;function s(c){var f=[],h=[],k=-1,C=c.length,U,ct=be(e),Y=be(n);function X(){f.push("M",a(t(h),l))}for(;++k<C;)r.call(this,U=c[k],k)?h.push([+ct.call(this,U,k),+Y.call(this,U,k)]):h.length&&(X(),h=[]);return h.length&&X(),f.length?f.join(""):null}return s.x=function(c){return arguments.length?(e=c,s):e},s.y=function(c){return arguments.length?(n=c,s):n},s.defined=function(c){return arguments.length?(r=c,s):r},s.interpolate=function(c){return arguments.length?(typeof c=="function"?o=a=c:o=(a=Gi.get(c)||Ge).key,s):o},s.tension=function(c){return arguments.length?(l=c,s):l},s}i.svg.line=function(){return uu(nt)};var Gi=i.map({linear:Ge,"linear-closed":su,step:Gl,"step-before":Xi,"step-after":Ui,basis:lu,"basis-open":Zl,"basis-closed":Kl,bundle:Ql,cardinal:$l,"cardinal-open":Xl,"cardinal-closed":Ul,monotone:ec});Gi.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});function Ge(t){return t.length>1?t.join("L"):t+"Z"}function su(t){return t.join("L")+"Z"}function Gl(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e<n;)a.push("H",(r[0]+(r=t[e])[0])/2,"V",r[1]);return n>1&&a.push("H",r[0]),a.join("")}function Xi(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e<n;)a.push("V",(r=t[e])[1],"H",r[0]);return a.join("")}function Ui(t){for(var e=0,n=t.length,r=t[0],a=[r[0],",",r[1]];++e<n;)a.push("H",(r=t[e])[0],"V",r[1]);return a.join("")}function Xl(t,e){return t.length<4?Ge(t):t[1]+Yr(t.slice(1,-1),$i(t,e))}function Ul(t,e){return t.length<3?su(t):t[0]+Yr((t.push(t[0]),t),$i([t[t.length-2]].concat(t,[t[1]]),e))}function $l(t,e){return t.length<3?Ge(t):t[0]+Yr(t,$i(t,e))}function Yr(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return Ge(t);var n=t.length!=e.length,r="",a=t[0],o=t[1],l=e[0],s=l,c=1;if(n&&(r+="Q"+(o[0]-l[0]*2/3)+","+(o[1]-l[1]*2/3)+","+o[0]+","+o[1],a=t[1],c=2),e.length>1){s=e[1],o=t[c],c++,r+="C"+(a[0]+l[0])+","+(a[1]+l[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var f=2;f<e.length;f++,c++)o=t[c],s=e[f],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var h=t[c];r+="Q"+(o[0]+s[0]*2/3)+","+(o[1]+s[1]*2/3)+","+h[0]+","+h[1]}return r}function $i(t,e){for(var n=[],r=(1-e)/2,a,o=t[0],l=t[1],s=1,c=t.length;++s<c;)a=o,o=l,l=t[s],n.push([r*(l[0]-a[0]),r*(l[1]-a[1])]);return n}function lu(t){if(t.length<3)return Ge(t);var e=1,n=t.length,r=t[0],a=r[0],o=r[1],l=[a,a,a,(r=t[1])[0]],s=[o,o,o,r[1]],c=[a,",",o,"L",Ie(ln,l),",",Ie(ln,s)];for(t.push(t[n-1]);++e<=n;)r=t[e],l.shift(),l.push(r[0]),s.shift(),s.push(r[1]),Zi(c,l,s);return t.pop(),c.push("L",r),c.join("")}function Zl(t){if(t.length<4)return Ge(t);for(var e=[],n=-1,r=t.length,a,o=[0],l=[0];++n<3;)a=t[n],o.push(a[0]),l.push(a[1]);for(e.push(Ie(ln,o)+","+Ie(ln,l)),--n;++n<r;)a=t[n],o.shift(),o.push(a[0]),l.shift(),l.push(a[1]),Zi(e,o,l);return e.join("")}function Kl(t){for(var e,n=-1,r=t.length,a=r+4,o,l=[],s=[];++n<4;)o=t[n%r],l.push(o[0]),s.push(o[1]);for(e=[Ie(ln,l),",",Ie(ln,s)],--n;++n<a;)o=t[n%r],l.shift(),l.push(o[0]),s.shift(),s.push(o[1]),Zi(e,l,s);return e.join("")}function Ql(t,e){var n=t.length-1;if(n)for(var r=t[0][0],a=t[0][1],o=t[n][0]-r,l=t[n][1]-a,s=-1,c,f;++s<=n;)c=t[s],f=s/n,c[0]=e*c[0]+(1-e)*(r+f*o),c[1]=e*c[1]+(1-e)*(a+f*l);return lu(t)}function Ie(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}var cu=[0,2/3,1/3,0],fu=[0,1/3,2/3,0],ln=[0,1/6,2/3,1/6];function Zi(t,e,n){t.push("C",Ie(cu,e),",",Ie(cu,n),",",Ie(fu,e),",",Ie(fu,n),",",Ie(ln,e),",",Ie(ln,n))}function Ki(t,e){return(e[1]-t[1])/(e[0]-t[0])}function Jl(t){for(var e=0,n=t.length-1,r=[],a=t[0],o=t[1],l=r[0]=Ki(a,o);++e<n;)r[e]=(l+(l=Ki(a=o,o=t[e+1])))/2;return r[e]=l,r}function tc(t){for(var e=[],n,r,a,o,l=Jl(t),s=-1,c=t.length-1;++s<c;)n=Ki(t[s],t[s+1]),I(n)<Tt?l[s]=l[s+1]=0:(r=l[s]/n,a=l[s+1]/n,o=r*r+a*a,o>9&&(o=n*3/Math.sqrt(o),l[s]=o*r,l[s+1]=o*a));for(s=-1;++s<=c;)o=(t[Math.min(c,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+l[s]*l[s])),e.push([o||0,l[s]*o||0]);return e}function ec(t){return t.length<3?Ge(t):t[0]+Yr(t,tc(t))}i.svg.line.radial=function(){var t=uu(du);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t};function du(t){for(var e,n=-1,r=t.length,a,o;++n<r;)e=t[n],a=e[0],o=e[1]-ye,e[0]=a*Math.cos(o),e[1]=a*Math.sin(o);return t}function hu(t){var e=Ln,n=Ln,r=0,a=qn,o=Hn,l=Ge,s=l.key,c=l,f="L",h=.7;function k(C){var U=[],ct=[],Y=[],X=-1,Z=C.length,ft,it=be(e),ut=be(r),Mt=e===n?function(){return _t}:be(n),wt=r===a?function(){return bt}:be(a),_t,bt;function Ot(){U.push("M",l(t(Y),h),f,c(t(ct.reverse()),h),"Z")}for(;++X<Z;)o.call(this,ft=C[X],X)?(ct.push([_t=+it.call(this,ft,X),bt=+ut.call(this,ft,X)]),Y.push([+Mt.call(this,ft,X),+wt.call(this,ft,X)])):ct.length&&(Ot(),ct=[],Y=[]);return ct.length&&Ot(),U.length?U.join(""):null}return k.x=function(C){return arguments.length?(e=n=C,k):n},k.x0=function(C){return arguments.length?(e=C,k):e},k.x1=function(C){return arguments.length?(n=C,k):n},k.y=function(C){return arguments.length?(r=a=C,k):a},k.y0=function(C){return arguments.length?(r=C,k):r},k.y1=function(C){return arguments.length?(a=C,k):a},k.defined=function(C){return arguments.length?(o=C,k):o},k.interpolate=function(C){return arguments.length?(typeof C=="function"?s=l=C:s=(l=Gi.get(C)||Ge).key,c=l.reverse||l,f=l.closed?"M":"L",k):s},k.tension=function(C){return arguments.length?(h=C,k):h},k}Xi.reverse=Ui,Ui.reverse=Xi,i.svg.area=function(){return hu(nt)},i.svg.area.radial=function(){var t=hu(du);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},i.svg.chord=function(){var t=Mi,e=Ai,n=nc,r=au,a=ou;function o(h,k){var C=l(this,t,h,k),U=l(this,e,h,k);return"M"+C.p0+c(C.r,C.p1,C.a1-C.a0)+(s(C,U)?f(C.r,C.p1,C.r,C.p0):f(C.r,C.p1,U.r,U.p0)+c(U.r,U.p1,U.a1-U.a0)+f(U.r,U.p1,C.r,C.p0))+"Z"}function l(h,k,C,U){var ct=k.call(h,C,U),Y=n.call(h,ct,U),X=r.call(h,ct,U)-ye,Z=a.call(h,ct,U)-ye;return{r:Y,a0:X,a1:Z,p0:[Y*Math.cos(X),Y*Math.sin(X)],p1:[Y*Math.cos(Z),Y*Math.sin(Z)]}}function s(h,k){return h.a0==k.a0&&h.a1==k.a1}function c(h,k,C){return"A"+h+","+h+" 0 "+ +(C>ee)+",1 "+k}function f(h,k,C,U){return"Q 0,0 "+U}return o.radius=function(h){return arguments.length?(n=be(h),o):n},o.source=function(h){return arguments.length?(t=be(h),o):t},o.target=function(h){return arguments.length?(e=be(h),o):e},o.startAngle=function(h){return arguments.length?(r=be(h),o):r},o.endAngle=function(h){return arguments.length?(a=be(h),o):a},o};function nc(t){return t.radius}i.svg.diagonal=function(){var t=Mi,e=Ai,n=gu;function r(a,o){var l=t.call(this,a,o),s=e.call(this,a,o),c=(l.y+s.y)/2,f=[l,{x:l.x,y:c},{x:s.x,y:c},s];return f=f.map(n),"M"+f[0]+"C"+f[1]+" "+f[2]+" "+f[3]}return r.source=function(a){return arguments.length?(t=be(a),r):t},r.target=function(a){return arguments.length?(e=be(a),r):e},r.projection=function(a){return arguments.length?(n=a,r):n},r};function gu(t){return[t.x,t.y]}i.svg.diagonal.radial=function(){var t=i.svg.diagonal(),e=gu,n=t.projection;return t.projection=function(r){return arguments.length?n(rc(e=r)):e},t};function rc(t){return function(){var e=t.apply(this,arguments),n=e[0],r=e[1]-ye;return[n*Math.cos(r),n*Math.sin(r)]}}i.svg.symbol=function(){var t=ac,e=ic;function n(r,a){return(vu.get(t.call(this,r,a))||pu)(e.call(this,r,a))}return n.type=function(r){return arguments.length?(t=be(r),n):t},n.size=function(r){return arguments.length?(e=be(r),n):e},n};function ic(){return 64}function ac(){return"circle"}function pu(t){var e=Math.sqrt(t/ee);return"M0,"+e+"A"+e+","+e+" 0 1,1 0,"+-e+"A"+e+","+e+" 0 1,1 0,"+e+"Z"}var vu=i.map({circle:pu,cross:function(t){var e=Math.sqrt(t/5)/2;return"M"+-3*e+","+-e+"H"+-e+"V"+-3*e+"H"+e+"V"+-e+"H"+3*e+"V"+e+"H"+e+"V"+3*e+"H"+-e+"V"+e+"H"+-3*e+"Z"},diamond:function(t){var e=Math.sqrt(t/(2*mu)),n=e*mu;return"M0,"+-e+"L"+n+",0 0,"+e+" "+-n+",0Z"},square:function(t){var e=Math.sqrt(t)/2;return"M"+-e+","+-e+"L"+e+","+-e+" "+e+","+e+" "+-e+","+e+"Z"},"triangle-down":function(t){var e=Math.sqrt(t/jr),n=e*jr/2;return"M0,"+n+"L"+e+","+-n+" "+-e+","+-n+"Z"},"triangle-up":function(t){var e=Math.sqrt(t/jr),n=e*jr/2;return"M0,"+-n+"L"+e+","+n+" "+-e+","+n+"Z"}});i.svg.symbolTypes=vu.keys();var jr=Math.sqrt(3),mu=Math.tan(30*ce);gt.transition=function(t){for(var e=bn||++xu,n=Ji(t),r=[],a,o,l=Gr||{time:Date.now(),ease:Ws,delay:0,duration:250},s=-1,c=this.length;++s<c;){r.push(a=[]);for(var f=this[s],h=-1,k=f.length;++h<k;)(o=f[h])&&Xr(o,h,n,e,l),a.push(o)}return Jn(r,n,e)},gt.interrupt=function(t){return this.each(t==null?qr:yu(Ji(t)))};var qr=yu(Ji());function yu(t){return function(){var e,n,r;(e=this[t])&&(r=e[n=e.active])&&(r.timer.c=null,r.timer.t=NaN,--e.count?delete e[n]:delete this[t],e.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Jn(t,e,n){return vt(t,Ce),t.namespace=e,t.id=n,t}var Ce=[],xu=0,bn,Gr;Ce.call=gt.call,Ce.empty=gt.empty,Ce.node=gt.node,Ce.size=gt.size,i.transition=function(t,e){return t&&t.transition?bn?t.transition(e):t:i.selection().transition(t)},i.transition.prototype=Ce,Ce.select=function(t){var e=this.id,n=this.namespace,r=[],a,o,l;t=Q(t);for(var s=-1,c=this.length;++s<c;){r.push(a=[]);for(var f=this[s],h=-1,k=f.length;++h<k;)(l=f[h])&&(o=t.call(l,l.__data__,h,s))?("__data__"in l&&(o.__data__=l.__data__),Xr(o,h,n,e,l[n][e]),a.push(o)):a.push(null)}return Jn(r,n,e)},Ce.selectAll=function(t){var e=this.id,n=this.namespace,r=[],a,o,l,s,c;t=kt(t);for(var f=-1,h=this.length;++f<h;)for(var k=this[f],C=-1,U=k.length;++C<U;)if(l=k[C]){c=l[n][e],o=t.call(l,l.__data__,C,f),r.push(a=[]);for(var ct=-1,Y=o.length;++ct<Y;)(s=o[ct])&&Xr(s,ct,n,e,c),a.push(s)}return Jn(r,n,e)},Ce.filter=function(t){var e=[],n,r,a;typeof t!="function"&&(t=Nt(t));for(var o=0,l=this.length;o<l;o++){e.push(n=[]);for(var r=this[o],s=0,c=r.length;s<c;s++)(a=r[s])&&t.call(a,a.__data__,s,o)&&n.push(a)}return Jn(e,this.namespace,this.id)},Ce.tween=function(t,e){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(t):Et(this,e==null?function(a){a[r][n].tween.remove(t)}:function(a){a[r][n].tween.set(t,e)})};function Qi(t,e,n,r){var a=t.id,o=t.namespace;return Et(t,typeof n=="function"?function(l,s,c){l[o][a].tween.set(e,r(n.call(l,l.__data__,s,c)))}:(n=r(n),function(l){l[o][a].tween.set(e,n)}))}Ce.attr=function(t,e){if(arguments.length<2){for(e in t)this.attr(e,t[e]);return this}var n=t=="transform"?zo:xn,r=i.ns.qualify(t);function a(){this.removeAttribute(r)}function o(){this.removeAttributeNS(r.space,r.local)}function l(c){return c==null?a:(c+="",function(){var f=this.getAttribute(r),h;return f!==c&&(h=n(f,c),function(k){this.setAttribute(r,h(k))})})}function s(c){return c==null?o:(c+="",function(){var f=this.getAttributeNS(r.space,r.local),h;return f!==c&&(h=n(f,c),function(k){this.setAttributeNS(r.space,r.local,h(k))})})}return Qi(this,"attr."+t,e,r.local?s:l)},Ce.attrTween=function(t,e){var n=i.ns.qualify(t);function r(o,l){var s=e.call(this,o,l,this.getAttribute(n));return s&&function(c){this.setAttribute(n,s(c))}}function a(o,l){var s=e.call(this,o,l,this.getAttributeNS(n.space,n.local));return s&&function(c){this.setAttributeNS(n.space,n.local,s(c))}}return this.tween("attr."+t,n.local?a:r)},Ce.style=function(t,e,n){var r=arguments.length;if(r<3){if(typeof t!="string"){r<2&&(e="");for(n in t)this.style(n,t[n],e);return this}n=""}function a(){this.style.removeProperty(t)}function o(l){return l==null?a:(l+="",function(){var s=F(this).getComputedStyle(this,null).getPropertyValue(t),c;return s!==l&&(c=xn(s,l),function(f){this.style.setProperty(t,c(f),n)})})}return Qi(this,"style."+t,e,o)},Ce.styleTween=function(t,e,n){arguments.length<3&&(n="");function r(a,o){var l=e.call(this,a,o,F(this).getComputedStyle(this,null).getPropertyValue(t));return l&&function(s){this.style.setProperty(t,l(s),n)}}return this.tween("style."+t,r)},Ce.text=function(t){return Qi(this,"text",t,oc)};function oc(t){return t==null&&(t=""),function(){this.textContent=t}}Ce.remove=function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},Ce.ease=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].ease:(typeof t!="function"&&(t=i.ease.apply(i,arguments)),Et(this,function(r){r[n][e].ease=t}))},Ce.delay=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].delay:Et(this,typeof t=="function"?function(r,a,o){r[n][e].delay=+t.call(r,r.__data__,a,o)}:(t=+t,function(r){r[n][e].delay=t}))},Ce.duration=function(t){var e=this.id,n=this.namespace;return arguments.length<1?this.node()[n][e].duration:Et(this,typeof t=="function"?function(r,a,o){r[n][e].duration=Math.max(1,t.call(r,r.__data__,a,o))}:(t=Math.max(1,t),function(r){r[n][e].duration=t}))},Ce.each=function(t,e){var n=this.id,r=this.namespace;if(arguments.length<2){var a=Gr,o=bn;try{bn=n,Et(this,function(l,s,c){Gr=l[r][n],t.call(l,l.__data__,s,c)})}finally{Gr=a,bn=o}}else Et(this,function(l){var s=l[r][n];(s.event||(s.event=i.dispatch("start","end","interrupt"))).on(t,e)});return this},Ce.transition=function(){for(var t=this.id,e=++xu,n=this.namespace,r=[],a,o,l,s,c=0,f=this.length;c<f;c++){r.push(a=[]);for(var o=this[c],h=0,k=o.length;h<k;h++)(l=o[h])&&(s=l[n][t],Xr(l,h,n,e,{time:s.time,ease:s.ease,delay:s.delay+s.duration,duration:s.duration})),a.push(l)}return Jn(r,n,e)};function Ji(t){return t==null?"__transition__":"__transition_"+t+"__"}function Xr(t,e,n,r,a){var o=t[n]||(t[n]={active:0,count:0}),l=o[r],s,c,f,h,k;function C(Y){var X=l.delay;if(c.t=X+s,X<=Y)return U(Y-X);c.c=U}function U(Y){var X=o.active,Z=o[X];Z&&(Z.timer.c=null,Z.timer.t=NaN,--o.count,delete o[X],Z.event&&Z.event.interrupt.call(t,t.__data__,Z.index));for(var ft in o)if(+ft<r){var it=o[ft];it.timer.c=null,it.timer.t=NaN,--o.count,delete o[ft]}c.c=ct,cr(function(){return c.c&&ct(Y||1)&&(c.c=null,c.t=NaN),1},0,s),o.active=r,l.event&&l.event.start.call(t,t.__data__,e),k=[],l.tween.forEach(function(ut,Mt){(Mt=Mt.call(t,t.__data__,e))&&k.push(Mt)}),h=l.ease,f=l.duration}function ct(Y){for(var X=Y/f,Z=h(X),ft=k.length;ft>0;)k[--ft].call(t,Z);if(X>=1)return l.event&&l.event.end.call(t,t.__data__,e),--o.count?delete o[r]:delete t[n],1}l||(s=a.time,c=cr(C,0,s),l=o[r]={tween:new b,time:s,timer:c,delay:a.delay,duration:a.duration,ease:a.ease,index:e},a=null,++o.count)}i.svg.axis=function(){var t=i.scale.linear(),e=bu,n=6,r=6,a=3,o=[10],l=null,s;function c(f){f.each(function(){var h=i.select(this),k=this.__chart__||t,C=this.__chart__=t.copy(),U=l??(C.ticks?C.ticks.apply(C,o):C.domain()),ct=s??(C.tickFormat?C.tickFormat.apply(C,o):nt),Y=h.selectAll(".tick").data(U,C),X=Y.enter().insert("g",".domain").attr("class","tick").style("opacity",Tt),Z=i.transition(Y.exit()).style("opacity",Tt).remove(),ft=i.transition(Y.order()).style("opacity",1),it=Math.max(n,0)+a,ut,Mt=Wr(C),wt=h.selectAll(".domain").data([0]),_t=(wt.enter().append("path").attr("class","domain"),i.transition(wt));X.append("line"),X.append("text");var bt=X.select("line"),Ot=ft.select("line"),Bt=Y.select("text").text(ct),Qt=X.select("text"),Yt=ft.select("text"),Gt=e==="top"||e==="left"?-1:1,St,Wt,Vt,Lt;if(e==="bottom"||e==="top"?(ut=sc,St="x",Vt="y",Wt="x2",Lt="y2",Bt.attr("dy",Gt<0?"0em":".71em").style("text-anchor","middle"),_t.attr("d","M"+Mt[0]+","+Gt*r+"V0H"+Mt[1]+"V"+Gt*r)):(ut=lc,St="y",Vt="x",Wt="y2",Lt="x2",Bt.attr("dy",".32em").style("text-anchor",Gt<0?"end":"start"),_t.attr("d","M"+Gt*r+","+Mt[0]+"H0V"+Mt[1]+"H"+Gt*r)),bt.attr(Lt,Gt*n),Qt.attr(Vt,Gt*it),Ot.attr(Wt,0).attr(Lt,Gt*n),Yt.attr(St,0).attr(Vt,Gt*it),C.rangeBand){var It=C,ne=It.rangeBand()/2;k=C=function(le){return It(le)+ne}}else k.rangeBand?k=C:Z.call(ut,C,k);X.call(ut,k,C),ft.call(ut,C,C)})}return c.scale=function(f){return arguments.length?(t=f,c):t},c.orient=function(f){return arguments.length?(e=f in uc?f+"":bu,c):e},c.ticks=function(){return arguments.length?(o=m(arguments),c):o},c.tickValues=function(f){return arguments.length?(l=f,c):l},c.tickFormat=function(f){return arguments.length?(s=f,c):s},c.tickSize=function(f){var h=arguments.length;return h?(n=+f,r=+arguments[h-1],c):n},c.innerTickSize=function(f){return arguments.length?(n=+f,c):n},c.outerTickSize=function(f){return arguments.length?(r=+f,c):r},c.tickPadding=function(f){return arguments.length?(a=+f,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var bu="bottom",uc={top:1,right:1,bottom:1,left:1};function sc(t,e,n){t.attr("transform",function(r){var a=e(r);return"translate("+(isFinite(a)?a:n(r))+",0)"})}function lc(t,e,n){t.attr("transform",function(r){var a=e(r);return"translate(0,"+(isFinite(a)?a:n(r))+")"})}i.svg.brush=function(){var t=ot(h,"brushstart","brush","brushend"),e=null,n=null,r=[0,0],a=[0,0],o,l,s=!0,c=!0,f=ta[0];function h(Y){Y.each(function(){var X=i.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ct).on("touchstart.brush",ct),Z=X.selectAll(".background").data([0]);Z.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),X.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var ft=X.selectAll(".resize").data(f,nt);ft.exit().remove(),ft.enter().append("g").attr("class",function(wt){return"resize "+wt}).style("cursor",function(wt){return cc[wt]}).append("rect").attr("x",function(wt){return/[ew]$/.test(wt)?-3:null}).attr("y",function(wt){return/^[ns]/.test(wt)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),ft.style("display",h.empty()?"none":null);var it=i.transition(X),ut=i.transition(Z),Mt;e&&(Mt=Wr(e),ut.attr("x",Mt[0]).attr("width",Mt[1]-Mt[0]),C(it)),n&&(Mt=Wr(n),ut.attr("y",Mt[0]).attr("height",Mt[1]-Mt[0]),U(it)),k(it)})}h.event=function(Y){Y.each(function(){var X=t.of(this,arguments),Z={x:r,y:a,i:o,j:l},ft=this.__chart__||Z;this.__chart__=Z,bn?i.select(this).transition().each("start.brush",function(){o=ft.i,l=ft.j,r=ft.x,a=ft.y,X({type:"brushstart"})}).tween("brush:brush",function(){var it=Tr(r,Z.x),ut=Tr(a,Z.y);return o=l=null,function(Mt){r=Z.x=it(Mt),a=Z.y=ut(Mt),X({type:"brush",mode:"resize"})}}).each("end.brush",function(){o=Z.i,l=Z.j,X({type:"brush",mode:"resize"}),X({type:"brushend"})}):(X({type:"brushstart"}),X({type:"brush",mode:"resize"}),X({type:"brushend"}))})};function k(Y){Y.selectAll(".resize").attr("transform",function(X){return"translate("+r[+/e$/.test(X)]+","+a[+/^s/.test(X)]+")"})}function C(Y){Y.select(".extent").attr("x",r[0]),Y.selectAll(".extent,.n>rect,.s>rect").attr("width",r[1]-r[0])}function U(Y){Y.select(".extent").attr("y",a[0]),Y.selectAll(".extent,.e>rect,.w>rect").attr("height",a[1]-a[0])}function ct(){var Y=this,X=i.select(i.event.target),Z=t.of(Y,arguments),ft=i.select(Y),it=X.datum(),ut=!/^(n|s)$/.test(it)&&e,Mt=!/^(e|w)$/.test(it)&&n,wt=X.classed("extent"),_t=Ft(Y),bt,Ot=i.mouse(Y),Bt,Qt=i.select(F(Y)).on("keydown.brush",St).on("keyup.brush",Wt);if(i.event.changedTouches?Qt.on("touchmove.brush",Vt).on("touchend.brush",It):Qt.on("mousemove.brush",Vt).on("mouseup.brush",It),ft.interrupt().selectAll("*").interrupt(),wt)Ot[0]=r[0]-Ot[0],Ot[1]=a[0]-Ot[1];else if(it){var Yt=+/w$/.test(it),Gt=+/^n/.test(it);Bt=[r[1-Yt]-Ot[0],a[1-Gt]-Ot[1]],Ot[0]=r[Yt],Ot[1]=a[Gt]}
4else i.event.altKey&&(bt=Ot.slice());ft.style("pointer-events","none").selectAll(".resize").style("display",null),i.select("body").style("cursor",X.style("cursor")),Z({type:"brushstart"}),Vt();function St(){i.event.keyCode==32&&(wt||(bt=null,Ot[0]-=r[1],Ot[1]-=a[1],wt=2),B())}function Wt(){i.event.keyCode==32&&wt==2&&(Ot[0]+=r[1],Ot[1]+=a[1],wt=0,B())}function Vt(){var ne=i.mouse(Y),le=!1;Bt&&(ne[0]+=Bt[0],ne[1]+=Bt[1]),wt||(i.event.altKey?(bt||(bt=[(r[0]+r[1])/2,(a[0]+a[1])/2]),Ot[0]=r[+(ne[0]<bt[0])],Ot[1]=a[+(ne[1]<bt[1])]):bt=null),ut&&Lt(ne,e,0)&&(C(ft),le=!0),Mt&&Lt(ne,n,1)&&(U(ft),le=!0),le&&(k(ft),Z({type:"brush",mode:wt?"move":"resize"}))}function Lt(ne,le,he){var me=Wr(le),_e=me[0],De=me[1],ze=Ot[he],Fe=he?a:r,We=Fe[1]-Fe[0],Ne,Pe;if(wt&&(_e-=ze,De-=We+ze),Ne=(he?c:s)?Math.max(_e,Math.min(De,ne[he])):ne[he],wt?Pe=(Ne+=ze)+We:(bt&&(ze=Math.max(_e,Math.min(De,2*bt[he]-Ne))),ze<Ne?(Pe=Ne,Ne=ze):Pe=ze),Fe[0]!=Ne||Fe[1]!=Pe)return he?l=null:o=null,Fe[0]=Ne,Fe[1]=Pe,!0}function It(){Vt(),ft.style("pointer-events","all").selectAll(".resize").style("display",h.empty()?"none":null),i.select("body").style("cursor",null),Qt.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),_t(),Z({type:"brushend"})}}return h.x=function(Y){return arguments.length?(e=Y,f=ta[!e<<1|!n],h):e},h.y=function(Y){return arguments.length?(n=Y,f=ta[!e<<1|!n],h):n},h.clamp=function(Y){return arguments.length?(e&&n?(s=!!Y[0],c=!!Y[1]):e?s=!!Y:n&&(c=!!Y),h):e&&n?[s,c]:e?s:n?c:null},h.extent=function(Y){var X,Z,ft,it,ut;return arguments.length?(e&&(X=Y[0],Z=Y[1],n&&(X=X[0],Z=Z[0]),o=[X,Z],e.invert&&(X=e(X),Z=e(Z)),Z<X&&(ut=X,X=Z,Z=ut),(X!=r[0]||Z!=r[1])&&(r=[X,Z])),n&&(ft=Y[0],it=Y[1],e&&(ft=ft[1],it=it[1]),l=[ft,it],n.invert&&(ft=n(ft),it=n(it)),it<ft&&(ut=ft,ft=it,it=ut),(ft!=a[0]||it!=a[1])&&(a=[ft,it])),h):(e&&(o?(X=o[0],Z=o[1]):(X=r[0],Z=r[1],e.invert&&(X=e.invert(X),Z=e.invert(Z)),Z<X&&(ut=X,X=Z,Z=ut))),n&&(l?(ft=l[0],it=l[1]):(ft=a[0],it=a[1],n.invert&&(ft=n.invert(ft),it=n.invert(it)),it<ft&&(ut=ft,ft=it,it=ut))),e&&n?[[X,ft],[Z,it]]:e?[X,Z]:n&&[ft,it])},h.clear=function(){return h.empty()||(r=[0,0],a=[0,0],o=l=null),h},h.empty=function(){return!!e&&r[0]==r[1]||!!n&&a[0]==a[1]},i.rebind(h,t,"on")};var cc={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ta=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],ea=re.format=La.timeFormat,_u=ea.utc,wu=_u("%Y-%m-%dT%H:%M:%S.%LZ");ea.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?na:wu;function na(t){return t.toISOString()}na.parse=function(t){var e=new Date(t);return isNaN(e)?null:e},na.toString=wu.toString,re.second=dn(function(t){return new Le(Math.floor(t/1e3)*1e3)},function(t,e){t.setTime(t.getTime()+Math.floor(e)*1e3)},function(t){return t.getSeconds()}),re.seconds=re.second.range,re.seconds.utc=re.second.utc.range,re.minute=dn(function(t){return new Le(Math.floor(t/6e4)*6e4)},function(t,e){t.setTime(t.getTime()+Math.floor(e)*6e4)},function(t){return t.getMinutes()}),re.minutes=re.minute.range,re.minutes.utc=re.minute.utc.range,re.hour=dn(function(t){var e=t.getTimezoneOffset()/60;return new Le((Math.floor(t/36e5-e)+e)*36e5)},function(t,e){t.setTime(t.getTime()+Math.floor(e)*36e5)},function(t){return t.getHours()}),re.hours=re.hour.range,re.hours.utc=re.hour.utc.range,re.month=dn(function(t){return t=re.day(t),t.setDate(1),t},function(t,e){t.setMonth(t.getMonth()+e)},function(t){return t.getMonth()}),re.months=re.month.range,re.months.utc=re.month.utc.range;function ra(t,e,n){function r(o){return t(o)}r.invert=function(o){return _n(t.invert(o))},r.domain=function(o){return arguments.length?(t.domain(o),r):t.domain().map(_n)};function a(o,l){var s=o[1]-o[0],c=s/l,f=i.bisect(Ur,c);return f==Ur.length?[e.year,Wn(o.map(function(h){return h/31536e6}),l)[2]]:f?e[c/Ur[f-1]<Ur[f]/c?f-1:f]:[dc,Wn(o,l)[2]]}return r.nice=function(o,l){var s=r.domain(),c=Tn(s),f=o==null?a(c,10):typeof o=="number"&&a(c,o);f&&(o=f[0],l=f[1]);function h(k){return!isNaN(k)&&!o.range(k,_n(+k+1),l).length}return r.domain(Pr(s,l>1?{floor:function(k){for(;h(k=o.floor(k));)k=_n(k-1);return k},ceil:function(k){for(;h(k=o.ceil(k));)k=_n(+k+1);return k}}:o))},r.ticks=function(o,l){var s=Tn(r.domain()),c=o==null?a(s,10):typeof o=="number"?a(s,o):!o.range&&[{range:o},l];return c&&(o=c[0],l=c[1]),o.range(s[0],_n(+s[1]+1),l<1?1:l)},r.tickFormat=function(){return n},r.copy=function(){return ra(t.copy(),e,n)},Yi(r,t)}function _n(t){return new Date(t)}var Ur=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],ia=[[re.second,1],[re.second,5],[re.second,15],[re.second,30],[re.minute,1],[re.minute,5],[re.minute,15],[re.minute,30],[re.hour,1],[re.hour,3],[re.hour,6],[re.hour,12],[re.day,1],[re.day,2],[re.week,1],[re.month,1],[re.month,3],[re.year,1]],fc=ea.multi([[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%a %d",function(t){return t.getDay()&&t.getDate()!=1}],["%b %d",function(t){return t.getDate()!=1}],["%B",function(t){return t.getMonth()}],["%Y",Hn]]),dc={range:function(t,e,n){return i.range(Math.ceil(t/n)*n,+e,n).map(_n)},floor:nt,ceil:nt};ia.year=re.year,re.scale=function(){return ra(i.scale.linear(),ia,fc)};var ku=ia.map(function(t){return[t[0].utc,t[1]]}),hc=_u.multi([[".%L",function(t){return t.getUTCMilliseconds()}],[":%S",function(t){return t.getUTCSeconds()}],["%I:%M",function(t){return t.getUTCMinutes()}],["%I %p",function(t){return t.getUTCHours()}],["%a %d",function(t){return t.getUTCDay()&&t.getUTCDate()!=1}],["%b %d",function(t){return t.getUTCDate()!=1}],["%B",function(t){return t.getUTCMonth()}],["%Y",Hn]]);ku.year=re.year.utc,re.scale.utc=function(){return ra(i.scale.linear(),ku,hc)},i.text=fi(function(t){return t.responseText}),i.json=function(t,e){return ar(t,"application/json",gc,e)};function gc(t){return JSON.parse(t.responseText)}i.html=function(t,e){return ar(t,"text/html",pc,e)};function pc(t){var e=E.createRange();return e.selectNode(E.body),e.createContextualFragment(t.responseText)}i.xml=fi(function(t){return t.responseXML}),typeof te=="object"&&te.exports?te.exports=i:this.d3=i})()},{}],20:[function($t,te,ue){/*! (C) WebReflection Mit Style License */(function(i,u,m,E){function x(Pt,Xt){for(var lt=0,At=Pt.length;lt<At;lt++)N(Pt[lt],Xt)}function F(Pt){for(var Xt=0,lt=Pt.length,At;Xt<lt;Xt++)At=Pt[Xt],Ae(At,pt[d(At)])}function A(Pt){return function(Xt){Rt(Xt)&&(N(Xt,Pt),x(Xt.querySelectorAll(xt),Pt))}}function d(Pt){var Xt=Pt.getAttribute("is"),lt=Pt.nodeName.toUpperCase(),At=R.call(nt,Xt?et+Xt.toUpperCase():z+lt);return Xt&&-1<At&&!v(lt,Xt)?-1:At}function v(Pt,Xt){return-1<xt.indexOf(Pt+'[is="'+Xt+'"]')}function y(Pt){var Xt=Pt.currentTarget,lt=Pt.attrChange,At=Pt.attrName,Ct=Pt.target;Nt&&(!Ct||Ct===Xt)&&Xt.attributeChangedCallback&&At!=="style"&&Pt.prevValue!==Pt.newValue&&Xt.attributeChangedCallback(At,lt===Pt[W]?null:Pt.prevValue,lt===Pt[K]?null:Pt.newValue)}function w(Pt){var Xt=A(Pt);return function(lt){mt.push(Xt,lt.target)}}function T(Pt){jt&&(jt=!1,Pt.currentTarget.removeEventListener(rt,T)),x((Pt.target||u).querySelectorAll(xt),Pt.detail===H?H:q),kt&&P()}function j(Pt,Xt){var lt=this;zt.call(lt,Pt,Xt),Zt.call(lt,{target:lt})}function G(Pt,Xt){dt(Pt,Xt),de?de.observe(Pt,se):(qt&&(Pt.setAttribute=j,Pt[I]=ae(Pt),Pt.addEventListener(p,Zt)),Pt.addEventListener(V,y)),Pt.createdCallback&&Nt&&(Pt.created=!0,Pt.createdCallback(),Pt.created=!1)}function P(){for(var Pt,Xt=0,lt=Ut.length;Xt<lt;Xt++)Pt=Ut[Xt],st.contains(Pt)||(lt--,Ut.splice(Xt--,1),N(Pt,H))}function tt(Pt){throw new Error("A "+Pt+" type is already registered")}function N(Pt,Xt){var lt,At=d(Pt);-1<At&&(ke(Pt,pt[At]),At=0,Xt===q&&!Pt[q]?(Pt[H]=!1,Pt[q]=!0,At=1,kt&&R.call(Ut,Pt)<0&&Ut.push(Pt)):Xt===H&&!Pt[H]&&(Pt[q]=!1,Pt[H]=!0,At=1),At&&(lt=Pt[Xt+"Callback"])&<.call(Pt))}if(!(E in u)){var I="__"+E+(Math.random()*1e5>>0),q="attached",H="detached",b="extends",W="ADDITION",O="MODIFICATION",K="REMOVAL",V="DOMAttrModified",rt="DOMContentLoaded",p="DOMSubtreeModified",z="<",et="=",S=/^[A-Z][A-Z0-9]*(?:-[A-Z0-9]+)+$/,M=["ANNOTATION-XML","COLOR-PROFILE","FONT-FACE","FONT-FACE-SRC","FONT-FACE-URI","FONT-FACE-FORMAT","FONT-FACE-NAME","MISSING-GLYPH"],nt=[],pt=[],xt="",st=u.documentElement,R=nt.indexOf||function(Pt){for(var Xt=this.length;Xt--&&this[Xt]!==Pt;);return Xt},L=m.prototype,g=L.hasOwnProperty,B=L.isPrototypeOf,J=m.defineProperty,ot=m.getOwnPropertyDescriptor,ht=m.getOwnPropertyNames,vt=m.getPrototypeOf,at=m.setPrototypeOf,yt=!!m.__proto__,D=m.create||function Pt(Xt){return Xt?(Pt.prototype=Xt,new Pt):this},dt=at||(yt?function(Pt,Xt){return Pt.__proto__=Xt,Pt}:ht&&ot?function(){function Pt(Xt,lt){for(var At,Ct=ht(lt),Ft=0,ie=Ct.length;Ft<ie;Ft++)At=Ct[Ft],g.call(Xt,At)||J(Xt,At,ot(lt,At))}return function(Xt,lt){do Pt(Xt,lt);while((lt=vt(lt))&&!B.call(lt,Xt));return Xt}}():function(Pt,Xt){for(var lt in Xt)Pt[lt]=Xt[lt];return Pt}),gt=i.MutationObserver||i.WebKitMutationObserver,Q=(i.HTMLElement||i.Element||i.Node).prototype,kt=!B.call(Q,st),Rt=kt?function(Pt){return Pt.nodeType===1}:function(Pt){return B.call(Q,Pt)},Ut=kt&&[],Jt=Q.cloneNode,zt=Q.setAttribute,Ht=Q.removeAttribute,oe=u.createElement,se=gt&&{attributes:!0,characterData:!0,attributeOldValue:!0},pe=gt||function(Pt){qt=!1,st.removeEventListener(V,pe)},mt,Dt=i.requestAnimationFrame||i.webkitRequestAnimationFrame||i.mozRequestAnimationFrame||i.msRequestAnimationFrame||function(Pt){setTimeout(Pt,10)},Kt=!1,qt=!0,jt=!0,Nt=!0,Zt,Et,ae,de,ke,Ae;at||yt?(ke=function(Pt,Xt){B.call(Xt,Pt)||G(Pt,Xt)},Ae=G):(ke=function(Pt,Xt){Pt[I]||(Pt[I]=m(!0),G(Pt,Xt))},Ae=ke),kt?(qt=!1,function(){var Pt=ot(Q,"addEventListener"),Xt=Pt.value,lt=function(Ft){var ie=new CustomEvent(V,{bubbles:!0});ie.attrName=Ft,ie.prevValue=this.getAttribute(Ft),ie.newValue=null,ie[K]=ie.attrChange=2,Ht.call(this,Ft),this.dispatchEvent(ie)},At=function(Ft,ie){var fe=this.hasAttribute(Ft),xe=fe&&this.getAttribute(Ft),Tt=new CustomEvent(V,{bubbles:!0});zt.call(this,Ft,ie),Tt.attrName=Ft,Tt.prevValue=fe?xe:null,Tt.newValue=ie,fe?Tt[O]=Tt.attrChange=1:Tt[W]=Tt.attrChange=0,this.dispatchEvent(Tt)},Ct=function(Ft){var ie=Ft.currentTarget,fe=ie[I],xe=Ft.propertyName,Tt;fe.hasOwnProperty(xe)&&(fe=fe[xe],Tt=new CustomEvent(V,{bubbles:!0}),Tt.attrName=fe.name,Tt.prevValue=fe.value||null,Tt.newValue=fe.value=ie[xe]||null,Tt.prevValue==null?Tt[W]=Tt.attrChange=0:Tt[O]=Tt.attrChange=1,ie.dispatchEvent(Tt))};Pt.value=function(Ft,ie,fe){Ft===V&&this.attributeChangedCallback&&this.setAttribute!==At&&(this[I]={className:{name:"class",value:this.className}},this.setAttribute=At,this.removeAttribute=lt,Xt.call(this,"propertychange",Ct)),Xt.call(this,Ft,ie,fe)},J(Q,"addEventListener",Pt)}()):gt||(st.addEventListener(V,pe),st.setAttribute(I,1),st.removeAttribute(I),qt&&(Zt=function(Pt){var Xt=this,lt,At,Ct;if(Xt===Pt.target){lt=Xt[I],Xt[I]=At=ae(Xt);for(Ct in At){if(!(Ct in lt))return Et(0,Xt,Ct,lt[Ct],At[Ct],W);
4if(At[Ct]!==lt[Ct])return Et(1,Xt,Ct,lt[Ct],At[Ct],O)}for(Ct in lt)if(!(Ct in At))return Et(2,Xt,Ct,lt[Ct],At[Ct],K)}},Et=function(Pt,Xt,lt,At,Ct,Ft){var ie={attrChange:Pt,currentTarget:Xt,attrName:lt,prevValue:At,newValue:Ct};ie[Ft]=Pt,y(ie)},ae=function(Pt){for(var Xt,lt,At={},Ct=Pt.attributes,Ft=0,ie=Ct.length;Ft<ie;Ft++)Xt=Ct[Ft],lt=Xt.name,lt!=="setAttribute"&&(At[lt]=Xt.value);return At})),u[E]=function(Pt,Xt){if(ie=Pt.toUpperCase(),Kt||(Kt=!0,gt?(de=function(xe,Tt){function ve(ee,ge){for(var Ee=0,ye=ee.length;Ee<ye;ge(ee[Ee++]));}return new gt(function(ee){for(var ge,Ee,ye,ce=0,we=ee.length;ce<we;ce++)ge=ee[ce],ge.type==="childList"?(ve(ge.addedNodes,xe),ve(ge.removedNodes,Tt)):(Ee=ge.target,Nt&&Ee.attributeChangedCallback&&ge.attributeName!=="style"&&(ye=Ee.getAttribute(ge.attributeName),ye!==ge.oldValue&&Ee.attributeChangedCallback(ge.attributeName,ge.oldValue,ye)))})}(A(q),A(H)),de.observe(u,{childList:!0,subtree:!0})):(mt=[],Dt(function xe(){for(;mt.length;)mt.shift().call(null,mt.shift());Dt(xe)}),u.addEventListener("DOMNodeInserted",w(q)),u.addEventListener("DOMNodeRemoved",w(H))),u.addEventListener(rt,T),u.addEventListener("readystatechange",T),u.createElement=function(xe,Tt){var ve=oe.apply(u,arguments),ee=""+xe,ge=R.call(nt,(Tt?et:z)+(Tt||ee).toUpperCase()),Ee=-1<ge;return Tt&&(ve.setAttribute("is",Tt=Tt.toLowerCase()),Ee&&(Ee=v(ee.toUpperCase(),Tt))),Nt=!u.createElement.innerHTMLHelper,Ee&&Ae(ve,pt[ge]),ve},Q.cloneNode=function(xe){var Tt=Jt.call(this,!!xe),ve=d(Tt);return-1<ve&&Ae(Tt,pt[ve]),xe&&F(Tt.querySelectorAll(xt)),Tt}),-2<R.call(nt,et+ie)+R.call(nt,z+ie)&&tt(Pt),!S.test(ie)||-1<R.call(M,ie))throw new Error("The type "+Pt+" is invalid");var lt=function(){return Ct?u.createElement(Ft,ie):u.createElement(Ft)},At=Xt||L,Ct=g.call(At,b),Ft=Ct?Xt[b].toUpperCase():ie,ie,fe;return Ct&&-1<R.call(nt,z+Ft)&&tt(Ft),fe=nt.push((Ct?et:z)+ie)-1,xt=xt.concat(xt.length?",":"",Ct?Ft+'[is="'+Pt.toLowerCase()+'"]':Ft),lt.prototype=pt[fe]=g.call(At,"prototype")?At.prototype:D(Q),x(u.querySelectorAll(xt),q),lt}}})(window,document,Object,"registerElement")},{}],21:[function($t,te,ue){/*! 5Copyright (C) 2013-2015 by Andrea Giammarchi - @WebReflection 6 7Permission is hereby granted, free of charge, to any person obtaining a copy 8of this software and associated documentation files (the "Software"), to deal 9in the Software without restriction, including without limitation the rights 10to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 11copies of the Software, and to permit persons to whom the Software is 12furnished to do so, subject to the following conditions: 13 14The above copyright notice and this permission notice shall be included in 15all copies or substantial portions of the Software. 16 17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 20AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 22OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 23THE SOFTWARE. 24 25*/(function(i){function u(){return T.createDocumentFragment()}function m(at){return T.createElement(at)}function E(at,yt){if(!at)throw new Error("Failed to construct "+yt+": 1 argument required, but only 0 present.")}function x(at){if(at.length===1)return F(at[0]);for(var yt=u(),D=ht.call(at),dt=0;dt<at.length;dt++)yt.appendChild(F(D[dt]));return yt}function F(at){return typeof at=="string"?T.createTextNode(at):at}for(var A,d,v,y,w,T=i.document,j=Object.prototype.hasOwnProperty,G=Object.defineProperty||function(at,yt,D){return j.call(D,"value")?at[yt]=D.value:(j.call(D,"get")&&at.__defineGetter__(yt,D.get),j.call(D,"set")&&at.__defineSetter__(yt,D.set)),at},P=[].indexOf||function(yt){for(var D=this.length;D--&&this[D]!==yt;);return D},tt=function(at){if(at){if(b.test(at))throw"InvalidCharacterError"}else throw"SyntaxError";return at},N=function(at){var yt=typeof at.className>"u",D=yt?at.getAttribute("class")||"":at.className,dt=yt||typeof D=="object",gt=(dt?yt?D:D.baseVal:D).replace(H,"");gt.length&&ot.push.apply(this,gt.split(b)),this._isSVG=dt,this._=at},I={get:function(){return new N(this)},set:function(){}},q="dom4-tmp-".concat(Math.random()*+new Date).replace(".","-"),H=/^\s+|\s+$/g,b=
25/\s+/,W=" ",O="classList",K=function(yt,D){return this.contains(yt)?D||this.remove(yt):(D===void 0||D)&&(D=!0,this.add(yt)),!!D},V=i.DocumentFragment&&DocumentFragment.prototype,rt=i.Node,p=(rt||Element).prototype,z=i.CharacterData||rt,et=z&&z.prototype,S=i.DocumentType,M=S&&S.prototype,nt=(i.Element||rt||i.HTMLElement).prototype,pt=i.HTMLSelectElement||m("select").constructor,xt=pt.prototype.remove,st=i.ShadowRoot,R=i.SVGElement,L=/ /g,g="\\ ",B=function(at){var yt=at==="querySelectorAll";return function(D){var dt,gt,Q,kt,Rt,Ut,Jt=this.parentNode;if(Jt){for(Q=this.getAttribute("id")||q,kt=Q===q?Q:Q.replace(L,g),Ut=D.split(","),gt=0;gt<Ut.length;gt++)Ut[gt]="#"+kt+" "+Ut[gt];D=Ut.join(",")}if(Q===q&&this.setAttribute("id",Q),Rt=(Jt||this)[at](D),Q===q&&this.removeAttribute("id"),yt)for(gt=Rt.length,dt=new Array(gt);gt--;)dt[gt]=Rt[gt];else dt=Rt;return dt}},J=function(at){"query"in at||(at.query=nt.query),"queryAll"in at||(at.queryAll=nt.queryAll)},ot=["matches",nt.matchesSelector||nt.webkitMatchesSelector||nt.khtmlMatchesSelector||nt.mozMatchesSelector||nt.msMatchesSelector||nt.oMatchesSelector||function(yt){var D=this.parentNode;return!!D&&-1<P.call(D.querySelectorAll(yt),this)},"closest",function(yt){for(var D=this,dt;(dt=D&&D.matches)&&!D.matches(yt);)D=D.parentNode;return dt?D:null},"prepend",function(){var yt=this.firstChild,D=x(arguments);yt?this.insertBefore(D,yt):this.appendChild(D)},"append",function(){this.appendChild(x(arguments))},"before",function(){var yt=this.parentNode;yt&&yt.insertBefore(x(arguments),this)},"after",function(){var yt=this.parentNode,D=this.nextSibling,dt=x(arguments);yt&&(D?yt.insertBefore(dt,D):yt.appendChild(dt))},"replace",function(){this.replaceWith.apply(this,arguments)},"replaceWith",function(){var yt=this.parentNode;yt&&yt.replaceChild(x(arguments),this)},"remove",function(){var yt=this.parentNode;yt&&yt.removeChild(this)},"query",B("querySelector"),"queryAll",B("querySelectorAll")],ht=ot.slice,vt=ot.length;vt;vt-=2)if(d=ot[vt-2],d in nt||(nt[d]=ot[vt-1]),d==="remove"&&(pt.prototype[d]=function(){return 0<arguments.length?xt.apply(this,arguments):nt.remove.call(this)}),/^(?:before|after|replace|replaceWith|remove)$/.test(d)&&(z&&!(d in et)&&(et[d]=ot[vt-1]),S&&!(d in M)&&(M[d]=ot[vt-1])),/^(?:append|prepend)$/.test(d))if(V)d in V||(V[d]=ot[vt-1]);else try{u().constructor.prototype[d]=ot[vt-1]}catch{}if(J(T),V)J(V);else try{J(u().constructor.prototype)}catch{}st&&J(st.prototype),m("a").matches("a")||(nt[d]=function(at){return function(yt){return at.call(this.parentNode?this:u().appendChild(this),yt)}}(nt[d])),N.prototype={length:0,add:function(){for(var yt=0,D;yt<arguments.length;yt++)D=arguments[yt],this.contains(D)||ot.push.call(this,d);this._isSVG?this._.setAttribute("class",""+this):this._.className=""+this},contains:function(at){return function(D){return vt=at.call(this,d=tt(D)),-1<vt}}([].indexOf||function(at){for(vt=this.length;vt--&&this[vt]!==at;);return vt}),item:function(yt){return this[yt]||null},remove:function(){for(var yt=0,D;yt<arguments.length;yt++)D=arguments[yt],this.contains(D)&&ot.splice.call(this,vt,1);this._isSVG?this._.setAttribute("class",""+this):this._.className=""+this},toggle:K,toString:function(){return ot.join.call(this,W)}},R&&!(O in R.prototype)&&G(R.prototype,O,I),O in T.documentElement?(y=m("div")[O],y.add("a","b","a"),y!="a b"&&(v=y.constructor.prototype,"add"in v||(v=i.TemporaryTokenList.prototype),w=function(at){return function(){for(var yt=0;yt<arguments.length;)at.call(this,arguments[yt++])}},v.add=w(v.add),v.remove=w(v.remove),v.toggle=K)):G(nt,O,I),"contains"in p||G(p,"contains",{value:function(at){for(;at&&at!==this;)at=at.parentNode;return this===at}}),"head"in T||G(T,"head",{get:function(){return A||(A=T.getElementsByTagName("head")[0])}}),function(){for(var at,yt=i.requestAnimationFrame,D=i.cancelAnimationFrame,dt=["o","ms","moz","webkit"],gt=dt.length;!D&>--;)yt=yt||i[dt[gt]+"RequestAnimationFrame"],D=i[dt[gt]+"CancelAnimationFrame"]||i[dt[gt]+"CancelRequestAnimationFrame"];D||(yt?(at=yt,yt=function(Q){var kt=!0;return at(function(){kt&&Q.apply(this,arguments)}),function(){kt=!1}},D=function(Q){Q()}):(yt=function(Q){return setTimeout(Q,15,15)},D=function(Q){clearTimeout(Q)})),i.requestAnimationFrame=yt,i.cancelAnimationFrame=D}();try{new i.CustomEvent("?")}catch{i.CustomEvent=function(yt,D){function dt(Q,kt){var Rt=T.createEvent(yt);if(typeof Q!="string")throw new Error("An event name must be provided");return yt=="Event"&&(Rt.initCustomEvent=gt),kt==null&&(kt=D),Rt.initCustomEvent(Q,kt.bubbles,kt.cancelable,kt.detail),Rt}function gt(Q,kt,Rt,Ut){this.initEvent(Q,kt,Rt),this.detail=Ut}return dt}(i.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}try{new Event("_")}catch(at){at=function(yt){function D(dt,gt){E(arguments.length,"Event");var Q=T.createEvent("Event");return gt||(gt={}),Q.initEvent(dt,!!gt.bubbles,!!gt.cancelable),Q}return D.prototype=yt.prototype,D}(i.Event||function(){}),G(i,"Event",{value:at}),Event!==at&&(Event=at)}try{new KeyboardEvent("_",{})}catch(at){at=function(yt){var D=0,dt={char:"",key:"",location:0,ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1,altGraphKey:!1,repeat:!1,locale:navigator.language,detail
25:0,bubbles:!1,cancelable:!1,keyCode:0,charCode:0,which:0},gt;try{var Q=T.createEvent("KeyboardEvent");Q.initKeyboardEvent("keyup",!1,!1,i,"+",3,!0,!1,!0,!1,!1),D=(Q.keyIdentifier||Q.key)=="+"&&(Q.keyLocation||Q.location)==3&&(Q.ctrlKey?Q.altKey?1:3:Q.shiftKey?2:4)||9}catch{}gt=0<D?"KeyboardEvent":"Event";function kt(zt){for(var Ht=[],oe=["ctrlKey","Control","shiftKey","Shift","altKey","Alt","metaKey","Meta","altGraphKey","AltGraph"],se=0;se<oe.length;se+=2)zt[oe[se]]&&Ht.push(oe[se+1]);return Ht.join(" ")}function Rt(zt,Ht){for(var oe in Ht)Ht.hasOwnProperty(oe)&&!Ht.hasOwnProperty.call(zt,oe)&&(zt[oe]=Ht[oe]);return zt}function Ut(zt,Ht,oe){try{Ht[zt]=oe[zt]}catch{}}function Jt(zt,Ht){E(arguments.length,"KeyboardEvent"),Ht=Rt(Ht||{},dt);var oe=T.createEvent(gt),se=Ht.ctrlKey,pe=Ht.shiftKey,mt=Ht.altKey,Dt=Ht.metaKey,Kt=Ht.altGraphKey,qt=D>3?kt(Ht):null,jt=String(Ht.key),Nt=String(Ht.char),Zt=Ht.location,Et=Ht.keyCode||(Ht.keyCode=jt)&&jt.charCodeAt(0)||0,ae=Ht.charCode||(Ht.charCode=Nt)&&Nt.charCodeAt(0)||0,de=Ht.bubbles,ke=Ht.cancelable,Ae=Ht.repeat,Pt=Ht.locale,Xt=Ht.view||i,lt;if(Ht.which||(Ht.which=Ht.keyCode),"initKeyEvent"in oe)oe.initKeyEvent(zt,de,ke,Xt,se,mt,pe,Dt,Et,ae);else if(0<D&&"initKeyboardEvent"in oe){switch(lt=[zt,de,ke,Xt],D){case 1:lt.push(jt,Zt,se,pe,mt,Dt,Kt);break;case 2:lt.push(se,mt,pe,Dt,Et,ae);break;case 3:lt.push(jt,Zt,se,mt,pe,Dt,Kt);break;case 4:lt.push(jt,Zt,qt,Ae,Pt);break;default:lt.push(char,jt,Zt,qt,Ae,Pt)}oe.initKeyboardEvent.apply(oe,lt)}else oe.initEvent(zt,de,ke);for(jt in oe)dt.hasOwnProperty(jt)&&oe[jt]!==Ht[jt]&&Ut(jt,oe,Ht);return oe}return Jt.prototype=yt.prototype,Jt}(i.KeyboardEvent||function(){}),G(i,"KeyboardEvent",{value:at}),KeyboardEvent!==at&&(KeyboardEvent=at)}try{new MouseEvent("_",{})}catch(at){at=function(yt){function D(dt,gt){E(arguments.length,"MouseEvent");var Q=T.createEvent("MouseEvent");return gt||(gt={}),Q.initMouseEvent(dt,!!gt.bubbles,!!gt.cancelable,gt.view||i,gt.detail||1,gt.screenX||0,gt.screenY||0,gt.clientX||0,gt.clientY||0,!!gt.ctrlKey,!!gt.altKey,!!gt.shiftKey,!!gt.metaKey,gt.button||0,gt.relatedTarget||null),Q}return D.prototype=yt.prototype,D}(i.MouseEvent||function(){}),G(i,"MouseEvent",{value:at}),MouseEvent!==at&&(MouseEvent=at)}})(window),function(i){var u=i.WeakMap||function(){var G=0,P=!1,tt=!1,N;function I(b,W,O){tt=O,P=!1,N=void 0,b.dispatchEvent(W)}function q(b){this.value=b}q.prototype.handleEvent=function(W){P=!0,tt?W.currentTarget.removeEventListener(W.type,this,!1):N=this.value};function H(){G++,this.__ce__=new x("@DOMMap:"+G+Math.random())}return H.prototype={constructor:H,delete:function(W){return I(W,this.__ce__,!0),P},get:function(W){I(W,this.__ce__,!1);var O=N;return N=void 0,O},has:function(W){return I(W,this.__ce__,!1),P},set:function(W,O){return I(W,this.__ce__,!0),W.addEventListener(this.__ce__.type,new q(O),!1),this}},H}();function m(){}m.prototype=(Object.create||Object)(null);function E(G,P,tt){function N(I){N.once&&(I.currentTarget.removeEventListener(I.type,P,N),N.removed=!0),N.passive&&(I.preventDefault=E.preventDefault),typeof N.callback=="function"?N.callback.call(this,I):N.callback&&N.callback.handleEvent(I),N.passive&&delete I.preventDefault}return N.type=G,N.callback=P,N.capture=!!tt.capture,N.passive=!!tt.passive,N.once=!!tt.once,N.removed=!1,N}E.preventDefault=function(){};var x=i.CustomEvent,F=i.dispatchEvent,A=i.addEventListener,d=i.removeEventListener,v=0,y=function(){v++},w=[].indexOf||function(P){for(var tt=this.length;tt--&&this[tt]!==P;);return tt},T=function(G){return"".concat(G.capture?"1":"0",G.passive?"1":"0",G.once?"1":"0")},j;try{A("_",y,{once:!0}),F(new x("_")),F(new x("_")),d("_",y,{once:!0})}catch{}v!==1&&function(){var G=new u;function P(N){return function(q,H,b){if(b&&typeof b!="boolean"){var W=G.get(this),O=T(b),K,V,rt;W||G.set(this,W=new m),q in W||(W[q]={handler:[],wrap:[]}),V=W[q],K=w.call(V.handler,H),K<0?(K=V.handler.push(H)-1,V.wrap[K]=rt=new m):rt=V.wrap[K],O in rt||(rt[O]=E(q,H,b),N.call(this,q,rt[O],rt[O].capture))}else N.call(this,q,H,b)}}function tt(N){return function(q,H,b){if(b&&typeof b!="boolean"){var W=G.get(this),O,K,V,rt;if(W&&q in W&&(V=W[q],K=w.call(V.handler,H),-1<K&&(O=T(b),rt=V.wrap[K],O in rt))){N.call(this,q,rt[O],rt[O].capture),delete rt[O];for(O in rt)return;V.handler.splice(K,1),V.wrap.splice(K,1),V.handler.length===0&&delete W[q]}}else N.call(this,q,H,b)}}j=function(N){if(N){var I=N.prototype;I.addEventListener=P(I.addEventListener),I.removeEventListener=tt(I.removeEventListener)}},i.EventTarget?j(EventTarget):(j(i.Text),j(i.Element||i.HTMLElement),j(i.HTMLDocument),j(i.Window||{prototype:i}),j(i.XMLHttpRequest))}()}(self)},{}],22:[function($t,te,ue){te.exports=function(i,u,m,E){var x=m.root;m.root=function(A,d,v,y,w){var T=A.getTemplate;A.getTemplate=function(j,G,P,tt){typeof G=="function"&&(tt=G,G=!1);var N=function(q){try{return E(q)}catch{if(v.get("_require"))return v.get("_require")(q)}},I=N(j);v.set("_require",N),G&&I.compile(),tt(null,I)},x(A,d,v,y,function(j,G){A.getTemplate=T,w(j,G)})};var F={obj:m,type:"code"};return new i.Template(F,u)}},{}],23:[function($t,te,ue){(function(){var i={};i.dev=!1,i.tooltip=i.tooltip||{},i.utils=i.utils||{},i.models=i.models||{},i.charts={},i.logs={},i.dom={},typeof te<"u"&&typeof ue<"u"&&typeof d3>"u"&&(d3=$t("d3")),i.dispatch=d3.dispatch("render_start","render_end"),Function.prototype.bind||(Function.prototype.bind=function(u){if(typeof this!="function")throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");
25var m=Array.prototype.slice.call(arguments,1),E=this,x=function(){},F=function(){return E.apply(this instanceof x&&u?this:u,m.concat(Array.prototype.slice.call(arguments)))};return x.prototype=this.prototype,F.prototype=new x,F}),i.dev&&(i.dispatch.on("render_start",function(u){i.logs.startTime=+new Date}),i.dispatch.on("render_end",function(u){i.logs.endTime=+new Date,i.logs.totalTime=i.logs.endTime-i.logs.startTime,i.log("total",i.logs.totalTime)})),i.log=function(){if(i.dev&&window.console&&console.log&&console.log.apply)console.log.apply(console,arguments);else if(i.dev&&window.console&&typeof console.log=="function"&&Function.prototype.bind){var u=Function.prototype.bind.call(console.log,console);u.apply(console,arguments)}return arguments[arguments.length-1]},i.deprecated=function(u,m){console&&console.warn&&console.warn("nvd3 warning: `"+u+"` has been deprecated. ",m||"")},i.render=function(m){m=m||1,i.render.active=!0,i.dispatch.render_start();var E=function(){for(var x,F,A=0;A<m&&(F=i.render.queue[A]);A++)x=F.generate(),typeof F.callback==typeof Function&&F.callback(x);i.render.queue.splice(0,A),i.render.queue.length?setTimeout(E):(i.dispatch.render_end(),i.render.active=!1)};setTimeout(E)},i.render.active=!1,i.render.queue=[],i.addGraph=function(u){typeof arguments[0]==typeof Function&&(u={generate:arguments[0],callback:arguments[1]}),i.render.queue.push(u),i.render.active||i.render()},typeof te<"u"&&typeof ue<"u"&&(te.exports=i),typeof window<"u"&&(window.nv=i),i.dom.write=function(u){return window.fastdom!==void 0?fastdom.mutate(u):u()},i.dom.read=function(u){return window.fastdom!==void 0?fastdom.measure(u):u()},i.interactiveGuideline=function(){var u={left:0,top:0},m=null,E=null,x=d3.scale.linear(),F=d3.dispatch("elementMousemove","elementMouseout","elementClick","elementDblclick","elementMouseDown","elementMouseUp"),A=!0,d=null,v=i.models.tooltip(),y="ActiveXObject"in window;v.duration(0).hideDelay(0).hidden(!1);function w(T){T.each(function(j){var G=d3.select(this),P=m||960,tt=E||400,N=G.selectAll("g.nv-wrap.nv-interactiveLineLayer").data([j]),I=N.enter().append("g").attr("class"," nv-wrap nv-interactiveLineLayer");if(I.append("g").attr("class","nv-interactiveGuideLine"),!d)return;function q(){var H=d3.mouse(this),b=H[0],W=H[1],O=!0,K=!1;if(y&&(b=d3.event.offsetX,W=d3.event.offsetY,d3.event.target.tagName!=="svg"&&(O=!1),d3.event.target.className.baseVal.match("nv-legend")&&(K=!0)),O&&(b-=u.left,W-=u.top),d3.event.type==="mouseout"||b<0||W<0||b>P||W>tt||d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===void 0||K){if(y&&d3.event.relatedTarget&&d3.event.relatedTarget.ownerSVGElement===void 0&&(d3.event.relatedTarget.className===void 0||d3.event.relatedTarget.className.match(v.nvPointerEventsClass)))return;F.elementMouseout({mouseX:b,mouseY:W}),w.renderGuideLine(null),v.hidden(!0);return}else v.hidden(!1);var V=typeof x.rangeBands=="function",rt=void 0;if(V){var p=d3.bisect(x.range(),b)-1;if(x.range()[p]+x.rangeBand()>=b)rt=x.domain()[d3.bisect(x.range(),b)-1];else{F.elementMouseout({mouseX:b,mouseY:W}),w.renderGuideLine(null),v.hidden(!0);return}}else rt=x.invert(b);F.elementMousemove({mouseX:b,mouseY:W,pointXValue:rt}),d3.event.type==="dblclick"&&F.elementDblclick({mouseX:b,mouseY:W,pointXValue:rt}),d3.event.type==="click"&&F.elementClick({mouseX:b,mouseY:W,pointXValue:rt}),d3.event.type==="mousedown"&&F.elementMouseDown({mouseX:b,mouseY:W,pointXValue:rt}),d3.event.type==="mouseup"&&F.elementMouseUp({mouseX:b,mouseY:W,pointXValue:rt})}d.on("touchmove",q).on("mousemove",q,!0).on("mouseout",q,!0).on("mousedown",q,!0).on("mouseup",q,!0).on("dblclick",q).on("click",q),w.guideLine=null,w.renderGuideLine=function(H){A&&(w.guideLine&&w.guideLine.attr("x1")===H||i.dom.write(function(){var b=N.select(".nv-interactiveGuideLine").selectAll("line").data(H!=null?[i.utils.NaNtoZero(H)]:[],String);b.enter().append("line").attr("class","nv-guideline").attr("x1",function(W){return W}).attr("x2",function(W){return W}).attr("y1",tt).attr("y2",0),b.exit().remove()}))}})}return w.dispatch=F,w.tooltip=v,w.margin=function(T){return arguments.length?(u.top=typeof T.top<"u"?T.top:u.top,u.left=typeof T.left<"u"?T.left:u.left,w):u},w.width=function(T){return arguments.length?(m=T,w):m},w.height=function(T){return arguments.length?(E=T,w):E},w.xScale=function(T){return arguments.length?(x=T,w):x},w.showGuideLine=function(T){return arguments.length?(A=T,w):A},w.svgContainer=function(T){return arguments.length?(d=T,w):d},w},i.interactiveBisect=function(u,m,E){if(!(u instanceof Array))return null;var x;typeof E!="function"?x=function(T){return T.x}:x=E;var F=function(T,j){return x(T)-j},A=d3.bisector(F).left,d=d3.max([0,A(u,m)-1]),v=x(u[d]);if(typeof v>"u"&&(v=d),v===m)return d;var y=d3.min([d+1,u.length-1]),w=x(u[y]);return typeof w>"u"&&(w=y),Math.abs(w-m)>=Math.abs(v-m)?d:y},i.nearestValueIndex=function(u,m,E){var x=1/0,F=null;return u.forEach(function(A,d){var v=Math.abs(m-A);A!=null&&v<=x&&v<E&&(x=v,F=d)}),F},i.models.tooltip=function(){var u="nvtooltip-"+Math.floor(Math.random()*1e5),m=null,E="w",x=25,F=0,A=null,d=null,v=!0,y=200,w=null,T={left:null,top:null},j=!0,G=100,P=!0,tt="nv-pointer-events-none",N=function(){return{left:d3.event!==null?d3.event.clientX:0,top:d3.event!==null?d3.event.clientY:0}},I=function(p,z){return p},q=function(p){return p},H=function(p,z){return p},b=function(p){if(p===null)return"";var z=d3.select(document.createElement("table"));if(P){var et=z.selectAll("thead").data([p]).enter().append("thead");et.append("tr").append("td").attr("colspan",3).append("strong").classed("x-value",!0).html(q(p.value))}var S=z.selectAll("tbody").data([p]).enter().append("tbody"),M=S.selectAll("tr").data(function(pt){return pt.series}).enter().append("tr").classed("highlight",function(pt){return pt.highlight});M.append("td").classed("legend-color-guide",!0).append("div").style("background-color",function(pt){return pt.color}),M.append("td").classed("key",!0).classed("total",function(pt){return!!pt.total}).html(function(pt,xt){return H(pt.key,xt)}),M.append("td").classed("value",!0).html(function(pt,xt){return I(pt.value,xt)}),M.selectAll("td").each(function(pt){if(pt.highlight){var xt=d3.scale.linear().domain([0,1]).range(["#fff",pt.color]),st=.6;d3.select(this).style("border-bottom-color",xt(st)).style("border-top-color",xt(st))}});var nt=z.node().outerHTML;return p.footer!==void 0&&(nt+="<div class='footer'>"+p.footer+"</div>"),nt},W=function(p){if(p&&p.series){if(i.utils.isArray(p.series))return!0;
25if(i.utils.isObject(p.series))return p.series=[p.series],!0}return!1},O=function(p){var z=w.node().offsetHeight,et=w.node().offsetWidth,S=document.documentElement.clientWidth,M=document.documentElement.clientHeight,nt,pt,xt;switch(E){case"e":nt=-et-x,pt=-(z/2),p.left+nt<0&&(nt=x),(xt=p.top+pt)<0&&(pt-=xt),(xt=p.top+pt+z)>M&&(pt-=xt-M);break;case"w":nt=x,pt=-(z/2),p.left+nt+et>S&&(nt=-et-x),(xt=p.top+pt)<0&&(pt-=xt),(xt=p.top+pt+z)>M&&(pt-=xt-M);break;case"n":nt=-(et/2)-5,pt=x,p.top+pt+z>M&&(pt=-z-x),(xt=p.left+nt)<0&&(nt-=xt),(xt=p.left+nt+et)>S&&(nt-=xt-S);break;case"s":nt=-(et/2),pt=-z-x,p.top+pt<0&&(pt=x),(xt=p.left+nt)<0&&(nt-=xt),(xt=p.left+nt+et)>S&&(nt-=xt-S);break;case"center":nt=-(et/2),pt=-(z/2);break;default:nt=0,pt=0;break}return{left:nt,top:pt}},K=function(){i.dom.read(function(){var p=N(),z=O(p),et=p.left+z.left,S=p.top+z.top;if(v)w.interrupt().transition().delay(y).duration(0).style("opacity",0);else{var M="translate("+T.left+"px, "+T.top+"px)",nt="translate("+et+"px, "+S+"px)",pt=d3.interpolateString(M,nt),xt=w.style("opacity")<.1;w.interrupt().transition().duration(xt?0:G).styleTween("transform",function(st){return pt},"important").styleTween("-webkit-transform",function(st){return pt}).style("-ms-transform",nt).style("opacity",1)}T.left=et,T.top=S})};function V(){if(!w||!w.node()){var p=d||document.body,z=[1];w=d3.select(p).selectAll(".nvtooltip").data(z),w.enter().append("div").attr("class","nvtooltip "+(A||"xy-tooltip")).attr("id",u).style("top",0).style("left",0).style("opacity",0).style("position","fixed").selectAll("div, table, td, tr").classed(tt,!0).classed(tt,!0),w.exit().remove()}}function rt(){if(j&&W(m))return i.dom.write(function(){V();var p=b(m);p&&(w.node().innerHTML=p),K()}),rt}return rt.nvPointerEventsClass=tt,rt.options=i.utils.optionsFunc.bind(rt),rt._options=Object.create({},{duration:{get:function(){return G},set:function(p){G=p}},gravity:{get:function(){return E},set:function(p){E=p}},distance:{get:function(){return x},set:function(p){x=p}},snapDistance:{get:function(){return F},set:function(p){F=p}},classes:{get:function(){return A},set:function(p){A=p}},chartContainer:{get:function(){return d},set:function(p){d=p}},enabled:{get:function(){return j},set:function(p){j=p}},hideDelay:{get:function(){return y},set:function(p){y=p}},contentGenerator:{get:function(){return b},set:function(p){b=p}},valueFormatter:{get:function(){return I},set:function(p){I=p}},headerFormatter:{get:function(){return q},set:function(p){q=p}},keyFormatter:{get:function(){return H},set:function(p){H=p}},headerEnabled:{get:function(){return P},set:function(p){P=p}},position:{get:function(){return N},set:function(p){N=p}},fixedTop:{get:function(){return null},set:function(p){i.deprecated("fixedTop","feature removed after 1.8.1")}},offset:{get:function(){return{left:0,top:0}},set:function(p){i.deprecated("offset","use chart.tooltip.distance() instead")}},hidden:{get:function(){return v},set:function(p){v!=p&&(v=!!p,rt())}},data:{get:function(){return m},set:function(p){p.point&&(p.value=p.point.x,p.series=p.series||{},p.series.value=p.point.y,p.series.color=p.point.color||p.series.color),m=p}},node:{get:function(){return w.node()},set:function(p){}},id:{get:function(){return u},set:function(p){}}}),i.utils.initOptions(rt),rt},i.utils.windowSize=function(){var u={width:640,height:480};return window.innerWidth&&window.innerHeight?(u.width=window.innerWidth,u.height=window.innerHeight,u):document.compatMode=="CSS1Compat"&&document.documentElement&&document.documentElement.offsetWidth?(u.width=document.documentElement.offsetWidth,u.height=document.documentElement.offsetHeight,u):(document.body&&document.body.offsetWidth&&(u.width=document.body.offsetWidth,u.height=document.body.offsetHeight),u)},i.utils.isArray=Array.isArray,i.utils.isObject=function(u){return u!==null&&typeof u=="object"},i.utils.isFunction=function(u){return typeof u=="function"},i.utils.isDate=function(u){return toString.call(u)==="[object Date]"},i.utils.isNumber=function(u){return!isNaN(u)&&typeof u=="number"},i.utils.windowResize=function(u){return window.addEventListener?window.addEventListener("resize",u):i.log("ERROR: Failed to bind to window.resize with: ",u),{callback:u,clear:function(){window.removeEventListener("resize",u)}}},i.utils.getColor=function(u){if(u===void 0)return i.utils.defaultColor();if(i.utils.isArray(u)){var m=d3.scale.ordinal().range(u);return function(E,x){var F=x===void 0?E:x;return E.color||m(F)}}else return u},i.utils.defaultColor=function(){return i.utils.getColor(d3.scale.category20().range())},i.utils.customTheme=function(u,m,E){m=m||function(F){return F.key},E=E||d3.scale.category20().range();var x=E.length;return function(F,A){var d=m(F);return i.utils.isFunction(u[d])?u[d]():u[d]!==void 0?u[d]:(x||(x=E.length),x=x-1,E[x])}},i.utils.pjax=function(u,m){var E=function(x){d3.html(x,function(F){var A=d3.select(m).node();A.parentNode.replaceChild(d3.select(F).select(m).node(),A),i.utils.pjax(u,m)})};d3.selectAll(u).on("click",function(){history.pushState(this.href,this.textContent,this.href),E(this.href),d3.event.preventDefault()}),d3.select(window).on("popstate",function(){d3.event.state&&E(d3.event.state)})},i.utils.calcApproxTextWidth=function(u){if(i.utils.isFunction(u.style)&&i.utils.isFunction(u.text)){var m=parseInt(u.style("font-size").replace("px",""),10),E=u.text().length;return i.utils.NaNtoZero(E*m*.5)}return 0},i.utils.NaNtoZero=function(u){return!i.utils.isNumber(u)||isNaN(u)||u===null||u===1/0||u===-1/0?0:u},d3.selection.prototype.watchTransition=function(u){var m=[this].concat([].slice.call(arguments,1
vendor: 10,990 bytes, line 25
25));return u.transition.apply(u,m)},i.utils.renderWatch=function(u,m){if(!(this instanceof i.utils.renderWatch))return new i.utils.renderWatch(u,m);var E=m!==void 0?m:250,x=[],F=this;this.models=function(A){return A=[].slice.call(arguments,0),A.forEach(function(d){d.__rendered=!1,function(v){v.dispatch.on("renderEnd",function(y){v.__rendered=!0,F.renderEnd("model")})}(d),x.indexOf(d)<0&&x.push(d)}),this},this.reset=function(A){A!==void 0&&(E=A),x=[]},this.transition=function(A,d,v){if(d=arguments.length>1?[].slice.call(arguments,1):[],d.length>1?v=d.pop():v=E!==void 0?E:250,A.__rendered=!1,x.indexOf(A)<0&&x.push(A),v===0)return A.__rendered=!0,A.delay=function(){return this},A.duration=function(){return this},A;A.length===0||A.every(function(w){return!w.length})?A.__rendered=!0:A.__rendered=!1;var y=0;return A.transition().duration(v).each(function(){++y}).each("end",function(w,T){--y===0&&(A.__rendered=!0,F.renderEnd.apply(this,d))})},this.renderEnd=function(){x.every(function(A){return A.__rendered})&&(x.forEach(function(A){A.__rendered=!1}),u.renderEnd.apply(this,arguments))}},i.utils.deepExtend=function(u){var m=arguments.length>1?[].slice.call(arguments,1):[];m.forEach(function(E){for(var x in E){var F=i.utils.isArray(u[x]),A=i.utils.isObject(u[x]),d=i.utils.isObject(E[x]);A&&!F&&d?i.utils.deepExtend(u[x],E[x]):u[x]=E[x]}})},i.utils.state=function(){if(!(this instanceof i.utils.state))return new i.utils.state;var u={},m=function(){},E=function(){return{}},x=null;this.dispatch=d3.dispatch("change","set"),this.dispatch.on("set",function(A){m(A,!0)}),this.getter=function(A){return E=A,this},this.setter=function(A,d){return d||(d=function(){}),m=function(v,y){A(v),y&&d()},this},this.init=function(A){x=x||{},i.utils.deepExtend(x,A)};var F=function(){var A=E();if(JSON.stringify(A)===JSON.stringify(u))return!1;for(var d in A)u[d]===void 0&&(u[d]={}),u[d]=A[d];return!0};this.update=function(){x&&(m(x,!1),x=null),F.call(this)&&this.dispatch.change(u)}},i.utils.optionsFunc=function(u){return u&&d3.map(u).forEach((function(m,E){i.utils.isFunction(this[m])&&this[m](E)}).bind(this)),this},i.utils.calcTicksX=function(u,m){var E=1,x=0;for(x;x<m.length;x+=1){var F=m[x]&&m[x].values?m[x].values.length:0;E=F>E?F:E}return i.log("Requested number of ticks: ",u),i.log("Calculated max values to be: ",E),u=u>E?u=E-1:u,u=u<1?1:u,u=Math.floor(u),i.log("Calculating tick count as: ",u),u},i.utils.calcTicksY=function(u,m){return i.utils.calcTicksX(u,m)},i.utils.initOption=function(u,m){u._calls&&u._calls[m]?u[m]=u._calls[m]:(u[m]=function(E){return arguments.length?(u._overrides[m]=!0,u._options[m]=E,u):u._options[m]},u["_"+m]=function(E){return arguments.length?(u._overrides[m]||(u._options[m]=E),u):u._options[m]})},i.utils.initOptions=function(u){u._overrides=u._overrides||{};var m=Object.getOwnPropertyNames(u._options||{}),E=Object.getOwnPropertyNames(u._calls||{});m=m.concat(E);for(var x in m)i.utils.initOption(u,m[x])},i.utils.inheritOptionsD3=function(u,m,E){u._d3options=E.concat(u._d3options||[]),E.unshift(m),E.unshift(u),d3.rebind.apply(this,E)},i.utils.arrayUnique=function(u){return u.sort().filter(function(m,E){return!E||m!=u[E-1]})},i.utils.symbolMap=d3.map(),i.utils.symbol=function(){var u,m=64;function E(x,F){var A=u.call(this,x,F),d=m.call(this,x,F);return d3.svg.symbolTypes.indexOf(A)!==-1?d3.svg.symbol().type(A).size(d)():i.utils.symbolMap.get(A)(d)}return E.type=function(x){return arguments.length?(u=d3.functor(x),E):u},E.size=function(x){return arguments.length?(m=d3.functor(x),E):m},E},i.utils.inheritOptions=function(u,m){var E=Object.getOwnPropertyNames(m._options||{}),x=Object.getOwnPropertyNames(m._calls||{}),F=m._inherited||[],A=m._d3options||[],d=E.concat(x).concat(F).concat(A);d.unshift(m),d.unshift(u),d3.rebind.apply(this,d),u._inherited=i.utils.arrayUnique(E.concat(x).concat(F).concat(E).concat(u._inherited||[])),u._d3options=i.utils.arrayUnique(A.concat(u._d3options||[]))},i.utils.initSVG=function(u){u.classed({"nvd3-svg":!0})},i.utils.sanitizeHeight=function(u,m){return u||parseInt(m.style("height"),10)||400},i.utils.sanitizeWidth=function(u,m){return u||parseInt(m.style("width"),10)||960},i.utils.availableHeight=function(u,m,E){return Math.max(0,i.utils.sanitizeHeight(u,m)-E.top-E.bottom)},i.utils.availableWidth=function(u,m,E){return Math.max(0,i.utils.sanitizeWidth(u,m)-E.left-E.right)},i.utils.noData=function(u,m){var E=u.options(),x=E.margin(),F=E.noData(),A=F==null?["No Data Available."]:[F],d=i.utils.availableHeight(null,m,x),v=i.utils.availableWidth(null,m,x),y=x.left+v/2,w=x.top+d/2;m.selectAll("g").remove();var T=m.selectAll(".nv-noData").data(A);T.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),T.attr("x",y).attr("y",w).text(function(j){return j})},i.utils.wrapTicks=function(u,m){u.each(function(){for(var E=d3.select(this),x=E.text().split(/\s+/).reverse(),F,A=[],d=0,v=1.1,y=E.attr("y"),w=parseFloat(E.attr("dy")),T=E.text(null).append("tspan").attr("x",0).attr("y",y).attr("dy",w+"em");F=x.pop();)A.push(F),T.text(A.join(" ")),T.node().getComputedTextLength()>m&&(A.pop(),T.text(A.join(" ")),A=[F],T=E.append("tspan").attr("x",0).attr("y",y).attr("dy",++d*v+w+"em").text(F))})},i.utils.arrayEquals=function(u,m){if(u===m)return!0;if(!u||!m||u.length!=m.length)return!1;for(var E=0,x=u.length;E<x;E++)if(u[E]instanceof Array&&m[E]instanceof Array){if(!i.arrayEquals(u[E],m[E]))return!1}else if(u[E]!=m[E])return!1;return!0},i.models.axis=function(){var u=d3.svg.axis(),m=d3.scale.linear(),E={top:0,right:0,bottom:0,left:0},x=75,F=60,A=null,d=!0,v=0,y=!0,w=!1,T=!1,j=null,G=0,P=void 0,tt=250,N=d3.dispatch("renderEnd");u.scale(m).orient("bottom").tickFormat(function(b){return b});var I,q=i.utils.renderWatch(N,tt);function H(b){return q.reset(),b.each(function(W){var O=d3.select(this);i.utils.initSVG(O);var K=O.selectAll("g.nv-wrap.nv-axis").data([W]),V=K.enter().append("g").attr("class","nvd3 nv-wrap nv-axis");V.append("g");var rt=K.select("g");j!==null?u.ticks(j):(u.orient()=="top"||u.orient()=="bottom")&&u.ticks(Math.abs(m.range()[1]-m.range()[0])/100),rt.watchTransition(q,"axis").call(u),I=I||u.scale();var p=u.tickFormat();p==null&&(p=I.tickFormat());var z=rt.selectAll("text.nv-axislabel").data([A||null]);z.exit().remove(),P!==void 0&&rt.selectAll("g").select("text").style("font-size",P);var et,S,M;switch(u.orient()){case"top":z.enter().append("text").attr("class","nv-axislabel"),M=0,m.range().length===1?M=T?m.range()[0]*2+m.rangeBand():0:m.range().length===2?M=T?m.range()[0]+m.range()[1]+m.rangeBand():m.range()[1]:m.range().length>2&&(M=m.range()[m.range().length-1]+(m.range()[1]-m.range()[0])),z.attr("text-anchor","middle").attr("y",0).attr("x",M/2),d&&(S=K.selectAll("g.nv-axisMaxMin").data(m.domain()),S.enter().append("g").attr("class",function(g,B){return["nv-axisMaxMin","nv-axisMaxMin-x",B==0?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),S.exit().remove(),S.attr("transform",function(g,B){return"translate("+i.utils.NaNtoZero(m(g))+",0)"}).select("text").attr("dy","-0.5em").attr("y",-u.tickPadding()).attr("text-anchor","middle").text(function(g,B){var J=p(g);return(""+J).match("NaN")?"":J}),S.watchTransition(q,"min-max top").attr("transform",function(g,B){return"translate("+i.utils.NaNtoZero(m.range()[B])+",0)"}));break;case"bottom":et=G+36;var nt=30,pt=0,xt=rt.selectAll("g").select("text"),st="";if(v%360){xt.attr("transform",""),xt.each(function(g,B){var J=this.getBoundingClientRect(),ot=J.width;pt=J.height,ot>nt&&(nt=ot)}),st="rotate("+v+" 0,"+(pt/2+u.tickPadding())+")";var R=Math.abs(Math.sin(v*Math.PI/180));et=(R?R*nt:nt)+30,xt.attr("transform",st).style("text-anchor",v%360>0?"start":"end")}else w?xt.attr("transform",function(g,B){return"translate(0,"+(B%2==0?"0":"12")+")"}):xt.attr("transform","translate(0,0)");z.enter().append("text").attr("class","nv-axislabel"),M=0,m.range().length===1?M=T?m.range()[0]*2+m.rangeBand():0:m.range().length===2?M=T?m.range()[0]+m.range()[1]+m.rangeBand():m.range()[1]:m.range().length>2&&(M=m.range()[m.range().length-1]+(m.range()[1]-m.range()[0])),z.attr("text-anchor","middle").attr("y",et).attr("x",M/2),d&&(S=K.selectAll("g.nv-axisMaxMin").data([m.domain()[0],m.domain()[m.domain().length-1]]),S.enter().append("g").attr("class",function(g,B){return["nv-axisMaxMin","nv-axisMaxMin-x",B==0?"nv-axisMin-x":"nv-axisMax-x"].join(" ")}).append("text"),S.exit().remove(),S.attr("transform",function(g,B){return"translate("+i.utils.NaNtoZero(m(g)+(T?m.rangeBand()/2:0))+",0)"}).select("text").attr("dy",".71em").attr("y",u.tickPadding()).attr("transform",st).style("text-anchor",v?v%360>0?"start":"end":"middle").text(function(g,B){var J=p(g);return(""+J).match("NaN")?"":J}),S.watchTransition(q,"min-max bottom").attr("transform",function(g,B){return"translate("+i.utils.NaNtoZero(m(g)+(T?m.rangeBand()/2:0))+",0)"}));break;case"right":z.enter().append("text").attr("class","nv-axislabel"),z.style("text-anchor",y?"middle":"begin").attr("transform",y?"rotate(90)":"").attr("y",y?-Math.max(E.right,x)+12:-10).attr("x",y?d3.max(m.range())/2:u.tickPadding()),d&&(S=K.selectAll("g.nv-axisMaxMin").data(m.domain()),S.enter().append("g").attr("class",function(g,B){return["nv-axisMaxMin","nv-axisMaxMin-y",B==0?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),S.exit().remove(),S.attr("transform",function(g,B){return"translate(0,"+i.utils.NaNtoZero(m(g))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",u.tickPadding()).style("text-anchor","start").text(function(g,B){var J=p(g);return(""+J).match("NaN")?"":J}),S.watchTransition(q,"min-max right").attr("transform",function(g,B){return"translate(0,"+i.utils.NaNtoZero(m.range()[B])+")"}).select("text").style("opacity",1));break;case"left":z.enter().append("text").attr("class","nv-axislabel"),z.style("text-anchor",y?"middle":"end").attr("transform",y?"rotate(-90)":"").attr("y",y?-Math.max(E.left,x)+25-(G||0):-10).attr("x",y?-d3.max(m.range())/2:-u.tickPadding()),d&&(S=K.selectAll("g.nv-axisMaxMin").data(m.domain()),S.enter().append("g").attr("class",function(g,B){return["nv-axisMaxMin","nv-axisMaxMin-y",B==0?"nv-axisMin-y":"nv-axisMax-y"].join(" ")}).append("text").style("opacity",0),S.exit().remove(),S.attr("transform",function(g,B){return"translate(0,"+i.utils.NaNtoZero(I(g))+")"}).select("text").attr("dy",".32em").attr("y",0).attr("x",-u.tickPadding()).attr("text-anchor","end").text(function(g,B){var J=p(g);return(""+J).match("NaN")?"":J}),S.watchTransition(q,"min-max right").attr("transform",function(g,B){return"translate(0,"+i.utils.NaNtoZero(m.range()[B])+")"}).select("text").style("opacity",1));break}if(z.text(function(g){return g}),d&&(u.orient()==="left"||u.orient()==="right")&&(rt.selectAll("g").each(function(g,B){d3.select(this).select("text").attr("opacity",1),(m(g)<m.range()[1]+10||m(g)>m.range()[0]-10)&&((g>1e-10||g<-1e-10)&&d3.select(this).attr("opacity",0),d3.select(this).select("text").attr("opacity",0)
25)}),m.domain()[0]==m.domain()[1]&&m.domain()[0]==0&&K.selectAll("g.nv-axisMaxMin").style("opacity",function(g,B){return B?0:1})),d&&(u.orient()==="top"||u.orient()==="bottom")){var L=[];K.selectAll("g.nv-axisMaxMin").each(function(g,B){try{B?L.push(m(g)-this.getBoundingClientRect().width-4):L.push(m(g)+this.getBoundingClientRect().width+4)}catch{B?L.push(m(g)-4):L.push(m(g)+4)}}),rt.selectAll("g").each(function(g,B){(m(g)<L[0]||m(g)>L[1])&&(g>1e-10||g<-1e-10?d3.select(this).remove():d3.select(this).select("text").remove())})}rt.selectAll(".tick").filter(function(g){return!parseFloat(Math.round(g*1e5)/1e6)&&g!==void 0}).classed("zero",!0),I=m.copy()}),q.renderEnd("axis immediate"),H}return H.axis=u,H.dispatch=N,H.options=i.utils.optionsFunc.bind(H),H._options=Object.create({},{axisLabelDistance:{get:function(){return G},set:function(b){G=b}},staggerLabels:{get:function(){return w},set:function(b){w=b}},rotateLabels:{get:function(){return v},set:function(b){v=b}},rotateYLabel:{get:function(){return y},set:function(b){y=b}},showMaxMin:{get:function(){return d},set:function(b){d=b}},axisLabel:{get:function(){return A},set:function(b){A=b}},height:{get:function(){return F},set:function(b){F=b}},ticks:{get:function(){return j},set:function(b){j=b}},width:{get:function(){return x},set:function(b){x=b}},fontSize:{get:function(){return P},set:function(b){P=b}},margin:{get:function(){return E},set:function(b){E.top=b.top!==void 0?b.top:E.top,E.right=b.right!==void 0?b.right:E.right,E.bottom=b.bottom!==void 0?b.bottom:E.bottom,E.left=b.left!==void 0?b.left:E.left}},duration:{get:function(){return tt},set:function(b){tt=b,q.reset(tt)}},scale:{get:function(){return m},set:function(b){m=b,u.scale(m),T=typeof m.rangeBands=="function",i.utils.inheritOptionsD3(H,m,["domain","range","rangeBand","rangeBands"])}}}),i.utils.initOptions(H),i.utils.inheritOptionsD3(H,u,["orient","tickValues","tickSubdivide","tickSize","tickPadding","tickFormat"]),i.utils.inheritOptionsD3(H,m,["domain","range","rangeBand","rangeBands"]),H},i.models.boxPlot=function(){var u={top:0,right:0,bottom:0,left:0},m=960,E=500,x=Math.floor(Math.random()*1e4),F=d3.scale.ordinal(),A=d3.scale.linear(),d=function(M){return M.label},v=function(M){return M.values.Q1},y=function(M){return M.values.Q2},w=function(M){return M.values.Q3},T=function(M){return M.values.whisker_low},j=function(M){return M.values.whisker_high},G=function(M){return M.color},P=function(M){return M.values.outliers},tt=function(M,nt,pt){return M},N=function(M,nt,pt){return M},I=function(M,nt,pt){},q=i.utils.defaultColor(),H=null,b,W,O,K,V=d3.dispatch("elementMouseover","elementMouseout","elementMousemove","renderEnd"),rt=250,p=null,z,et=i.utils.renderWatch(V,rt);function S(M){return et.reset(),M.each(function(nt){var pt=m-u.left-u.right,xt=E-u.top-u.bottom;H=d3.select(this),i.utils.initSVG(H),F.domain(b||nt.map(function(D,dt){return d(D,dt)})).rangeBands(W||[0,pt],.1);var st=[];if(!O){var R=[],L,g;nt.forEach(function(D,dt){var gt=v(D),Q=w(D),kt=T(D),Rt=j(D),Ut=P(D);Ut&&Ut.forEach(function(Jt,zt){R.push(tt(Jt,zt,void 0))}),kt&&R.push(kt),gt&&R.push(gt),Q&&R.push(Q),Rt&&R.push(Rt)}),L=d3.min(R),g=d3.max(R),st=[L,g]}A.domain(O||st),A.range(K||[xt,0]),z=z||A.copy().range([A(0),A(0)]);var B=H.selectAll("g.nv-wrap").data([nt]);B.enter().append("g").attr("class","nvd3 nv-wrap"),B.attr("transform","translate("+u.left+","+u.top+")");var J=B.selectAll(".nv-boxplot").data(function(D){return D}),ot=J.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);J.attr("class","nv-boxplot").attr("transform",function(D,dt,gt){return"translate("+(F(d(D,dt))+F.rangeBand()*.05)+", 0)"}).classed("hover",function(D){return D.hover}),J.watchTransition(et,"nv-boxplot: boxplots").style("stroke-opacity",1).style("fill-opacity",.75).delay(function(D,dt){return dt*rt/nt.length}).attr("transform",function(D,dt){return"translate("+(F(d(D,dt))+F.rangeBand()*.05)+", 0)"}),J.exit().remove(),ot.each(function(D,dt){var gt=d3.select(this);[T,j].forEach(function(Q){if(Q(D)){var kt=Q===T?"low":"high";gt.append("line").style("stroke",G(D)||q(D,dt)).attr("class","nv-boxplot-whisker nv-boxplot-"+kt),gt.append("line").style("stroke",G(D)||q(D,dt)).attr("class","nv-boxplot-tick nv-boxplot-"+kt)}})});var ht=function(){return p===null?F.rangeBand()*.9:Math.min(75,F.rangeBand()*.9)},vt=function(){return F.rangeBand()*.45-ht()/2},at=function(){return F.rangeBand()*.45+ht()/2};
vendor: 8,489 bytes, line 25
25[T,j].forEach(function(D){var dt=D===T?"low":"high",gt=D===T?v:w;J.select("line.nv-boxplot-whisker.nv-boxplot-"+dt).watchTransition(et,"nv-boxplot: boxplots").attr("x1",F.rangeBand()*.45).attr("y1",function(Q,kt){return A(D(Q))}).attr("x2",F.rangeBand()*.45).attr("y2",function(Q,kt){return A(gt(Q))}),J.select("line.nv-boxplot-tick.nv-boxplot-"+dt).watchTransition(et,"nv-boxplot: boxplots").attr("x1",vt).attr("y1",function(Q,kt){return A(D(Q))}).attr("x2",at).attr("y2",function(Q,kt){return A(D(Q))})}),[T,j].forEach(function(D){var dt=D===T?"low":"high";ot.selectAll(".nv-boxplot-"+dt).on("mouseover",function(gt,Q,kt){d3.select(this).classed("hover",!0),V.elementMouseover({series:{key:D(gt),color:G(gt)||q(gt,kt)},e:d3.event})}).on("mouseout",function(gt,Q,kt){d3.select(this).classed("hover",!1),V.elementMouseout({series:{key:D(gt),color:G(gt)||q(gt,kt)},e:d3.event})}).on("mousemove",function(gt,Q){V.elementMousemove({e:d3.event})})}),ot.append("rect").attr("class","nv-boxplot-box").on("mouseover",function(D,dt){d3.select(this).classed("hover",!0),V.elementMouseover({key:d(D),value:d(D),series:[{key:"Q3",value:w(D),color:G(D)||q(D,dt)},{key:"Q2",value:y(D),color:G(D)||q(D,dt)},{key:"Q1",value:v(D),color:G(D)||q(D,dt)}],data:D,index:dt,e:d3.event})}).on("mouseout",function(D,dt){d3.select(this).classed("hover",!1),V.elementMouseout({key:d(D),value:d(D),series:[{key:"Q3",value:w(D),color:G(D)||q(D,dt)},{key:"Q2",value:y(D),color:G(D)||q(D,dt)},{key:"Q1",value:v(D),color:G(D)||q(D,dt)}],data:D,index:dt,e:d3.event})}).on("mousemove",function(D,dt){V.elementMousemove({e:d3.event})}),J.select("rect.nv-boxplot-box").watchTransition(et,"nv-boxplot: boxes").attr("y",function(D,dt){return A(w(D))}).attr("width",ht).attr("x",vt).attr("height",function(D,dt){return Math.abs(A(w(D))-A(v(D)))||1}).style("fill",function(D,dt){return G(D)||q(D,dt)}).style("stroke",function(D,dt){return G(D)||q(D,dt)}),ot.append("line").attr("class","nv-boxplot-median"),J.select("line.nv-boxplot-median").watchTransition(et,"nv-boxplot: boxplots line").attr("x1",vt).attr("y1",function(D,dt){return A(y(D))}).attr("x2",at).attr("y2",function(D,dt){return A(y(D))});var yt=J.selectAll(".nv-boxplot-outlier").data(function(D){return P(D)||[]});yt.enter().append("circle").style("fill",function(D,dt,gt){return I(D,dt,gt)||q(D,gt)}).style("stroke",function(D,dt,gt){return I(D,dt,gt)||q(D,gt)}).style("z-index",9e3).on("mouseover",function(D,dt,gt){d3.select(this).classed("hover",!0),V.elementMouseover({series:{key:N(D,dt,gt),color:I(D,dt,gt)||q(D,gt)},e:d3.event})}).on("mouseout",function(D,dt,gt){d3.select(this).classed("hover",!1),V.elementMouseout({series:{key:N(D,dt,gt),color:I(D,dt,gt)||q(D,gt)},e:d3.event})}).on("mousemove",function(D,dt){V.elementMousemove({e:d3.event})}),yt.attr("class","nv-boxplot-outlier"),yt.watchTransition(et,"nv-boxplot: nv-boxplot-outlier").attr("cx",F.rangeBand()*.45).attr("cy",function(D,dt,gt){return A(tt(D,dt,gt))}).attr("r","3"),yt.exit().remove(),F.copy(),z=A.copy()}),et.renderEnd("nv-boxplot immediate"),S}return S.dispatch=V,S.options=i.utils.optionsFunc.bind(S),S._options=Object.create({},{width:{get:function(){return m},set:function(M){m=M}},height:{get:function(){return E},set:function(M){E=M}},maxBoxWidth:{get:function(){return p},set:function(M){p=M}},x:{get:function(){return d},set:function(M){d=M}},q1:{get:function(){return v},set:function(M){v=M}},q2:{get:function(){return y},set:function(M){y=M}},q3:{get:function(){return w},set:function(M){w=M}},wl:{get:function(){return T},set:function(M){T=M}},wh:{get:function(){return j},set:function(M){j=M}},itemColor:{get:function(){return G},set:function(M){G=M}},outliers:{get:function(){return P},set:function(M){P=M}},outlierValue:{get:function(){return tt},set:function(M){tt=M}},outlierLabel:{get:function(){return N},set:function(M){N=M}},outlierColor:{get:function(){return I},set:function(M){I=M}},xScale:{get:function(){return F},set:function(M){F=M}},yScale:{get:function(){return A},set:function(M){A=M}},xDomain:{get:function(){return b},set:function(M){b=M}},yDomain:{get:function(){return O},set:function(M){O=M}},xRange:{get:function(){return W},set:function(M){W=M}},yRange:{get:function(){return K},set:function(M){K=M}},id:{get:function(){return x},set:function(M){x=M}},y:{get:function(){return console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead."),{}},set:function(M){console.warn("BoxPlot 'y' chart option is deprecated. Please use model overrides instead.")}},margin:{get:function(){return u},set:function(M){u.top=M.top!==void 0?M.top:u.top,u.right=M.right!==void 0?M.right:u.right,u.bottom=M.bottom!==void 0?M.bottom:u.bottom,u.left=M.left!==void 0?M.left:u.left}},color:{get:function(){return q},set:function(M){q=i.utils.getColor(M)}},duration:{get:function(){return rt},set:function(M){rt=M,et.reset(rt)}}}),i.utils.initOptions(S),S},i.models.boxPlotChart=function(){var u=i.models.boxPlot(),m=i.models.axis(),E=i.models.axis(),x={top:15,right:10,bottom:50,left:60},F=null,A=null,d=i.utils.getColor(),v=!0,y=!0,w=!1,T=!1,j=i.models.tooltip(),G,P,tt="No Data Available.",N=d3.dispatch("beforeUpdate","renderEnd"),I=250;m.orient("bottom").showMaxMin(!1).tickFormat(function(b){return b}),E.orient(w?"right":"left").tickFormat(d3.format(",.1f")),j.duration(0);var q=i.utils.renderWatch(N,I);function H(b){return q.reset(),q.models(u),v&&q.models(m),y&&q.models(E),b.each(function(W){var O=d3.select(this);i.utils.initSVG(O);var K=(F||parseInt(O.style("width"))||960)-x.left-x.right,V=(A||parseInt(O.style("height"))||400)-x.top-x.bottom;if(H.update=function(){N.beforeUpdate(),O.transition().duration(I).call(H)},H.container=this,!W||!W.length){var rt=O.selectAll(".nv-noData").data([tt]);return rt.enter().append("text").attr("class","nvd3 nv-noData").attr("dy","-.7em").style("text-anchor","middle"),rt.attr("x",x.left+K/2).attr("y",x.top+V/2).text(function(pt){return pt}),H}else O.selectAll(".nv-noData").remove();G=u.xScale(),P=u.yScale().clamp(!0);var p=O.selectAll("g.nv-wrap.nv-boxPlotWithAxes").data([W]),z=p.enter().append("g").attr("class","nvd3 nv-wrap nv-boxPlotWithAxes").append("g"),et=z.append("defs"),S=p.select("g");z.append("g").attr("class","nv-x nv-axis"),z.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),z.append("g").attr("class","nv-barsWrap"),S.attr("transform","translate("+x.left+","+x.top+")"),w&&S.select(".nv-y.nv-axis").attr("transform","translate("+K+",0)"),u.width(K).height(V);var M=S.select(".nv-barsWrap").datum(W.filter(function(pt){return!pt.disabled}));if(M.transition().call(u),et.append("clipPath").attr("id","nv-x-label-clip-"+u.id()).append("rect"),S.select("#nv-x-label-clip-"+u.id()+" rect").attr("width",G.rangeBand()*(T?2:1)).attr("height",16).attr("x",-G.rangeBand()/(T?1:2)),v){m.scale(G).ticks(i.utils.calcTicksX(K/100,W)).tickSize(-V,0),S.select(".nv-x.nv-axis").attr("transform","translate(0,"+P.range()[0]+")"),S.select(".nv-x.nv-axis").call(m);var nt=S.select(".nv-x.nv-axis").selectAll("g");T&&nt.selectAll("text").attr("transform",function(pt,xt,st){return"translate(0,"+(st%2===0?"5":"17")+")"})}y&&(E.scale(P).ticks(Math.floor(V/36)).tickSize(-K,0),S.select(".nv-y.nv-axis").call(E)),S.select(".nv-zeroLine line").attr("x1",0).attr("x2",K).attr("y1",P(0)).attr("y2",P(0))}),q.renderEnd("nv-boxplot chart immediate"),H}return u.dispatch.on("elementMouseover.tooltip",function(b){j.data(b).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(b){j.data(b).hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(b){j()}),H.dispatch=N,H.boxplot=u,H.xAxis=m,H.yAxis=E,H.tooltip=j,H.options=i.utils.optionsFunc.bind(H),H._options=Object.create({},{width:{get:function(){return F},set:function(b){F=b}},height:{get:function(){return A},set:function(b){A=b}},staggerLabels:{get:function(){return T},set:function(b){T=b}},showXAxis:{get:function(){return v},set:function(b){v=b}},showYAxis:{get:function(){return y},set:function(b){y=b}},tooltipContent:{get:function(){return j},set:function(b){j=b}},noData:{get:function(){return tt},set:function(b){tt=b}},margin:{get:function(){return x},set:function(b){x.top=b.top!==void 0?b.top:x.top,x.right=b.right!==void 0?b.right:x.right,x.bottom=b.bottom!==void 0?b.bottom:x.bottom,x.left=b.left!==void 0?b.left:x.left}},duration:{get:function(){return I},set:function(b){I=b,q.reset(I),u.duration(I),m.duration(I),E.duration(I)}},color:{get:function(){return d}
25,set:function(b){d=i.utils.getColor(b),u.color(d)}},rightAlignYAxis:{get:function(){return w},set:function(b){w=b,E.orient(b?"right":"left")}}}),i.utils.inheritOptions(H,u),i.utils.initOptions(H),H},i.models.bullet=function(){var u={top:0,right:0,bottom:0,left:0},m="left",E=!1,x=function(W){return W.ranges},F=function(W){return W.markers?W.markers:[]},A=function(W){return W.measures},d=function(W){return W.rangeLabels?W.rangeLabels:[]},v=function(W){return W.markerLabels?W.markerLabels:[]},y=function(W){return W.measureLabels?W.measureLabels:[]},w=[0],T=380,j=30,G=null,P=null,tt=i.utils.getColor(["#1f77b4"]),N=d3.dispatch("elementMouseover","elementMouseout","elementMousemove"),I=["Maximum","Mean","Minimum"],q=["Max","Avg","Min"];function H(W,O){var K=W.slice();W.sort(function(V,rt){var p=K.indexOf(V),z=K.indexOf(rt);return d3.descending(O[p],O[z])})}function b(W){return W.each(function(O,K){var V=T-u.left-u.right,rt=j-u.top-u.bottom;G=d3.select(this),i.utils.initSVG(G);var p=x.call(this,O,K).slice(),z=F.call(this,O,K).slice(),et=A.call(this,O,K).slice(),S=d.call(this,O,K).slice(),M=v.call(this,O,K).slice(),nt=y.call(this,O,K).slice();H(S,p),H(M,z),H(nt,et),p.sort(d3.descending),z.sort(d3.descending),et.sort(d3.descending);var pt=d3.scale.linear().domain(d3.extent(d3.merge([w,p]))).range(E?[V,0]:[0,V]);this.__chart__||d3.scale.linear().domain([0,1/0]).range(pt.range()),this.__chart__=pt,d3.min(p),d3.max(p),p[1];for(var xt=G.selectAll("g.nv-wrap.nv-bullet").data([O]),st=xt.enter().append("g").attr("class","nvd3 nv-wrap nv-bullet"),R=st.append("g"),L=xt.select("g"),K=0,g=p.length;K<g;K++){var B="nv-range nv-range"+K;K<=2&&(B=B+" nv-range"+q[K]),R.append("rect").attr("class",B)}R.append("rect").attr("class","nv-measure"),xt.attr("transform","translate("+u.left+","+u.top+")");for(var J=function(yt){return Math.abs(pt(yt)-pt(0))},ot=function(yt){return yt<0?pt(yt):pt(0)},K=0,g=p.length;K<g;K++){var ht=p[K];L.select("rect.nv-range"+K).attr("height",rt).attr("width",J(ht)).attr("x",ot(ht)).datum(ht)}L.select("rect.nv-measure").style("fill",tt).attr("height",rt/3).attr("y",rt/3).attr("width",et<0?pt(0)-pt(et[0]):pt(et[0])-pt(0)).attr("x",ot(et)).on("mouseover",function(){N.elementMouseover({value:et[0],label:nt[0]||"Current",color:d3.select(this).style("fill")})}).on("mousemove",function(){N.elementMousemove({value:et[0],label:nt[0]||"Current",color:d3.select(this).style("fill")})}).on("mouseout",function(){N.elementMouseout({value:et[0],label:nt[0]||"Current",color:d3.select(this).style("fill")})});var vt=rt/6,at=z.map(function(yt,D){return{value:yt,label:M[D]}});R.selectAll("path.nv-markerTriangle").data(at).enter().append("path").attr("class","nv-markerTriangle").attr("d","M0,"+vt+"L"+vt+","+-vt+" "+-vt+","+-vt+"Z").on("mouseover",function(yt){N.elementMouseover({value:yt.value,label:yt.label||"Previous",color:d3.select(this).style("fill"),pos:[pt(yt.value),rt/2]})}).on("mousemove",function(yt){N.elementMousemove({value:yt.value,label:yt.label||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(yt,D){N.elementMouseout({value:yt.value,label:yt.label||"Previous",color:d3.select(this).style("fill")})}),L.selectAll("path.nv-markerTriangle").data(at).attr("transform",function(yt){return"translate("+pt(yt.value)+","+rt/2+")"}),xt.selectAll(".nv-range").on("mouseover",function(yt,D){var dt=S[D]||I[D];N.elementMouseover({value:yt,label:dt,color:d3.select(this).style("fill")})}).on("mousemove",function(){N.elementMousemove({value:et[0],label:nt[0]||"Previous",color:d3.select(this).style("fill")})}).on("mouseout",function(yt,D){var dt=S[D]||I[D];N.elementMouseout({value:yt,label:dt,color:d3.select(this).style("fill")})})}),b}return b.dispatch=N,b.options=i.utils.optionsFunc.bind(b),b._options=Object.create({},{ranges:{get:function(){return x},set:function(W){x=W}},markers:{get:function(){return F},set:function(W){F=W}},measures:{get:function(){return A},set:function(W){A=W}},forceX:{get:function(){return w},set:function(W){w=W}},width:{get:function(){return T},set:function(W){T=W}},height:{get:function(){return j},set:function(W){j=W}},tickFormat:{get:function(){return P},set:function(W){P=W}},margin:{get:function(){return u},set:function(W){u.top=W.top!==void 0?W.top:u.top,u.right=W.right!==void 0?W.right:u.right,u.bottom=W.bottom!==void 0?W.bottom:u.bottom,u.left=W.left!==void 0?W.left:u.left}},orient:{get:function(){return m},set:function(W){m=W,E=m=="right"||m=="bottom"}},color:{get:function(){return tt},set:function(W){tt=i.utils.getColor(W)}}}),i.utils.initOptions(b),b},i.models.bulletChart=function(){var u=i.models.bullet(),m=i.models.tooltip(),E="left",x=!1,F={top:5,right:40,bottom:20,left
25:120},A=function(N){return N.ranges},d=function(N){return N.markers?N.markers:[]},v=function(N){return N.measures},y=null,w=55,T=null,j=null,G=null,P=d3.dispatch();m.duration(0).headerEnabled(!1);function tt(N){return N.each(function(I,q){var H=d3.select(this);i.utils.initSVG(H);var b=i.utils.availableWidth(y,H,F),W=w-F.top-F.bottom;if(tt.update=function(){tt(N)},tt.container=this,!I||!A.call(this,I,q))return i.utils.noData(tt,H),tt;H.selectAll(".nv-noData").remove();var O=A.call(this,I,q).slice().sort(d3.descending),K=d.call(this,I,q).slice().sort(d3.descending),V=v.call(this,I,q).slice().sort(d3.descending),rt=H.selectAll("g.nv-wrap.nv-bulletChart").data([I]),p=rt.enter().append("g").attr("class","nvd3 nv-wrap nv-bulletChart"),z=p.append("g"),et=rt.select("g");z.append("g").attr("class","nv-bulletWrap"),z.append("g").attr("class","nv-titles"),rt.attr("transform","translate("+F.left+","+F.top+")");var S=d3.scale.linear().domain([0,Math.max(O[0],K[0]||0,V[0])]).range(x?[b,0]:[0,b]),M=this.__chart__||d3.scale.linear().domain([0,1/0]).range(S.range());this.__chart__=S;var nt=z.select(".nv-titles").append("g").attr("text-anchor","end").attr("transform","translate(-6,"+(w-F.top-F.bottom)/2+")");nt.append("text").attr("class","nv-title").text(function(g){return g.title}),nt.append("text").attr("class","nv-subtitle").attr("dy","1em").text(function(g){return g.subtitle}),u.width(b).height(W);var pt=et.select(".nv-bulletWrap");d3.transition(pt).call(u);var xt=T||S.tickFormat(b/100),st=et.selectAll("g.nv-tick").data(S.ticks(j||b/50),function(g){return this.textContent||xt(g)}),R=st.enter().append("g").attr("class","nv-tick").attr("transform",function(g){return"translate("+M(g)+",0)"}).style("opacity",1e-6);R.append("line").attr("y1",W).attr("y2",W*7/6),R.append("text").attr("text-anchor","middle").attr("dy","1em").attr("y",W*7/6).text(xt);var L=d3.transition(st).attr("transform",function(g){return"translate("+S(g)+",0)"}).style("opacity",1);L.select("line").attr("y1",W).attr("y2",W*7/6),L.select("text").attr("y",W*7/6),d3.transition(st.exit()).attr("transform",function(g){return"translate("+S(g)+",0)"}).style("opacity",1e-6).remove()}),d3.timer.flush(),tt}return u.dispatch.on("elementMouseover.tooltip",function(N){N.series={key:N.label,value:N.value,color:N.color},m.data(N).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(N){m.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(N){m()}),tt.bullet=u,tt.dispatch=P,tt.tooltip=m,tt.options=i.utils.optionsFunc.bind(tt),tt._options=Object.create({},{ranges:{get:function(){return A},set:function(N){A=N}},markers:{get:function(){return d},set:function(N){d=N}},measures:{get:function(){return v},set:function(N){v=N}},width:{get:function(){return y},set:function(N){y=N}},height:{get:function(){return w},set:function(N){w=N}},tickFormat:{get:function(){return T},set:function(N){T=N}},ticks:{get:function(){return j},set:function(N){j=N}},noData:{get:function(){return G},set:function(N){G=N}},margin:{get:function(){return F},set:function(N){F.top=N.top!==void 0?N.top:F.top,F.right=N.right!==void 0?N.right:F.right,F.bottom=N.bottom!==void 0?N.bottom:F.bottom,F.left=N.left!==void 0?N.left:F.left}},orient:{get:function(){return E},set:function(N){E=N,x=E=="right"||E=="bottom"}}}),i.utils.inheritOptions(tt,u),i.utils.initOptions(tt),tt},i.models.candlestickBar=function(){var u={top:0,right:0,bottom:0,left:0},m=null,E=null,x=Math.floor(Math.random()*1e4),F,A=d3.scale.linear(),d=d3.scale.linear(),v=function(p){return p.x},y=function(p){return p.y},w=function(p){return p.open},T=function(p){return p.close},j=function(p){return p.high},G=function(p){return p.low},P=[],tt=[],N=!1,I=!0,q=i.utils.defaultColor(),H=!1,b,W,O,K,V=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");function rt(p){return p.each(function(z){F=d3.select(this);var et=i.utils.availableWidth(m,F,u),S=i.utils.availableHeight(E,F,u);i.utils.initSVG(F);var M=et/z[0].values.length*.45;A.domain(b||d3.extent(z[0].values.map(v).concat(P))),N?A.range(O||[et*.5/z[0].values.length,et*(z[0].values.length-.5)/z[0].values.length]):A.range(O||[5+M/2,et-M/2-5]),d.domain(W||[d3.min(z[0].values.map(G).concat(tt)),d3.max(z[0].values.map(j).concat(tt))]).range(K||[S,0]),A.domain()[0]===A.domain()[1]&&(A.domain()[0]?A.domain([A.domain()[0]-A.domain()[0]*.01,A.domain()[1]+A.domain()[1]*.01]):A.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+d.domain()[0]*.01,d.domain()[1]-d.domain()[1]*.01]):d.domain([-1,1]));var nt=d3.select(this).selectAll("g.nv-wrap.nv-candlestickBar").data([z[0].values]),pt=nt.enter().append("g").attr("class","nvd3 nv-wrap nv-candlestickBar"),xt=pt.append("defs"),st=pt.append("g"),R=nt.select("g");st.append("g").attr("class","nv-ticks"),nt.attr("transform","translate("+u.left+","+u.top+")"),F.on("click",function(B,J){V.chartClick({data:B,index:J,pos:d3.event,id:x})}),xt.append("clipPath").attr("id","nv-chart-clip-path-"+x).append("rect"),nt.select("#nv-chart-clip-path-"+x+" rect").attr("width",et).attr("height",S),R.attr("clip-path",I?"url(#nv-chart-clip-path-"+x+")":"");var L=nt.select(".nv-ticks").selectAll(".nv-tick").data(function(B){return B});
25L.exit().remove();var g=L.enter().append("g");L.attr("class",function(B,J,ot){return(w(B,J)>T(B,J)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+ot+"-"+J}),g.append("line").attr("class","nv-candlestick-lines").attr("transform",function(B,J){return"translate("+A(v(B,J))+",0)"}).attr("x1",0).attr("y1",function(B,J){return d(j(B,J))}).attr("x2",0).attr("y2",function(B,J){return d(G(B,J))}),g.append("rect").attr("class","nv-candlestick-rects nv-bars").attr("transform",function(B,J){return"translate("+(A(v(B,J))-M/2)+","+(d(y(B,J))-(w(B,J)>T(B,J)?d(T(B,J))-d(w(B,J)):0))+")"}).attr("x",0).attr("y",0).attr("width",M).attr("height",function(B,J){var ot=w(B,J),ht=T(B,J);return ot>ht?d(ht)-d(ot):d(ot)-d(ht)}),L.select(".nv-candlestick-lines").transition().attr("transform",function(B,J){return"translate("+A(v(B,J))+",0)"}).attr("x1",0).attr("y1",function(B,J){return d(j(B,J))}).attr("x2",0).attr("y2",function(B,J){return d(G(B,J))}),L.select(".nv-candlestick-rects").transition().attr("transform",function(B,J){return"translate("+(A(v(B,J))-M/2)+","+(d(y(B,J))-(w(B,J)>T(B,J)?d(T(B,J))-d(w(B,J)):0))+")"}).attr("x",0).attr("y",0).attr("width",M).attr("height",function(B,J){var ot=w(B,J),ht=T(B,J);return ot>ht?d(ht)-d(ot):d(ot)-d(ht)})}),rt}return rt.highlightPoint=function(p,z){rt.clearHighlights(),F.select(".nv-candlestickBar .nv-tick-0-"+p).classed("hover",z)},rt.clearHighlights=function(){F.select(".nv-candlestickBar .nv-tick.hover").classed("hover",!1)},rt.dispatch=V,rt.options=i.utils.optionsFunc.bind(rt),rt._options=Object.create({},{width:{get:function(){return m},set:function(p){m=p}},height:{get:function(){return E},set:function(p){E=p}},xScale:{get:function(){return A},set:function(p){A=p}},yScale:{get:function(){return d},set:function(p){d=p}},xDomain:{get:function(){return b},set:function(p){b=p}},yDomain:{get:function(){return W},set:function(p){W=p}},xRange:{get:function(){return O},set:function(p){O=p}},yRange:{get:function(){return K},set:function(p){K=p}},forceX:{get:function(){return P},set:function(p){P=p}},forceY:{get:function(){return tt},set:function(p){tt=p}},padData:{get:function(){return N},set:function(p){N=p}},clipEdge:{get:function(){return I},set:function(p){I=p}},id:{get:function(){return x},set:function(p){x=p}},interactive:{get:function(){return H},set:function(p){H=p}},x:{get:function(){return v},set:function(p){v=p}},y:{get:function(){return y},set:function(p){y=p}},open:{get:function(){return w()},set:function(p){w=p}},close:{get:function(){return T()},set:function(p){T=p}},high:{get:function(){return j},set:function(p){j=p}},low:{get:function(){return G},set:function(p){G=p}},margin:{get:function(){return u},set:function(p){u.top=p.top!=null?p.top:u.top,u.right=p.right!=null?p.right:u.right,u.bottom=p.bottom!=null?p.bottom:u.bottom,u.left=p.left!=null?p.left:u.left}},color:{get:function(){return q},set:function(p){q=i.utils.getColor(p)}}}),i.utils.initOptions(rt),rt},i.models.cumulativeLineChart=function(){var u=i.models.line(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend(),F=i.models.legend(),A=i.interactiveGuideline(),d=i.models.tooltip(),v={top:30,right:30,bottom:50,left:60},y=i.utils.defaultColor(),w=null,T=null,j=!0,G=!0,P=!0,tt=!1,N=!0,I=!1,q=!0,H,b,W=u.id(),O=i.utils.state(),K=null,V=null,rt=function(g){return g.average},p=d3.dispatch("stateChange","changeState","renderEnd"),z=250,et=!1;O.index=0,O.rescaleY=q,m.orient("bottom").tickPadding(7),E.orient(tt?"right":"left"),d.valueFormatter(function(g,B){return E.tickFormat()(g,B)}).headerFormatter(function(g,B){return m.tickFormat()(g,B)}),F.updateState(!1);var S=d3.scale.linear(),M={i:0,x:0},nt=i.utils.renderWatch(p,z),pt=function(g){return function(){return{active:g.map(function(B){return!B.disabled}),index:M.i,rescaleY:q}}},xt=function(g){return function(B){B.index!==void 0&&(M.i=B.index),B.rescaleY!==void 0&&(q=B.rescaleY),B.active!==void 0&&g.forEach(function(J,ot){J.disabled=!B.active[ot]})}};function st(g){return nt.reset(),nt.models(u),G&&nt.models(m),P&&nt.models(E),g.each(function(Rt){var J=d3.select(this);i.utils.initSVG(J),J.classed("nv-chart-"+W,!0);var ot=this,ht=i.utils.availableWidth(w,J,v),vt=i.utils.availableHeight(T,J,v);if(st.update=function(){z===0?J.call(st):J.transition().duration(z).call(st)}
25,st.container=this,O.setter(xt(Rt),st.update).getter(pt(Rt)).update(),O.disabled=Rt.map(function(Nt){return!!Nt.disabled}),!K){var at;K={};for(at in O)O[at]instanceof Array?K[at]=O[at].slice(0):K[at]=O[at]}var yt=d3.behavior.drag().on("dragstart",D).on("drag",dt).on("dragend",gt);function D(Nt,Zt){d3.select(st.container).style("cursor","ew-resize")}function dt(Nt,Zt){M.x=d3.event.x,M.i=Math.round(S.invert(M.x)),jt()}function gt(Nt,Zt){d3.select(st.container).style("cursor","auto"),O.index=M.i,p.stateChange(O)}if(!Rt||!Rt.length||!Rt.filter(function(Nt){return Nt.values.length}).length)return i.utils.noData(st,J),st;if(J.selectAll(".nv-noData").remove(),H=u.xScale(),b=u.yScale(),q)u.yDomain(null);else{var Q=Rt.filter(function(Nt){return!Nt.disabled}).map(function(Nt,Zt){var Et=d3.extent(Nt.values,u.y());return Et[0]<-.95&&(Et[0]=-.95),[(Et[0]-Et[1])/(1+Et[1]),(Et[1]-Et[0])/(1+Et[0])]}),kt=[d3.min(Q,function(Nt){return Nt[0]}),d3.max(Q,function(Nt){return Nt[1]})];u.yDomain(kt)}S.domain([0,Rt[0].values.length-1]).range([0,ht]).clamp(!0);var Rt=L(M.i,Rt),Ut=I?"none":"all",Jt=J.selectAll("g.nv-wrap.nv-cumulativeLine").data([Rt]),zt=Jt.enter().append("g").attr("class","nvd3 nv-wrap nv-cumulativeLine").append("g"),Ht=Jt.select("g");if(zt.append("g").attr("class","nv-interactive"),zt.append("g").attr("class","nv-x nv-axis").style("pointer-events","none"),zt.append("g").attr("class","nv-y nv-axis"),zt.append("g").attr("class","nv-background"),zt.append("g").attr("class","nv-linesWrap").style("pointer-events",Ut),zt.append("g").attr("class","nv-avgLinesWrap").style("pointer-events","none"),zt.append("g").attr("class","nv-legendWrap"),zt.append("g").attr("class","nv-controlsWrap"),j?(x.width(ht),Ht.select(".nv-legendWrap").datum(Rt).call(x),v.top!=x.height()&&(v.top=x.height(),vt=i.utils.availableHeight(T,J,v)),Ht.select(".nv-legendWrap").attr("transform","translate(0,"+-v.top+")")):Ht.select(".nv-legendWrap").selectAll("*").remove(),!N)Ht.select(".nv-controlsWrap").selectAll("*").remove();else{var oe=[{key:"Re-scale y-axis",disabled:!q}];F.width(140).color(["#444","#444","#444"]).rightAlign(!1).margin({top:5,right:0,bottom:5,left:20}),Ht.select(".nv-controlsWrap").datum(oe).attr("transform","translate(0,"+-v.top+")").call(F)}Jt.attr("transform","translate("+v.left+","+v.top+")"),tt&&Ht.select(".nv-y.nv-axis").attr("transform","translate("+ht+",0)");var se=Rt.filter(function(Nt){return Nt.tempDisabled});Jt.select(".tempDisabled").remove(),se.length&&Jt.append("text").attr("class","tempDisabled").attr("x",ht/2).attr("y","-.71em").style("text-anchor","end").text(se.map(function(Nt){return Nt.key}).join(", ")+" values cannot be calculated for this time period."),I&&(A.width(ht).height(vt).margin({left:v.left,top:v.top}).svgContainer(J).xScale(H),Jt.select(".nv-interactive").call(A)),zt.select(".nv-background").append("rect"),Ht.select(".nv-background rect").attr("width",ht).attr("height",vt),u.y(function(Nt){return Nt.display.y}).width(ht).height(vt).color(Rt.map(function(Nt,Zt){return Nt.color||y(Nt,Zt)}).filter(function(Nt,Zt){return!Rt[Zt].disabled&&!Rt[Zt].tempDisabled}));var pe=Ht.select(".nv-linesWrap").datum(Rt.filter(function(Nt){return!Nt.disabled&&!Nt.tempDisabled}));pe.call(u),Rt.forEach(function(Nt,Zt){Nt.seriesIndex=Zt});var mt=Rt.filter(function(Nt){return!Nt.disabled&&!!rt(Nt)}),Dt=Ht.select(".nv-avgLinesWrap").selectAll("line").data(mt,function(Nt){return Nt.key}),Kt=function(Nt){var Zt=b(rt(Nt));return Zt<0?0:Zt>vt?vt:Zt};Dt.enter().append("line").style("stroke-width",2).style("stroke-dasharray","10,10").style("stroke",function(Nt,Zt){return u.color()(Nt,Nt.seriesIndex)}).attr("x1",0).attr("x2",ht).attr("y1",Kt).attr("y2",Kt),Dt.style("stroke-opacity",function(Nt){var Zt=b(rt(Nt));return Zt<0||Zt>vt?0:1}).attr("x1",0).attr("x2",ht).attr("y1",Kt).attr("y2",Kt),Dt.exit().remove();var qt=pe.selectAll(".nv-indexLine").data([M]);qt.enter().append("rect").attr("class","nv-indexLine").attr("width",3).attr("x",-2).attr("fill","red").attr("fill-opacity",.5).style("pointer-events","all").call(yt),qt.attr("transform",function(Nt){return"translate("+S(Nt.i)+",0)"}).attr("height",vt),G&&(m.scale(H)._ticks(i.utils.calcTicksX(ht/70,Rt)).tickSize(-vt,0),Ht.select(".nv-x.nv-axis").attr("transform","translate(0,"+b.range()[0]+")"),Ht.select(".nv-x.nv-axis").call(m)),P&&(E.scale(b)._ticks(i.utils.calcTicksY(vt/36,Rt)).tickSize(-ht,0),Ht.select(".nv-y.nv-axis").call(E));function jt(){qt.data([M]);var Nt=st.duration();
25st.duration(0),st.update(),st.duration(Nt)}Ht.select(".nv-background rect").on("click",function(){M.x=d3.mouse(this)[0],M.i=Math.round(S.invert(M.x)),O.index=M.i,p.stateChange(O),jt()}),u.dispatch.on("elementClick",function(Nt){M.i=Nt.pointIndex,M.x=S(M.i),O.index=M.i,p.stateChange(O),jt()}),F.dispatch.on("legendClick",function(Nt,Zt){Nt.disabled=!Nt.disabled,q=!Nt.disabled,O.rescaleY=q,p.stateChange(O),st.update()}),x.dispatch.on("stateChange",function(Nt){for(var Zt in Nt)O[Zt]=Nt[Zt];p.stateChange(O),st.update()}),A.dispatch.on("elementMousemove",function(Nt){u.clearHighlights();var Zt,Et,ae,de=[];if(Rt.filter(function(At,Ct){return At.seriesIndex=Ct,!At.disabled}).forEach(function(At,Ct){Et=i.interactiveBisect(At.values,Nt.pointXValue,st.x()),u.highlightPoint(Ct,Et,!0);var Ft=At.values[Et];typeof Ft>"u"||(typeof Zt>"u"&&(Zt=Ft),typeof ae>"u"&&(ae=st.xScale()(st.x()(Ft,Et))),de.push({key:At.key,value:st.y()(Ft,Et),color:y(At,At.seriesIndex)}))}),de.length>2){var ke=st.yScale().invert(Nt.mouseY),Ae=Math.abs(st.yScale().domain()[0]-st.yScale().domain()[1]),Pt=.03*Ae,Xt=i.nearestValueIndex(de.map(function(At){return At.value}),ke,Pt);Xt!==null&&(de[Xt].highlight=!0)}var lt=m.tickFormat()(st.x()(Zt,Et),Et);A.tooltip.chartContainer(ot.parentNode).valueFormatter(function(At,Ct){return E.tickFormat()(At)}).data({value:lt,series:de})(),A.renderGuideLine(ae)}),A.dispatch.on("elementMouseout",function(Nt){u.clearHighlights()}),p.on("changeState",function(Nt){typeof Nt.disabled<"u"&&(Rt.forEach(function(Zt,Et){Zt.disabled=Nt.disabled[Et]}),O.disabled=Nt.disabled),typeof Nt.index<"u"&&(M.i=Nt.index,M.x=S(M.i),O.index=Nt.index,qt.data([M])),typeof Nt.rescaleY<"u"&&(q=Nt.rescaleY),st.update()})}),nt.renderEnd("cumulativeLineChart immediate"),st}u.dispatch.on("elementMouseover.tooltip",function(g){var B={x:st.x()(g.point),y:st.y()(g.point),color:g.point.color};g.point=B,d.data(g).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(g){d.hidden(!0)});var R=null;function L(g,B){return R||(R=u.y()),B.map(function(J,ot){if(!J.values)return J;var ht=J.values[g];if(ht==null)return J;var vt=R(ht,g);return vt<-.95&&!et?(J.tempDisabled=!0,J):(J.tempDisabled=!1,J.values=J.values.map(function(at,yt){return at.display={
vendor: 16,980 bytes, line 25
25y:(R(at,yt)-vt)/(1+vt)},at}),J)})}return st.dispatch=p,st.lines=u,st.legend=x,st.controls=F,st.xAxis=m,st.yAxis=E,st.interactiveLayer=A,st.state=O,st.tooltip=d,st.options=i.utils.optionsFunc.bind(st),st._options=Object.create({},{width:{get:function(){return w},set:function(g){w=g}},height:{get:function(){return T},set:function(g){T=g}},rescaleY:{get:function(){return q},set:function(g){q=g}},showControls:{get:function(){return N},set:function(g){N=g}},showLegend:{get:function(){return j},set:function(g){j=g}},average:{get:function(){return rt},set:function(g){rt=g}},defaultState:{get:function(){return K},set:function(g){K=g}},noData:{get:function(){return V},set:function(g){V=g}},showXAxis:{get:function(){return G},set:function(g){G=g}},showYAxis:{get:function(){return P},set:function(g){P=g}},noErrorCheck:{get:function(){return et},set:function(g){et=g}},margin:{get:function(){return v},set:function(g){v.top=g.top!==void 0?g.top:v.top,v.right=g.right!==void 0?g.right:v.right,v.bottom=g.bottom!==void 0?g.bottom:v.bottom,v.left=g.left!==void 0?g.left:v.left}},color:{get:function(){return y},set:function(g){y=i.utils.getColor(g),x.color(y)}},useInteractiveGuideline:{get:function(){return I},set:function(g){I=g,g===!0&&(st.interactive(!1),st.useVoronoi(!1))}},rightAlignYAxis:{get:function(){return tt},set:function(g){tt=g,E.orient(g?"right":"left")}},duration:{get:function(){return z},set:function(g){z=g,u.duration(z),m.duration(z),E.duration(z),nt.reset(z)}}}),i.utils.inheritOptions(st,u),i.utils.initOptions(st),st},i.models.discreteBar=function(){var u={top:0,right:0,bottom:0,left:0},m=960,E=500,x=Math.floor(Math.random()*1e4),F,A=d3.scale.ordinal(),d=d3.scale.linear(),v=function(V){return V.x},y=function(V){return V.y},w=[0],T=i.utils.defaultColor(),j=!1,G=d3.format(",.2f"),P,tt,N,I,q=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),H="discreteBar",b=250,W,O=i.utils.renderWatch(q,b);function K(V){return O.reset(),V.each(function(rt){var p=m-u.left-u.right,z=E-u.top-u.bottom;F=d3.select(this),i.utils.initSVG(F),rt.forEach(function(R,L){R.values.forEach(function(g){g.series=L})});var et=P&&tt?[]:rt.map(function(R){return R.values.map(function(L,g){return{x:v(L,g),y:y(L,g),y0:L.y0}})});A.domain(P||d3.merge(et).map(function(R){return R.x})).rangeBands(N||[0,p],.1),d.domain(tt||d3.extent(d3.merge(et).map(function(R){return R.y}).concat(w))),j?d.range(I||[z-(d.domain()[0]<0?12:0),d.domain()[1]>0?12:0]):d.range(I||[z,0]),W=W||d.copy().range([d(0),d(0)]);var S=F.selectAll("g.nv-wrap.nv-discretebar").data([rt]),M=S.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),nt=M.append("g");S.select("g"),nt.append("g").attr("class","nv-groups"),S.attr("transform","translate("+u.left+","+u.top+")");var pt=S.select(".nv-groups").selectAll(".nv-group").data(function(R){return R},function(R){return R.key});pt.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),pt.exit().watchTransition(O,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),pt.attr("class",function(R,L){return"nv-group nv-series-"+L}).classed("hover",function(R){return R.hover}),pt.watchTransition(O,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var xt=pt.selectAll("g.nv-bar").data(function(R){return R.values});xt.exit().remove();var st=xt.enter().append("g").attr("transform",function(R,L,g){return"translate("+(A(v(R,L))+A.rangeBand()*.05)+", "+d(0)+")"}).on("mouseover",function(R,L){d3.select(this).classed("hover",!0),q.elementMouseover({data:R,index:L,color:d3.select(this).style("fill")})}).on("mouseout",function(R,L){d3.select(this).classed("hover",!1),q.elementMouseout({data:R,index:L,color:d3.select(this).style("fill")})}).on("mousemove",function(R,L){q.elementMousemove({data:R,index:L,color:d3.select(this).style("fill")})}).on("click",function(R,L){var g=this;q.elementClick({data:R,index:L,color:d3.select(this).style("fill"),event:d3.event,element:g}),d3.event.stopPropagation()}).on("dblclick",function(R,L){q.elementDblClick({data:R,index:L,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});st.append("rect").attr("height",0).attr("width",A.rangeBand()*.9/rt.length),j?(st.append("text").attr("text-anchor","middle"),xt.select("text").text(function(R,L){return G(y(R,L))}).watchTransition(O,"discreteBar: bars text").attr("x",A.rangeBand()*.9/2).attr("y",function(R,L){return y(R,L)<0?d(y(R,L))-d(0)+12:-4})):xt.selectAll("text").remove(),xt.attr("class",function(R,L){return y(R,L)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(R,L){return R.color||T(R,L)}).style("stroke",function(R,L){return R.color||T(R,L)}).select("rect").attr("class",H).watchTransition(O,"discreteBar: bars rect").attr("width",A.rangeBand()*.9/rt.length),xt.watchTransition(O,"discreteBar: bars").attr("transform",function(R,L){var g=A(v(R,L))+A.rangeBand()*.05,B=y(R,L)<0?d(0):d(0)-d(y(R,L))<1?d(0)-1:d(y(R,L));return"translate("+g+", "+B+")"}).select("rect").attr("height",function(R,L){return Math.max(Math.abs(d(y(R,L))-d(0)),1)}),A.copy(),W=d.copy()}),O.renderEnd("discreteBar immediate"),K}return K.dispatch=q,K.options=i.utils.optionsFunc.bind(K),K._options=Object.create({},{width:{get:function(){return m},set:function(V){m=V}},height:{get:function(){return E},set:function(V){E=V}},forceY:{get:function(){return w},set:function(V){w=V}},showValues:{get:function(){return j},set:function(V){j=V}},x:{get:function(){return v},set:function(V){v=V}},y:{get:function(){return y},set:function(V){y=V}},xScale:{get:function(){return A},set:function(V){A=V}},yScale:{get:function(){return d},set:function(V){d=V}},xDomain:{get:function(){return P},set:function(V){P=V}},yDomain:{get:function(){return tt},set:function(V){tt=V}},xRange:{get:function(){return N},set:function(V){N=V}},yRange:{get:function(){return I},set:function(V){I=V}},valueFormat:{get:function(){return G},set:function(V){G=V}},id:{get:function(){return x},set:function(V){x=V}},rectClass:{get:function(){return H},set:function(V){H=V}},margin:{get:function(){return u},set:function(V){u.top=V.top!==void 0?V.top:u.top,u.right=V.right!==void 0?V.right:u.right,u.bottom=V.bottom!==void 0?V.bottom:u.bottom,u.left=V.left!==void 0?V.left:u.left}},color:{get:function(){return T},set:function(V){T=i.utils.getColor(V)}},duration:{get:function(){return b},set:function(V){b=V,O.reset(b)}}}),i.utils.initOptions(K),K},i.models.discreteBarChart=function(){var u=i.models.discreteBar(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend(),F=i.models.tooltip(),A={top:15,right:10,bottom:50,left:60},d=null,v=null,y=i.utils.getColor(),w=!1,T=!0,j=!0,G=!1,P=!1,tt=!1,N=0,I,q,H=null,b=d3.dispatch("beforeUpdate","renderEnd"),W=250;m.orient("bottom").showMaxMin(!1).tickFormat(function(V){return V}),E.orient(G?"right":"left").tickFormat(d3.format(",.1f")),F.duration(0).headerEnabled(!1).valueFormatter(function(V,rt){return E.tickFormat()(V,rt)}).keyFormatter(function(V,rt){return m.tickFormat()(V,rt)});var O=i.utils.renderWatch(b,W);function K(V){return O.reset(),O.models(u),T&&O.models(m),j&&O.models(E),V.each(function(rt){var p=d3.select(this);i.utils.initSVG(p);var z=i.utils.availableWidth(d,p,A),et=i.utils.availableHeight(v,p,A);if(K.update=function(){b.beforeUpdate(),p.transition().duration(W).call(K)},K.container=this,!rt||!rt.length||!rt.filter(function(R){return R.values.length}).length)return i.utils.noData(K,p),K;p.selectAll(".nv-noData").remove(),I=u.xScale(),q=u.yScale().clamp(!0);var S=p.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([rt]),M=S.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),nt=M.append("defs"),pt=S.select("g");M.append("g").attr("class","nv-x nv-axis"),M.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),M.append("g").attr("class","nv-barsWrap"),M.append("g").attr("class","nv-legendWrap"),pt.attr("transform","translate("+A.left+","+A.top+")"),w?(x.width(z),pt.select(".nv-legendWrap").datum(rt).call(x),A.top!=x.height()&&(A.top=x.height(),et=i.utils.availableHeight(v,p,A)),S.select(".nv-legendWrap").attr("transform","translate(0,"+-A.top+")")):pt.select(".nv-legendWrap").selectAll("*").remove(),G&&pt.select(".nv-y.nv-axis").attr("transform","translate("+z+",0)"),u.width(z).height(et);var xt=pt.select(".nv-barsWrap").datum(rt.filter(function(R){return!R.disabled}));if(xt.transition().call(u),nt.append("clipPath").attr("id","nv-x-label-clip-"+u.id()).append("rect"),pt.select("#nv-x-label-clip-"+u.id()+" rect").attr("width",I.rangeBand()*(P?2:1)).attr("height",16).attr("x",-I.rangeBand()/(P?1:2)),T){m.scale(I)._ticks(i.utils.calcTicksX(z/100,rt)).tickSize(-et,0),pt.select(".nv-x.nv-axis").attr("transform","translate(0,"+(q.range()[0]+(u.showValues()&&q.domain()[0]<0?16:0))+")"),pt.select(".nv-x.nv-axis").call(m);var st=pt.select(".nv-x.nv-axis").selectAll("g");P&&st.selectAll("text").attr("transform",function(R,L,g){return"translate(0,"+(g%2==0?"5":"17")+")"}),N&&st.selectAll(".tick text").attr("transform","rotate("+N+" 0,0)").style("text-anchor",N>0?"start":"end"),tt&&pt.selectAll(".tick text").call(i.utils.wrapTicks,K.xAxis.rangeBand())}j&&(E.scale(q)._ticks(i.utils.calcTicksY(et/36,rt)).tickSize(-z,0),pt.select(".nv-y.nv-axis").call(E)),pt.select(".nv-zeroLine line").attr("x1",0).attr("x2",G?-z:z).attr("y1",q(0)).attr("y2",q(0))}),O.renderEnd("discreteBar chart immediate"),K}return u.dispatch.on("elementMouseover.tooltip",function(V){V.series={key:K.x()(V.data),value:K.y()(V.data),color:V.color},F.data(V).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(V){F.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(V){F()}),K.dispatch=b,K.discretebar=u,K.legend=x,K.xAxis=m,K.yAxis=E,K.tooltip=F,K.options=i.utils.optionsFunc.bind(K),K._options=Object.create({},{width:{get:function(){return d},set:function(V){d=V}},height:{get:function(){return v},set:function(V){v=V}},showLegend:{get:function(){return w},set:function(V){w=V}},staggerLabels:{get:function(){return P},set:function(V){P=V}},rotateLabels:{get:function(){return N},set:function(V){N=V}},wrapLabels:{get:function(){return tt},set:function(V){tt=!!V}},showXAxis:{get:function(){return T},set:function(V){T=V}},showYAxis:{get:function(){return j},set:function(V){j=V}},noData:{get:function(){return H},set:function(V){H=V}},margin:{get:function(){return A},set:function(V){A.top=V.top!==void 0?V.top:A.top,A.right=V.right!==void 0?V.right:A.right,A.bottom=V.bottom!==void 0?V.bottom:A.bottom,A.left=V.left!==void 0?V.left:A.left}},duration:{get:function(){return W},set:function(V){W=V,O.reset(W),u.duration(W),m.duration(W),E.duration(W)}},color:{get:function(){return y},set:function(V){y=i.utils.getColor(V),u.color(y),x.color(y)}},rightAlignYAxis:{get:function(){return G},set:function(V){G=V,E.orient(V?"right":"left")}}}),i.utils.inheritOptions(K,u),i.utils.initOptions(K),K},i.models.distribution=function(){var u={top:0,right:0,bottom:0,left:0},m=400,E=8,x="x",F=function(G){return G[x]},A=i.utils.defaultColor(),d=d3.scale.linear(),v=250,y=d3.dispatch("renderEnd"),w,T=i.utils.renderWatch(y,v);function j(G){return T.reset(),G.each(function(P){m-(x==="x"?u.left+u.right:u.top+u.bottom);var tt=x=="x"?"y":"x",N=d3.select(this);i.utils.initSVG(N),w=w||d;var I=N.selectAll("g.nv-distribution").data([P]),q=I.enter().append("g").attr("class","nvd3 nv-distribution");q.append("g");var H=I.select("g");I.attr("transform","translate("+u.left+","+u.top+")");var b=H.selectAll("g.nv-dist").data(function(O){return O},function(O){return O.key});b.enter().append("g"),b.attr("class",function(O,K){return"nv-dist nv-series-"+K}).style("stroke",function(O,K){return A(O,K)});var W=b.selectAll("line.nv-dist"+x).data(function(O){return O.values});W.enter().append("line").attr(x+"1",function(O,K){return w(F(O,K))}).attr(x+"2",function(O,K){return w(F(O,K))}),T.transition(b.exit().selectAll("line.nv-dist"+x),"dist exit").attr(x+"1",function(O,K){return d(F(O,K))}).attr(x+"2",function(O,K){return d(F(O,K))}).style("stroke-opacity",0).remove(),W.attr("class",function(O,K){return"nv-dist"+x+" nv-dist"+x+"-"+K}).attr(tt+"1",0).attr(tt+"2",E),T.transition(W,"dist").attr(x+"1",function(O,K){return d(F(O,K))}).attr(x+"2",function(O,K){return d(F(O,K))}),w=d.copy()}),T.renderEnd("distribution immediate"),j}return j.options=i.utils.optionsFunc.bind(j),j.dispatch=y,j.margin=function(G){return arguments.length?(u.top=typeof G.top<"u"?G.top:u.top,u.right=typeof G.right<"u"?G.right:u.right,u.bottom=typeof G.bottom<"u"?G.bottom:u.bottom,u.left=typeof G.left<"u"?G.left:u.left,j):u},j.width=function(G){return arguments.length?(m=G,j):m},j.axis=function(G){return arguments.length?(x=G,j):x},j.size=function(G){return arguments.length?(E=G,j):E},j.getData=function(G){return arguments.length?(F=d3.functor(G),j):F},j.scale=function(G){return arguments.length?(d=G,j):d},j.color=function(G){return arguments.length?(A=i.utils.getColor(G),j):A},j.duration=function(G){return arguments.length?(v=G,T.reset(v),j):v},j},i.models.forceDirectedGraph=function(){var u={top:2,right:0,bottom:2,left:0},m=400,E=32,x=null,F=d3.dispatch("renderEnd"),A=i.utils.getColor(["#000"]),d=i.models.tooltip(),v=null,y=.1,w=.9,T=30,j=-120,G=.1,P=.8,tt=.1,N=5,I=function(W){},q=function(W){},H=i.utils.renderWatch(F);function b(W){return H.reset(),W.each(function(O){x=d3.select(this),i.utils.initSVG(x);var K=i.utils.availableWidth(m,x,u),V=i.utils.availableHeight(E,x,u);if(x.attr("width",K).attr("height",V),!O||!O.links||!O.nodes)return i.utils.noData(b,x),b;x.selectAll(".nv-noData").remove(),x.selectAll("*").remove();var rt=new Set;O.nodes.forEach(function(S){var M=Object.keys(S);M.forEach(function(nt){rt.add(nt)})});var p=d3.layout.force().nodes(O.nodes).links(O.links).size([K,V]).linkStrength(y).friction(w).linkDistance(T).charge(j).gravity(G).theta(P).alpha(tt).start(),z=x.selectAll(".link").data(O.links).enter().append("line").attr("class","nv-force-link").style("stroke-width",function(S){return Math.sqrt(S.value)}),et=x.selectAll(".node").data(O.nodes).enter().append("g").attr("class","nv-force-node").call(p.drag);et.append("circle").attr("r",N).style("fill",function(S){return A(S)}).on("mouseover",function(S){x.select(".nv-series-"+S.seriesIndex+" .nv-distx-"+S.pointIndex).attr("y1",S.py),x.select(".nv-series-"+S.seriesIndex+" .nv-disty-"+S.pointIndex).attr("x2",S.px);var M=A(S);S.series=[],rt.forEach(function(nt){S.series.push({color:M,key:nt,value:S[nt]})}),d.data(S).hidden(!1)}).on("mouseout",function(S){d.hidden(!0)}),d.headerFormatter(function(S){return"Node"}),q(z),I(et),p.on("tick",function(){z.attr("x1",function(S){return S.source.x}).attr("y1",function(S){return S.source.y}).attr("x2",function(S){return S.target.x}).attr("y2",function(S){return S.target.y}),et.attr("transform",function(S){return"translate("+S.x+", "+S.y+")"})})}),b}return b.options=i.utils.optionsFunc.bind(b),b._options=Object.create({},{width:{get:function(){return m},set:function(W){m=W}},height:{get:function(){return E},set:function(W){E=W}},linkStrength:{get:function(){return y},set:function(W){y=W}},friction:{get:function(){return w},set:function(W){w=W}},linkDist:{get:function(){return T},set:function(W){T=W}},charge:{get:function(){return j},set:function(W){j=W}},gravity:{get:function(){return G},set:function(W){G=W}},theta:{get:function(){return P},set:function(W){P=W}},alpha:{get:function(){return tt},set:function(W){tt=W}},radius:{get:function(){return N},set:function(W){N=W}},x:{get:function(){return getX},set:function(W){getX=d3.functor(W)}},y:{get:function(){return getY},set:function(W){getY=d3.functor(W)}},margin:{get:function(){return u},set:function(W){u.top=W.top!==void 0?W.top:u.top,u.right=W.right!==void 0?W.right:u.right,u.bottom=W.bottom!==void 0?W.bottom:u.bottom,u.left=W.left!==void 0?W.left:u.left}},color:{get:function(){return A},set:function(W){A=i.utils.getColor(W)}},noData:{get:function(){return v},set:function(W){v=W}},nodeExtras:{get:function(){return I},set:function(W){I=W}},linkExtras:{get:function(){return q},set:function(W){q=W}}}),b.dispatch=F,b.tooltip=d,i.utils.initOptions(b),b},i.models.furiousLegend=function(){var u={top:5,right:0,bottom:5,left:0},m=400,E=20,x=function(N){return N.key},F=i.utils.getColor(),A=20,d=!0,v=28,y=!0,w=!0,T=!1,j=!1,G=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),P="classic";function tt(N){N.each(function(H){var b=m-u.left-u.right,W=d3.select(this);i.utils.initSVG(W);var O=W.selectAll("g.nv-legend").data([H]);O.enter().append("g").attr("class","nvd3 nv-legend").append("g");var K=O.select("g");O.attr("transform","translate("+u.left+","+u.top+")");var V=K.selectAll(".nv-series").data(function(vt){return P!="furious"?vt:vt.filter(function(at){return j?!0:!at.disengaged})}),rt=V.enter().append("g").attr("class","nv-series"),p;
25if(P=="classic")rt.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),p=V.select("circle");else if(P=="furious"){rt.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),p=V.select("rect"),rt.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)");var z=V.select(".nv-check-box");z.each(function(vt,at){d3.select(this).selectAll("path").attr("stroke",I(vt,at))})}rt.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var et=V.select("text.nv-legend-text");V.on("mouseover",function(vt,at){G.legendMouseover(vt,at)}).on("mouseout",function(vt,at){G.legendMouseout(vt,at)}).on("click",function(vt,at){G.legendClick(vt,at);var yt=V.data();if(w){if(P=="classic")T?(yt.forEach(function(dt){dt.disabled=!0}),vt.disabled=!1):(vt.disabled=!vt.disabled,yt.every(function(dt){return dt.disabled})&&yt.forEach(function(dt){dt.disabled=!1}));else if(P=="furious"){if(j)vt.disengaged=!vt.disengaged,vt.userDisabled=vt.userDisabled==null?!!vt.disabled:vt.userDisabled,vt.disabled=vt.disengaged||vt.userDisabled;else if(!j){vt.disabled=!vt.disabled,vt.userDisabled=vt.disabled;var D=yt.filter(function(dt){return!dt.disengaged});D.every(function(dt){return dt.userDisabled})&&yt.forEach(function(dt){dt.disabled=dt.userDisabled=!1})}}G.stateChange({disabled:yt.map(function(dt){return!!dt.disabled}),disengaged:yt.map(function(dt){return!!dt.disengaged})})}}).on("dblclick",function(vt,at){if(!(P=="furious"&&j)&&(G.legendDblclick(vt,at),w)){var yt=V.data();yt.forEach(function(D){D.disabled=!0,P=="furious"&&(D.userDisabled=D.disabled)}),vt.disabled=!1,P=="furious"&&(vt.userDisabled=vt.disabled),G.stateChange({disabled:yt.map(function(D){return!!D.disabled})})}}),V.classed("nv-disabled",function(vt){return vt.userDisabled}),V.exit().remove(),et.attr("fill",I).text(x);var S;switch(P){case"furious":S=23;break;case"classic":S=20}if(d){var M=[];V.each(function(vt,at){var yt;if(x(vt)&&x(vt).length>A){var D=x(vt).substring(0,A);yt=d3.select(this).select("text").text(D+"..."),d3.select(this).append("svg:title").text(x(vt))}else yt=d3.select(this).select("text");var dt;try{if(dt=yt.node().getComputedTextLength(),dt<=0)throw Error()}catch{dt=i.utils.calcApproxTextWidth(yt)}M.push(dt+v)});for(var nt=0,pt=0,xt=[];pt<b&&nt<M.length;)xt[nt]=M[nt],pt+=M[nt++];for(nt===0&&(nt=1);pt>b&&nt>1;){xt=[],nt--;for(var st=0;st<M.length;st++)M[st]>(xt[st%nt]||0)&&(xt[st%nt]=M[st]);pt=xt.reduce(function(vt,at,yt,D){return vt+at})}for(var R=[],L=0,g=0;L<nt;L++)R[L]=g,g+=xt[L];V.attr("transform",function(vt,at){return"translate("+R[at%nt]+","+(5+Math.floor(at/nt)*S)+")"}),y?K.attr("transform","translate("+(m-u.right-pt)+","+u.top+")"):K.attr("transform","translate(0,"+u.top+")"),E=u.top+u.bottom+Math.ceil(M.length/nt)*S}else{var B=5,J=5,ot=0,ht;V.attr("transform",function(vt,at){var yt=d3.select(this).select("text").node().getComputedTextLength()+v;return ht=J,m<u.left+u.right+ht+yt&&(J=ht=5,B+=S),J+=yt,J>ot&&(ot=J),"translate("+ht+","+B+")"}),K.attr("transform","translate("+(m-u.right-ot)+","+u.top+")"),E=u.top+u.bottom+B+15}P=="furious"&&p.attr("width",function(vt,at){return et[0][at].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),p.style("fill",q).style("stroke",function(vt,at){return vt.color||F(vt,at)})});function I(H,b){if(P!="furious")return"#000";if(j)return H.disengaged?F(H,b):"#fff";if(!j)return H.disabled?F(H,b):"#fff"}function q(H,b){return j&&P=="furious"?H.disengaged?"#fff":F(H,b):H.disabled?"#fff":F(H,b)}return tt}return tt.dispatch=G,tt.options=i.utils.optionsFunc.bind(tt),tt._options=Object.create({},{width:{get:function(){return m},set:function(N){m=N}},height:{get:function(){return E},set:function(N){E=N}},key:{get:function(){return x},set:function(N){x=N}},align:{get:function(){return d}
vendor: 9,214 bytes, line 25
25,set:function(N){d=N}},rightAlign:{get:function(){return y},set:function(N){y=N}},maxKeyLength:{get:function(){return A},set:function(N){A=N}},padding:{get:function(){return v},set:function(N){v=N}},updateState:{get:function(){return w},set:function(N){w=N}},radioButtonMode:{get:function(){return T},set:function(N){T=N}},expanded:{get:function(){return j},set:function(N){j=N}},vers:{get:function(){return P},set:function(N){P=N}},margin:{get:function(){return u},set:function(N){u.top=N.top!==void 0?N.top:u.top,u.right=N.right!==void 0?N.right:u.right,u.bottom=N.bottom!==void 0?N.bottom:u.bottom,u.left=N.left!==void 0?N.left:u.left}},color:{get:function(){return F},set:function(N){F=i.utils.getColor(N)}}}),i.utils.initOptions(tt),tt},i.models.historicalBar=function(){var u={top:0,right:0,bottom:0,left:0},m=null,E=null,x=Math.floor(Math.random()*1e4),F=null,A=d3.scale.linear(),d=d3.scale.linear(),v=function(K){return K.x},y=function(K){return K.y},w=[],T=[0],j=!1,G=!0,P=i.utils.defaultColor(),tt,N,I,q,H=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),b=!0,W=i.utils.renderWatch(H,0);function O(K){return K.each(function(V){W.reset(),F=d3.select(this);var rt=i.utils.availableWidth(m,F,u),p=i.utils.availableHeight(E,F,u);i.utils.initSVG(F),A.domain(tt||d3.extent(V[0].values.map(v).concat(w))),j?A.range(I||[rt*.5/V[0].values.length,rt*(V[0].values.length-.5)/V[0].values.length]):A.range(I||[0,rt]),d.domain(N||d3.extent(V[0].values.map(y).concat(T))).range(q||[p,0]),A.domain()[0]===A.domain()[1]&&(A.domain()[0]?A.domain([A.domain()[0]-A.domain()[0]*.01,A.domain()[1]+A.domain()[1]*.01]):A.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+d.domain()[0]*.01,d.domain()[1]-d.domain()[1]*.01]):d.domain([-1,1]));var z=F.selectAll("g.nv-wrap.nv-historicalBar-"+x).data([V[0].values]),et=z.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBar-"+x),S=et.append("defs"),M=et.append("g"),nt=z.select("g");M.append("g").attr("class","nv-bars"),z.attr("transform","translate("+u.left+","+u.top+")"),F.on("click",function(xt,st){H.chartClick({data:xt,index:st,pos:d3.event,id:x})}),S.append("clipPath").attr("id","nv-chart-clip-path-"+x).append("rect"),z.select("#nv-chart-clip-path-"+x+" rect").attr("width",rt).attr("height",p),nt.attr("clip-path",G?"url(#nv-chart-clip-path-"+x+")":"");var pt=z.select(".nv-bars").selectAll(".nv-bar").data(function(xt){return xt},function(xt,st){return v(xt,st)});pt.exit().remove(),pt.enter().append("rect").attr("x",0).attr("y",function(xt,st){return i.utils.NaNtoZero(d(Math.max(0,y(xt,st))))}).attr("height",function(xt,st){return i.utils.NaNtoZero(Math.abs(d(y(xt,st))-d(0)))}).attr("transform",function(xt,st){return"translate("+(A(v(xt,st))-rt/V[0].values.length*.45)+",0)"}).on("mouseover",function(xt,st){b&&(d3.select(this).classed("hover",!0),H.elementMouseover({data:xt,index:st,color:d3.select(this).style("fill")}))}).on("mouseout",function(xt,st){b&&(d3.select(this).classed("hover",!1),H.elementMouseout({data:xt,index:st,color:d3.select(this).style("fill")}))}).on("mousemove",function(xt,st){b&&H.elementMousemove({data:xt,index:st,color:d3.select(this).style("fill")})}).on("click",function(xt,st){b&&(H.elementClick({data:xt,index:st,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}).on("dblclick",function(xt,st){b&&(H.elementDblClick({data:xt,index:st,color:d3.select(this).style("fill")}),d3.event.stopPropagation())}),pt.attr("fill",function(xt,st){return P(xt,st)}).attr("class",function(xt,st,R){return(y(xt,st)<0?"nv-bar negative":"nv-bar positive")+" nv-bar-"+R+"-"+st}).watchTransition(W,"bars").attr("transform",function(xt,st){return"translate("+(A(v(xt,st))-rt/V[0].values.length*.45)+",0)"}).attr("width",rt/V[0].values.length*.9),pt.watchTransition(W,"bars").attr("y",function(xt,st){var R=y(xt,st)<0?d(0):d(0)-d(y(xt,st))<1?d(0)-1:d(y(xt,st));return i.utils.NaNtoZero(R)}).attr("height",function(xt,st){return i.utils.NaNtoZero(Math.max(Math.abs(d(y(xt,st))-d(0)),1))})}),W.renderEnd("historicalBar immediate"),O}return O.highlightPoint=function(K,V){F.select(".nv-bars .nv-bar-0-"+K).classed("hover",V)},O.clearHighlights=function(){F.select(".nv-bars .nv-bar.hover").classed("hover",!1)},O.dispatch=H,O.options=i.utils.optionsFunc.bind(O),O._options=Object.create({},{width:{get:function(){return m},set:function(K){m=K}},height:{get:function(){return E},set:function(K){E=K}},forceX:{get:function(){return w},set:function(K){w=K}},forceY:{get:function(){return T},set:function(K){T=K}},padData:{get:function(){return j},set:function(K){j=K}},x:{get:function(){return v},set:function(K){v=K}},y:{get:function(){return y},set:function(K){y=K}},xScale:{get:function(){return A},set:function(K){A=K}},yScale:{get:function(){return d},set:function(K){d=K}},xDomain:{get:function(){return tt},set:function(K){tt=K}},yDomain:{get:function(){return N},set:function(K){N=K}},xRange:{get:function(){return I},set:function(K){I=K}},yRange:{get:function(){return q},set:function(K){q=K}},clipEdge:{get:function(){return G},set:function(K){G=K}},id:{get:function(){return x},set:function(K){x=K}},interactive:{get:function(){return b},set:function(K){b=K}},margin:{get:function(){return u},set:function(K){u.top=K.top!==void 0?K.top:u.top,u.right=K.right!==void 0?K.right:u.right,u.bottom=K.bottom!==void 0?K.bottom:u.bottom,u.left=K.left!==void 0?K.left:u.left}},color:{get:function(){return P},set:function(K){P=i.utils.getColor(K)}}}),i.utils.initOptions(O),O},i.models.historicalBarChart=function(u){var m=u||i.models.historicalBar(),E=i.models.axis(),x=i.models.axis(),F=i.models.legend(),A=i.interactiveGuideline(),d=i.models.tooltip(),v={top:30,right:90,bottom:50,left:90},y=i.utils.defaultColor(),w=null,T=null,j=!1,G=!0,P=!0,tt=!1,N=!1,I,q,H={},b=null,W=null,O=d3.dispatch("tooltipHide","stateChange","changeState","renderEnd"),K=250;E.orient("bottom").tickPadding(7),x.orient(tt?"right":"left"),d.duration(0).headerEnabled(!1).valueFormatter(function(p,z){return x.tickFormat()(p,z)}).headerFormatter(function(p,z){return E.tickFormat()(p,z)});var V=i.utils.renderWatch(O,0);function rt(p){return p.each(function(z){V.reset(),V.models(m),G&&V.models(E),P&&V.models(x);var et=d3.select(this),S=this;i.utils.initSVG(et);var M=i.utils.availableWidth(w,et,v),nt=i.utils.availableHeight(T,et,v);if(rt.update=function(){et.transition().duration(K).call(rt)},rt.container=this,H.disabled=z.map(function(g){return!!g.disabled}),!b){var pt;b={};for(pt in H)H[pt]instanceof Array?b[pt]=H[pt].slice(0):b[pt]=H[pt]}if(!z||!z.length||!z.filter(function(g){return g.values.length}).length)return i.utils.noData(rt,et),rt;et.selectAll(".nv-noData").remove(),I=m.xScale(),q=m.yScale();var xt=et.selectAll("g.nv-wrap.nv-historicalBarChart").data([z]),st=xt.enter().append("g").attr("class","nvd3 nv-wrap nv-historicalBarChart").append("g"),R=xt.select("g");st.append("g").attr("class","nv-x nv-axis"),st.append("g").attr("class","nv-y nv-axis"),st.append("g").attr("class","nv-barsWrap"),st.append("g").attr("class","nv-legendWrap"),st.append("g").attr("class","nv-interactive"),j?(F.width(M),R.select(".nv-legendWrap").datum(z).call(F),v.top!=F.height()&&(v.top=F.height(),nt=i.utils.availableHeight(T,et,v)),xt.select(".nv-legendWrap").attr("transform","translate(0,"+-v.top+")")):R.select(".nv-legendWrap").selectAll("*").remove(),xt.attr("transform","translate("+v.left+","+v.top+")"),tt&&R.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),N&&(A.width(M).height(nt).margin({left:v.left,top:v.top}).svgContainer(et).xScale(I),xt.select(".nv-interactive").call(A)),m.width(M).height(nt).color(z.map(function(g,B){return g.color||y(g,B)}).filter(function(g,B){return!z[B].disabled}));var L=R.select(".nv-barsWrap").datum(z.filter(function(g){return!g.disabled}));L.transition().call(m),G&&(E.scale(I)._ticks(i.utils.calcTicksX(M/100,z)).tickSize(-nt,0),R.select(".nv-x.nv-axis").attr("transform","translate(0,"+q.range()[0]+")"),R.select(".nv-x.nv-axis").transition().call(E)),P&&(x.scale(q)._ticks(i.utils.calcTicksY(nt/36,z)).tickSize(-M,0),R.select(".nv-y.nv-axis").transition().call(x)),A.dispatch.on("elementMousemove",function(g){m.clearHighlights();var B,J,ot,ht=[];z.filter(function(at,yt){return at.seriesIndex=yt,!at.disabled}).forEach(function(at,yt){J=i.interactiveBisect(at.values,g.pointXValue,rt.x()),m.highlightPoint(J,!0);var D=at.values[J];D!==void 0&&(B===void 0&&(B=D),ot===void 0&&(ot=rt.xScale()(rt.x()(D,J))),ht.push({key:at.key,value:rt.y()(D,J),color:y(at,at.seriesIndex),data:at.values[J]}))});var vt=E.tickFormat()(rt.x()(B,J));A.tooltip.chartContainer(S.parentNode).valueFormatter(function(at,yt){return x.tickFormat()(at)}).data({value:vt,index:J,series:ht})(),A.renderGuideLine(ot)}),A.dispatch.on("elementMouseout",function(g){O.tooltipHide(),m.clearHighlights()}),F.dispatch.on("legendClick",function(g,B){g.disabled=!g.disabled,z.filter(function(J){return!J.disabled}).length||z.map(function(J){return J.disabled=!1,xt.selectAll(".nv-series").classed("disabled",!1),J}),H.disabled=z.map(function(J){return!!J.disabled}),O.stateChange(H),p.transition().call(rt)}
25),F.dispatch.on("legendDblclick",function(g){z.forEach(function(B){B.disabled=!0}),g.disabled=!1,H.disabled=z.map(function(B){return!!B.disabled}),O.stateChange(H),rt.update()}),O.on("changeState",function(g){typeof g.disabled<"u"&&(z.forEach(function(B,J){B.disabled=g.disabled[J]}),H.disabled=g.disabled),rt.update()})}),V.renderEnd("historicalBarChart immediate"),rt}return m.dispatch.on("elementMouseover.tooltip",function(p){p.series={key:rt.x()(p.data),value:rt.y()(p.data),color:p.color},d.data(p).hidden(!1)}),m.dispatch.on("elementMouseout.tooltip",function(p){d.hidden(!0)}),m.dispatch.on("elementMousemove.tooltip",function(p){d()}),rt.dispatch=O,rt.bars=m,rt.legend=F,rt.xAxis=E,rt.yAxis=x,rt.interactiveLayer=A,rt.tooltip=d,rt.options=i.utils.optionsFunc.bind(rt),rt._options=Object.create({},{width:{get:function(){return w},set:function(p){w=p}},height:{get:function(){return T},set:function(p){T=p}},showLegend:{get:function(){return j},set:function(p){j=p}},showXAxis:{get:function(){return G},set:function(p){G=p}},showYAxis:{get:function(){return P},set:function(p){P=p}},defaultState:{get:function(){return b},set:function(p){b=p}},noData:{get:function(){return W},set:function(p){W=p}},margin:{get:function(){return v},set:function(p){v.top=p.top!==void 0?p.top:v.top,v.right=p.right!==void 0?p.right:v.right,v.bottom=p.bottom!==void 0?p.bottom:v.bottom,v.left=p.left!==void 0?p.left:v.left}},color:{get:function(){return y},set:function(p){y=i.utils.getColor(p),F.color(y),m.color(y)}},duration:{get:function(){return K},set:function(p){K=p,V.reset(K),x.duration(K),E.duration(K)}},rightAlignYAxis:{get:function(){return tt},set:function(p){tt=p,x.orient(p?"right":"left")}},useInteractiveGuideline:{get:function(){return N},set:function(p){N=p,p===!0&&rt.interactive(!1)}}}),i.utils.inheritOptions(rt,m),i.utils.initOptions(rt),rt},i.models.ohlcBarChart=function(){var u=i.models.historicalBarChart(i.models.ohlcBar());return u.useInteractiveGuideline(!0),u.interactiveLayer.tooltip.contentGenerator(function(m){var E=m.series[0].data,x=E.open<E.close?"2ca02c":"d62728";return'<h3 style="color: #'+x+'">'+m.value+"</h3><table><tr><td>open:</td><td>"+u.yAxis.tickFormat()(E.open)+"</td></tr><tr><td>close:</td><td>"+u.yAxis.tickFormat()(E.close)+"</td></tr><tr><td>high</td><td>"+u.yAxis.tickFormat()(E.high)+"</td></tr><tr><td>low:</td><td>"+u.yAxis.tickFormat()(E.low)+"</td></tr></table>"}),u},i.models.candlestickBarChart=function(){var u=i.models.historicalBarChart(i.models.candlestickBar());return u.useInteractiveGuideline(!0),u.interactiveLayer.tooltip.contentGenerator(function(m){var E=m.series[0].data,x=E.open<E.close?"2ca02c":"d62728";return'<h3 style="color: #'+x+'">'+m.value+"</h3><table><tr><td>open:</td><td>"+u.yAxis.tickFormat()(E.open)+"</td></tr><tr><td>close:</td><td>"+u.yAxis.tickFormat()(E.close)+"</td></tr><tr><td>high</td><td>"+u.yAxis.tickFormat()(E.high)+"</td></tr><tr><td>low:</td><td>"+u.yAxis.tickFormat()(E.low)+"</td></tr></table>"}),u},i.models.legend=function(){var u={top:5,right:0,bottom:5,left:0},m=400,E=20,x=function(N){return N.key},F=i.utils.getColor(),A=20,d=!0,v=32,y=!0,w=!0,T=!1,j=!1,G=d3.dispatch("legendClick","legendDblclick","legendMouseover","legendMouseout","stateChange"),P="classic";function tt(N){N.each(function(b){var W=m-u.left-u.right,O=d3.select(this);i.utils.initSVG(O);var K=O.selectAll("g.nv-legend").data([b]),V=K.enter().append("g").attr("class","nvd3 nv-legend").append("g"),rt=K.select("g");K.attr("transform","translate("+u.left+","+u.top+")");var p=rt.selectAll(".nv-series").data(function(D){return P!="furious"?D:D.filter(function(dt){return j?!0:!dt.disengaged})}),z=p.enter().append("g").attr("class","nv-series"),et,S;switch(P){case"furious":S=23;break;case"classic":S=20}if(P=="classic")z.append("circle").style("stroke-width",2).attr("class","nv-legend-symbol").attr("r",5),et=p.select(".nv-legend-symbol");else if(P=="furious"){z.append("rect").style("stroke-width",2).attr("class","nv-legend-symbol").attr("rx",3).attr("ry",3),et=p.select(".nv-legend-symbol"),z.append("g").attr("class","nv-check-box").property("innerHTML",'<path d="M0.5,5 L22.5,5 L22.5,26.5 L0.5,26.5 L0.5,5 Z" class="nv-box"></path><path d="M5.5,12.8618467 L11.9185089,19.2803556 L31,0.198864511" class="nv-check"></path>').attr("transform","translate(-10,-8)scale(0.5)");var M=p.select(".nv-check-box");M.each(function(D,dt){d3.select(this).selectAll("path").attr("stroke",I(D,dt))})}z.append("text").attr("text-anchor","start").attr("class","nv-legend-text").attr("dy",".32em").attr("dx","8");var nt=p.select("text.nv-legend-text");p.on("mouseover",function(D,dt){G.legendMouseover(D,dt)}).on("mouseout",function(D,dt){G.legendMouseout(D,dt)}).on("click",function(D,dt){G.legendClick(D,dt);var gt=p.data();if(w){if(P=="classic")T?(gt.forEach(function(kt){kt.disabled=!0}),D.disabled=!1):(D.disabled=!D.disabled,gt.every(function(kt){return kt.disabled})&>.forEach(function(kt){kt.disabled=!1}));else if(P=="furious"){if(j)D.disengaged=!D.disengaged,D.userDisabled=D.userDisabled==null?!!D.disabled:D.userDisabled,D.disabled=D.disengaged||D.userDisabled;else if(!j){D.disabled=!D.disabled,D.userDisabled=D.disabled;var Q=gt.filter(function(kt){return!kt.disengaged});Q.every(function(kt){return kt.userDisabled})&>.forEach(function(kt){kt.disabled=kt.userDisabled=!1})}}G.stateChange({disabled:gt.map(function(kt){return!!kt.disabled}),disengaged:gt.map(function(kt){return!!kt.disengaged})})}}).on("dblclick",function(D,dt){if(!(P=="furious"&&j)&&(G.legendDblclick(D,dt),w)){var gt=p.data();
25gt.forEach(function(Q){Q.disabled=!0,P=="furious"&&(Q.userDisabled=Q.disabled)}),D.disabled=!1,P=="furious"&&(D.userDisabled=D.disabled),G.stateChange({disabled:gt.map(function(Q){return!!Q.disabled})})}}),p.classed("nv-disabled",function(D){return D.userDisabled}),p.exit().remove(),nt.attr("fill",I).text(x);var pt=0;if(d){var xt=[];p.each(function(D,dt){var gt;if(x(D)&&x(D).length>A){var Q=x(D).substring(0,A);gt=d3.select(this).select("text").text(Q+"..."),d3.select(this).append("svg:title").text(x(D))}else gt=d3.select(this).select("text");var kt;try{if(kt=gt.node().getComputedTextLength(),kt<=0)throw Error()}catch{kt=i.utils.calcApproxTextWidth(gt)}xt.push(kt+v)});var st=0,R=[];for(pt=0;pt<W&&st<xt.length;)R[st]=xt[st],pt+=xt[st++];for(st===0&&(st=1);pt>W&&st>1;){R=[],st--;for(var L=0;L<xt.length;L++)xt[L]>(R[L%st]||0)&&(R[L%st]=xt[L]);pt=R.reduce(function(D,dt,gt,Q){return D+dt})}for(var g=[],B=0,J=0;B<st;B++)g[B]=J,J+=R[B];p.attr("transform",function(D,dt){return"translate("+g[dt%st]+","+(5+Math.floor(dt/st)*S)+")"}),y?rt.attr("transform","translate("+(m-u.right-pt)+","+u.top+")"):rt.attr("transform","translate(0,"+u.top+")"),E=u.top+u.bottom+Math.ceil(xt.length/st)*S}else{var ot=5,ht=5,vt=0,at;p.attr("transform",function(D,dt){var gt=d3.select(this).select("text").node().getComputedTextLength()+v;return at=ht,m<u.left+u.right+at+gt&&(ht=at=5,ot+=S),ht+=gt,ht>vt&&(vt=ht),pt<at+vt&&(pt=at+vt),"translate("+at+","+ot+")"}),rt.attr("transform","translate("+(m-u.right-vt)+","+u.top+")"),E=u.top+u.bottom+ot+15}if(P=="furious"){et.attr("width",function(D,dt){return nt[0][dt].getComputedTextLength()+27}).attr("height",18).attr("y",-9).attr("x",-15),V.insert("rect",":first-child").attr("class","nv-legend-bg").attr("fill","#eee").attr("opacity",0);var yt=rt.select(".nv-legend-bg");yt.transition().duration(300).attr("x",-S).attr("width",pt+S-12).attr("height",E+10).attr("y",-u.top-10).attr("opacity",j?1:0)}et.style("fill",q).style("fill-opacity",H).style("stroke",q)});function I(b,W){if(P!="furious")return"#000";if(j)return b.disengaged?"#000":"#fff";if(!j)return b.color||(b.color=F(b,W)),b.disabled?b.color:"#fff"}function q(b,W){return j&&P=="furious"&&b.disengaged?"#eee":b.color||F(b,W)}function H(b,W){return j&&P=="furious"?1:b.disabled?0:1}return tt}return tt.dispatch=G,tt.options=i.utils.optionsFunc.bind(tt),tt._options=Object.create({},{width:{get:function(){return m},set:function(N){m=N}},height:{get:function(){return E},set:function(N){E=N}},key:{get:function(){return x},set:function(N){x=N}},align:{get:function(){return d},set:function(N){d=N}},maxKeyLength:{get:function(){return A},set:function(N){A=N}},rightAlign:{get:function(){return y},set:function(N){y=N}},padding:{get:function(){return v},set:function(N){v=N}},updateState:{get:function(){return w},set:function(N){w=N}},radioButtonMode:{get:function(){return T},set:function(N){T=N}},expanded:{get:function(){return j},set:function(N){j=N}},vers:{get:function(){return P},set:function(N){P=N}},margin:{get:function(){return u},set:function(N){u.top=N.top!==void 0?N.top:u.top,u.right=N.right!==void 0?N.right:u.right,u.bottom=N.bottom!==void 0?N.bottom:u.bottom,u.left=N.left!==void 0?N.left:u.left}},color:{get:function(){return F},set:function(N){F=i.utils.getColor(N)}}}),i.utils.initOptions(tt),tt},i.models.line=function(){var u=i.models.scatter(),m={top:0,right:0,bottom:0,left:0},E=960,x=500,F=null,A=1.5,d=i.utils.defaultColor(),v=function(O){return O.x},y=function(O){return O.y},w=function(O,K){return!isNaN(y(O,K))&&y(O,K)!==null},T=function(O){return O.area},j=!1,G,P,tt="linear",N=250,I=d3.dispatch("elementClick","elementMouseover","elementMouseout","renderEnd");u.pointSize(16).pointDomain([16,256]);var q,H,b=i.utils.renderWatch(I,N);function W(O){return b.reset(),b.models(u),O.each(function(K){F=d3.select(this);var V=i.utils.availableWidth(E,F,m),rt=i.utils.availableHeight(x,F,m);i.utils.initSVG(F),G=u.xScale(),P=u.yScale(),q=q||G,H=H||P;var p=F.selectAll("g.nv-wrap.nv-line").data([K]),z=p.enter().append("g").attr("class","nvd3 nv-wrap nv-line"),et=z.append("defs"),S=z.append("g"),M=p.select("g");S.append("g").attr("class","nv-groups"),S.append("g").attr("class","nv-scatterWrap"),p.attr("transform","translate("+m.left+","+m.top+")"),u.width(V).height(rt);var nt=p.select(".nv-scatterWrap");nt.call(u),et.append("clipPath").attr("id","nv-edge-clip-"+u.id()).append("rect"),p.select("#nv-edge-clip-"+u.id()+" rect").attr("width",V).attr("height",rt>0?rt:0),M.attr("clip-path",j?"url(#nv-edge-clip-"+u.id()+")":""),nt.attr("clip-path",j?"url(#nv-edge-clip-"+u.id()+")":"");var pt=p.select(".nv-groups").selectAll(".nv-group").data(function(R){return R},function(R){return R.key});pt.enter().append("g").style("stroke-opacity",1e-6).style("stroke-width",function(R){return R.strokeWidth||A}).style("fill-opacity",1e-6),pt.exit().remove(),pt.attr("class",function(R,L){return(R.classed||"")+" nv-group nv-series-"+L}).classed("hover",function(R){return R.hover}).style("fill",function(R,L){return d(R,L)}).style("stroke",function(R,L){return d(R,L)}),pt.watchTransition(b,"line: groups").style("stroke-opacity",1).style("fill-opacity",function(R){return R.fillOpacity||.5});var xt=pt.selectAll("path.nv-area").data(function(R){return T(R)?[R]:[]});xt.enter().append("path").attr("class","nv-area").attr("d",function(R){return d3.svg.area().interpolate(tt).defined(w).x(function(L,g){return i.utils.NaNtoZero(q(v(L,g)))}).y0(function(L,g){return i.utils.NaNtoZero(H(y(L,g)))}).y1(function(L,g){return H(P.domain()[0]<=0?P.domain()[1]>=0?0:P.domain()[1]:P.domain()[0])}).apply(this,[R.values])}),pt.exit().selectAll("path.nv-area").remove(),xt.watchTransition(b,"line: areaPaths").attr("d",function(R){return d3.svg.area().interpolate(tt).defined(w).x(function(L,g){return i.utils.NaNtoZero(G(v(L,g)))}).y0(function(L,g){return i.utils.NaNtoZero(P(y(L,g)))}).y1(function(L,g){return P(P.domain()[0]<=0?P.domain()[1]>=0?0:P.domain()[1]:P.domain()[0])}).apply(this,[R.values])});var st=pt.selectAll("path.nv-line").data(function(R){return[R.values]});st.enter().append("path").attr("class","nv-line").attr("d",d3.svg.line().interpolate(tt).defined(w).x(function(R,L){return i.utils.NaNtoZero(q(v(R,L)))}).y(function(R,L){return i.utils.NaNtoZero(H(y(R,L)))})),st.watchTransition(b,"line: linePaths").attr("d",d3.svg.line().interpolate(tt).defined(w).x(function(R,L){return i.utils.NaNtoZero(G(v(R,L)))}).y(function(R,L){return i.utils.NaNtoZero(P(y(R,L)))})),q=G.copy(),H=P.copy()}),b.renderEnd("line immediate"),W}return W.dispatch=I,W.scatter=u,u.dispatch.on("elementClick",function(){I.elementClick.apply(this,arguments)}),u.dispatch.on("elementMouseover",function(){I.elementMouseover.apply(this,arguments)}),u.dispatch.on("elementMouseout",function(){I.elementMouseout.apply(this,arguments)}),W.options=i.utils.optionsFunc.bind(W),W._options=Object.create({},{width:{get:function(){return E},set:function(O){E=O}},height:{get:function(){return x},set:function(O){x=O}},defined:{get:function(){return w},set:function(O){w=O}},interpolate:{get:function(){return tt},set:function(O){tt=O}},clipEdge:{get:function(){return j},set:function(O){j=O}},margin:{get:function(){return m},set:function(O){m.top=O.top!==void 0?O.top:m.top,m.right=O.right!==void 0?O.right:m.right,m.bottom=O.bottom!==void 0?O.bottom:m.bottom,m.left=O.left!==void 0?O.left:m.left}},duration:{get:function(){return N},set:function(O){N=O,b.reset(N),u.duration(N)}},isArea:{get:function(){return T},set:function(O){T=d3.functor(O)}},x:{get:function(){return v},set:function(O){v=O,u.x(O)}},y:{get:function(){return y},set:function(O){y=O,u.y(O)}},color:{get:function(){return d}
25,set:function(O){d=i.utils.getColor(O),u.color(d)}}}),i.utils.inheritOptions(W,u),i.utils.initOptions(W),W},i.models.lineChart=function(){var u=i.models.line(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend(),F=i.interactiveGuideline(),A=i.models.tooltip(),d=i.models.line(),v=i.models.axis(),y=i.models.axis(),w=d3.svg.brush(),T={top:30,right:20,bottom:50,left:60},j={top:0,right:20,bottom:20,left:60},G=i.utils.defaultColor(),P=null,tt=null,N=!0,I="top",q=!0,H=!0,b=!1,W=!1,O,K,V,rt,p=!1,z=!1,et=!0,S=50,M=null,nt=i.utils.state(),pt=null,xt=null,st=d3.dispatch("tooltipShow","tooltipHide","brush","stateChange","changeState","renderEnd"),R=250;m.orient("bottom").tickPadding(7),E.orient(b?"right":"left"),u.clipEdge(!0).duration(0),d.interactive(!1),d.pointActive(function(ot){return!1}),v.orient("bottom").tickPadding(5),y.orient(b?"right":"left"),A.valueFormatter(function(ot,ht){return E.tickFormat()(ot,ht)}).headerFormatter(function(ot,ht){return m.tickFormat()(ot,ht)}),F.tooltip.valueFormatter(function(ot,ht){return E.tickFormat()(ot,ht)}).headerFormatter(function(ot,ht){return m.tickFormat()(ot,ht)});var L=i.utils.renderWatch(st,R),g=function(ot){return function(){return{active:ot.map(function(ht){return!ht.disabled})}}},B=function(ot){return function(ht){ht.active!==void 0&&ot.forEach(function(vt,at){vt.disabled=!ht.active[at]})}};function J(ot){return L.reset(),L.models(u),L.models(d),q&&L.models(m),H&&L.models(E),et&&L.models(v),z&&L.models(y),ot.each(function(ht){var vt=d3.select(this);i.utils.initSVG(vt);var at=i.utils.availableWidth(P,vt,T),yt=i.utils.availableHeight(tt,vt,T)-(p?S:0),D=S-j.top-j.bottom;if(J.update=function(){R===0?vt.call(J):vt.transition().duration(R).call(J)},J.container=this,nt.setter(B(ht),J.update).getter(g(ht)).update(),nt.disabled=ht.map(function(jt){return!!jt.disabled}),!pt){var dt;pt={};for(dt in nt)nt[dt]instanceof Array?pt[dt]=nt[dt].slice(0):pt[dt]=nt[dt]}if(!ht||!ht.length||!ht.filter(function(jt){return jt.values.length}).length)return i.utils.noData(J,vt),J;vt.selectAll(".nv-noData").remove(),O=u.xScale(),K=u.yScale(),V=d.xScale(),rt=d.yScale();var gt=vt.selectAll("g.nv-wrap.nv-lineChart").data([ht]),Q=gt.enter().append("g").attr("class","nvd3 nv-wrap nv-lineChart").append("g"),kt=gt.select("g");Q.append("g").attr("class","nv-legendWrap");var Rt=Q.append("g").attr("class","nv-focus");Rt.append("g").attr("class","nv-background").append("rect"),Rt.append("g").attr("class","nv-x nv-axis"),Rt.append("g").attr("class","nv-y nv-axis"),Rt.append("g").attr("class","nv-linesWrap"),Rt.append("g").attr("class","nv-interactive");var Ut=Q.append("g").attr("class","nv-context");Ut.append("g").attr("class","nv-background").append("rect"),Ut.append("g").attr("class","nv-x nv-axis"),Ut.append("g").attr("class","nv-y nv-axis"),Ut.append("g").attr("class","nv-linesWrap"),Ut.append("g").attr("class","nv-brushBackground"),Ut.append("g").attr("class","nv-x nv-brush"),N?(x.width(at),kt.select(".nv-legendWrap").datum(ht).call(x),I==="bottom"?gt.select(".nv-legendWrap").attr("transform","translate(0,"+yt+")"):I==="top"&&(T.top!=x.height()&&(T.top=x.height(),yt=i.utils.availableHeight(tt,vt,T)-(p?S:0)),gt.select(".nv-legendWrap").attr("transform","translate(0,"+-T.top+")"))):kt.select(".nv-legendWrap").selectAll("*").remove(),gt.attr("transform","translate("+T.left+","+T.top+")"),b&&kt.select(".nv-y.nv-axis").attr("transform","translate("+at+",0)"),W&&(F.width(at).height(yt).margin({left:T.left,top:T.top}).svgContainer(vt).xScale(O),gt.select(".nv-interactive").call(F)),kt.select(".nv-focus .nv-background rect").attr("width",at).attr("height",yt),u.width(at).height(yt).color(ht.map(function(jt,Nt){return jt.color||G(jt,Nt)}).filter(function(jt,Nt){return!ht[Nt].disabled}));var Jt=kt.select(".nv-linesWrap").datum(ht.filter(function(jt){return!jt.disabled}));q&&m.scale(O)._ticks(i.utils.calcTicksX(at/100,ht)).tickSize(-yt,0),H&&E.scale(K)._ticks(i.utils.calcTicksY(yt/36,ht)).tickSize(-at,0);function zt(){q&&kt.select(".nv-focus .nv-x.nv-axis").transition().duration(R).call(m)}function Ht(){H&&kt.select(".nv-focus .nv-y.nv-axis").transition().duration(R).call(E)}if(kt.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+yt+")"),!p)Jt.call(u),zt(),Ht();else{d.defined(u.defined()).width(at).height(D).color(ht.map(function(jt,Nt){return jt.color||G(jt,Nt)}).filter(function(jt,Nt){return!ht[Nt].disabled})),kt.select(".nv-context").attr("transform","translate(0,"+(yt+T.bottom+j.top)+")").style("display",p?"initial":"none");var oe=kt.select(".nv-context .nv-linesWrap").datum(ht.filter(function(jt){return!jt.disabled}));d3.transition(oe).call(d),w.x(V).on("brush",function(){qt()}),M&&w.extent(M);
25var se=kt.select(".nv-brushBackground").selectAll("g").data([M||w.extent()]),pe=se.enter().append("g");pe.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",D),pe.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",D);var mt=kt.select(".nv-x.nv-brush").call(w);mt.selectAll("rect").attr("height",D),mt.selectAll(".resize").append("path").attr("d",Dt),qt(),kt.select(".nv-context .nv-background rect").attr("width",at).attr("height",D),et&&(v.scale(V)._ticks(i.utils.calcTicksX(at/100,ht)).tickSize(-D,0),kt.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+rt.range()[0]+")"),d3.transition(kt.select(".nv-context .nv-x.nv-axis")).call(v)),z&&(y.scale(rt)._ticks(i.utils.calcTicksY(D/36,ht)).tickSize(-at,0),d3.transition(kt.select(".nv-context .nv-y.nv-axis")).call(y)),kt.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+rt.range()[0]+")")}x.dispatch.on("stateChange",function(jt){for(var Nt in jt)nt[Nt]=jt[Nt];st.stateChange(nt),J.update()}),F.dispatch.on("elementMousemove",function(jt){u.clearHighlights();var Nt,Zt,Et,ae=[];if(ht.filter(function(lt,At){return lt.seriesIndex=At,!lt.disabled&&!lt.disableTooltip}).forEach(function(lt,At){var Ct=p?w.empty()?V.domain():w.extent():O.domain(),Ft=lt.values.filter(function(xe,Tt){return u.x()(xe,Tt)>=Ct[0]&&u.x()(xe,Tt)<=Ct[1]});Zt=i.interactiveBisect(Ft,jt.pointXValue,u.x());var ie=Ft[Zt],fe=J.y()(ie,Zt);fe!==null&&u.highlightPoint(lt.seriesIndex,Zt,!0),ie!==void 0&&(Nt===void 0&&(Nt=ie),Et===void 0&&(Et=J.xScale()(J.x()(ie,Zt))),ae.push({key:lt.key,value:fe,color:G(lt,lt.seriesIndex),data:ie}))}),ae.length>2){var de=J.yScale().invert(jt.mouseY),ke=Math.abs(J.yScale().domain()[0]-J.yScale().domain()[1]),Ae=.03*ke,Pt=i.nearestValueIndex(ae.map(function(lt){return lt.value}),de,Ae);Pt!==null&&(ae[Pt].highlight=!0)}var Xt=function(lt,At){return lt==null?"N/A":E.tickFormat()(lt)};F.tooltip.chartContainer(J.container.parentNode).valueFormatter(F.tooltip.valueFormatter()||Xt).data({value:J.x()(Nt,Zt),index:Zt,series:ae})(),F.renderGuideLine(Et)}),F.dispatch.on("elementClick",function(jt){var Nt,Zt=[];ht.filter(function(Et,ae){return Et.seriesIndex=ae,!Et.disabled}).forEach(function(Et){var ae=i.interactiveBisect(Et.values,jt.pointXValue,J.x()),de=Et.values[ae];if(!(typeof de>"u")){typeof Nt>"u"&&(Nt=J.xScale()(J.x()(de,ae)));var ke=J.yScale()(J.y()(de,ae));Zt.push({point:de,pointIndex:ae,pos:[Nt,ke],seriesIndex:Et.seriesIndex,series:Et})}}),u.dispatch.elementClick(Zt)}),F.dispatch.on("elementMouseout",function(jt){u.clearHighlights()}),st.on("changeState",function(jt){typeof jt.disabled<"u"&&ht.length===jt.disabled.length&&(ht.forEach(function(Nt,Zt){Nt.disabled=jt.disabled[Zt]}),nt.disabled=jt.disabled),J.update()});function Dt(jt){var Nt=+(jt=="e"),Zt=Nt?1:-1,Et=D/3;return"M"+.5*Zt+","+Et+"A6,6 0 0 "+Nt+" "+6.5*Zt+","+(Et+6)+"V"+(2*Et-6)+"A6,6 0 0 "+Nt+" "+.5*Zt+","+2*Et+"ZM"+2.5*Zt+","+(Et+8)+"V"+(2*Et-8)+"M"+4.5*Zt+","+(Et+8)+"V"+(2*Et-8)}function Kt(){w.empty()||w.extent(M),se.data([w.empty()?V.domain():M]).each(function(jt,Nt){var Zt=V(jt[0])-O.range()[0],Et=at-V(jt[1]);d3.select(this).select(".left").attr("width",Zt<0?0:Zt),d3.select(this).select(".right").attr("x",V(jt[1])).attr("width",Et<0?0:Et)})}function qt(){M=w.empty()?null:w.extent();var jt=w.empty()?V.domain():w.extent();if(!(Math.abs(jt[0]-jt[1])<=1)){st.brush({extent:jt,brush:w}),Kt();var Nt=kt.select(".nv-focus .nv-linesWrap").datum(ht.filter(function(Zt){return!Zt.disabled}).map(function(Zt,Et){return{key:Zt.key,area:Zt.area,classed:Zt.classed,values:Zt.values.filter(function(ae,de){return u.x()(ae,de)>=jt[0]&&u.x()(ae,de)<=jt[1]}),disableTooltip:Zt.disableTooltip}}));Nt.transition().duration(R).call(u),zt(),Ht()}}}),L.renderEnd("lineChart immediate"),J}return u.dispatch.on("elementMouseover.tooltip",function(ot){ot.series.disableTooltip||A.data(ot).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(ot){A.hidden(!0)}),J.dispatch=st,J.lines=u,J.lines2=d,J.legend=x,J.xAxis=m,J.x2Axis=v,J.yAxis=E,J.y2Axis=y,J.interactiveLayer=F,J.tooltip=A,J.state=nt,J.dispatch=st,J.options=i.utils.optionsFunc.bind(J),J._options=Object.create({},{width:{get:function(){return P},set:function(ot){P=ot}},height:{get:function(){return tt},set:function(ot){tt=ot}},showLegend:{get:function(){return N},set:function(ot){N=ot}},legendPosition:{get:function(){return I},set:function(ot){I=ot}},showXAxis:{get:function(){return q},set:function(ot){q=ot}},showYAxis:{get:function(){return H},set:function(ot){H=ot}},focusEnable:{get:function(){return p},set:function(ot){p=ot}},focusHeight:{get:function(){return height2},set:function(ot){S=ot}},focusShowAxisX:{get:function(){return et},set:function(ot){et=ot}},focusShowAxisY:{get:function(){return z},set:function(ot){z=ot}},brushExtent:{get:function(){return M},set:function(ot){M=ot}},defaultState:{get:function(){return pt},set:function(ot){pt=ot}},noData:{get:function(){return xt},set:function(ot){xt=ot}},margin:{get:function(){return T}
vendor: 4,856 bytes, line 25
25,set:function(ot){T.top=ot.top!==void 0?ot.top:T.top,T.right=ot.right!==void 0?ot.right:T.right,T.bottom=ot.bottom!==void 0?ot.bottom:T.bottom,T.left=ot.left!==void 0?ot.left:T.left}},duration:{get:function(){return R},set:function(ot){R=ot,L.reset(R),u.duration(R),m.duration(R),v.duration(R),E.duration(R),y.duration(R)}},focusMargin:{get:function(){return j},set:function(ot){j.top=ot.top!==void 0?ot.top:j.top,j.right=ot.right!==void 0?ot.right:j.right,j.bottom=ot.bottom!==void 0?ot.bottom:j.bottom,j.left=ot.left!==void 0?ot.left:j.left}},color:{get:function(){return G},set:function(ot){G=i.utils.getColor(ot),x.color(G),u.color(G)}},interpolate:{get:function(){return u.interpolate()},set:function(ot){u.interpolate(ot),d.interpolate(ot)}},xTickFormat:{get:function(){return m.tickFormat()},set:function(ot){m.tickFormat(ot),v.tickFormat(ot)}},yTickFormat:{get:function(){return E.tickFormat()},set:function(ot){E.tickFormat(ot),y.tickFormat(ot)}},x:{get:function(){return u.x()},set:function(ot){u.x(ot),d.x(ot)}},y:{get:function(){return u.y()},set:function(ot){u.y(ot),d.y(ot)}},rightAlignYAxis:{get:function(){return b},set:function(ot){b=ot,E.orient(b?"right":"left")}},useInteractiveGuideline:{get:function(){return W},set:function(ot){W=ot,W&&(u.interactive(!1),u.useVoronoi(!1))}}}),i.utils.inheritOptions(J,u),i.utils.initOptions(J),J},i.models.lineWithFocusChart=function(){return i.models.lineChart().margin({bottom:30}).focusEnable(!0)},i.models.linePlusBarChart=function(){var u=i.models.line(),m=i.models.line(),E=i.models.historicalBar(),x=i.models.historicalBar(),F=i.models.axis(),A=i.models.axis(),d=i.models.axis(),v=i.models.axis(),y=i.models.axis(),w=i.models.axis(),T=i.models.legend(),j=d3.svg.brush(),G=i.models.tooltip(),P={top:30,right:30,bottom:30,left:60},tt={top:0,right:30,bottom:20,left:60},N=null,I=null,q=function(Q){return Q.x},H=function(Q){return Q.y},b=i.utils.defaultColor(),W=!0,O=!0,K=!1,V=!0,rt=50,p,z=null,et,S,M,nt,pt,xt,st=null,R=d3.dispatch("brush","stateChange","changeState"),L=0,g=i.utils.state(),B=null,J=" (left axis)",ot=" (right axis)",ht=!1;u.clipEdge(!0),m.interactive(!1),m.pointActive(function(Q){return!1}),F.orient("bottom").tickPadding(5),d.orient("left"),v.orient("right"),A.orient("bottom").tickPadding(5),y.orient("left"),w.orient("right"),G.headerEnabled(!0).headerFormatter(function(Q,kt){return F.tickFormat()(Q,kt)});var vt=function(){return ht?{main:d,focus:y}:{main:v,focus:w}},at=function(){return ht?{main:v,focus:w}:{main:d,focus:y}},yt=function(Q){return function(){return{active:Q.map(function(kt){return!kt.disabled})}}},D=function(Q){return function(kt){kt.active!==void 0&&Q.forEach(function(Rt,Ut){Rt.disabled=!kt.active[Ut]})}},dt=function(Q){return Q.every(function(kt){return kt.disabled})};function gt(Q){return Q.each(function(kt){var Rt=d3.select(this);i.utils.initSVG(Rt);var Ut=i.utils.availableWidth(N,Rt,P),Jt=i.utils.availableHeight(I,Rt,P)-(O?rt:0),zt=rt-tt.top-tt.bottom;if(gt.update=function(){Rt.transition().duration(L).call(gt)},gt.container=this,g.setter(D(kt),gt.update).getter(yt(kt)).update(),g.disabled=kt.map(function(Ct){return!!Ct.disabled}),!B){var Ht;B={};for(Ht in g)g[Ht]instanceof Array?B[Ht]=g[Ht].slice(0):B[Ht]=g[Ht]}if(!kt||!kt.length||!kt.filter(function(Ct){return Ct.values.length}).length)return i.utils.noData(gt,Rt),gt;Rt.selectAll(".nv-noData").remove();var oe=kt.filter(function(Ct){return!Ct.disabled&&Ct.bar}),se=kt.filter(function(Ct){return!Ct.bar});oe.length&&!ht?et=E.xScale():et=u.xScale(),S=A.scale(),M=ht?u.yScale():E.yScale(),nt=ht?E.yScale():u.yScale(),pt=ht?m.yScale():x.yScale(),xt=ht?x.yScale():m.yScale();var pe=kt.filter(function(Ct){return!Ct.disabled&&(ht?!Ct.bar:Ct.bar)}).map(function(Ct){return Ct.values.map(function(Ft,ie){return{x:q(Ft,ie),y:H(Ft,ie)}})}),mt=kt.filter(function(Ct){return!Ct.disabled&&(ht?Ct.bar:!Ct.bar)}).map(function(Ct){return Ct.values.map(function(Ft,ie){return{x:q(Ft,ie),y:H(Ft,ie)}})});et.range([0,Ut]),S.domain(d3.extent(d3.merge(pe.concat(mt)),function(Ct){return Ct.x})).range([0,Ut]);var Dt=Rt.selectAll("g.nv-wrap.nv-linePlusBar").data([kt]),Kt=Dt.enter().append("g").attr("class","nvd3 nv-wrap nv-linePlusBar").append("g"),qt=Dt.select("g");Kt.append("g").attr("class","nv-legendWrap");var jt=Kt.append("g").attr("class","nv-focus");jt.append("g").attr("class","nv-x nv-axis"),jt.append("g").attr("class","nv-y1 nv-axis"),jt.append("g").attr("class","nv-y2 nv-axis"),jt.append("g").attr("class","nv-barsWrap"),jt.append("g").attr("class","nv-linesWrap");var Nt=Kt.append("g").attr("class","nv-context");if(Nt.append("g").attr("class","nv-x nv-axis"),Nt.append("g").attr("class","nv-y1 nv-axis"),Nt.append("g").attr("class","nv-y2 nv-axis"),Nt.append("g").attr("class","nv-barsWrap"),Nt.append("g").attr("class","nv-linesWrap"),Nt.append("g").attr("class","nv-brushBackgroun
25d"),Nt.append("g").attr("class","nv-x nv-brush"),!W)qt.select(".nv-legendWrap").selectAll("*").remove();else{var Zt=T.align()?Ut/2:Ut,Et=T.align()?Zt:0;T.width(Zt),qt.select(".nv-legendWrap").datum(kt.map(function(Ct){return Ct.originalKey=Ct.originalKey===void 0?Ct.key:Ct.originalKey,ht?Ct.key=Ct.originalKey+(Ct.bar?ot:J):Ct.key=Ct.originalKey+(Ct.bar?J:ot),Ct})).call(T),P.top!=T.height()&&(P.top=T.height(),Jt=i.utils.availableHeight(I,Rt,P)-rt),qt.select(".nv-legendWrap").attr("transform","translate("+Et+","+-P.top+")")}Dt.attr("transform","translate("+P.left+","+P.top+")"),qt.select(".nv-context").style("display",O?"initial":"none"),x.width(Ut).height(zt).color(kt.map(function(Ct,Ft){return Ct.color||b(Ct,Ft)}).filter(function(Ct,Ft){return!kt[Ft].disabled&&kt[Ft].bar})),m.width(Ut).height(zt).color(kt.map(function(Ct,Ft){return Ct.color||b(Ct,Ft)}).filter(function(Ct,Ft){return!kt[Ft].disabled&&!kt[Ft].bar}));var ae=qt.select(".nv-context .nv-barsWrap").datum(oe.length?oe:[{values:[]}]),de=qt.select(".nv-context .nv-linesWrap").datum(dt(se)?[{values:[]}]:se.filter(function(Ct){return!Ct.disabled}));qt.select(".nv-context").attr("transform","translate(0,"+(Jt+P.bottom+tt.top)+")"),ae.transition().call(x),de.transition().call(m),V&&(A._ticks(i.utils.calcTicksX(Ut/100,kt)).tickSize(-zt,0),qt.select(".nv-context .nv-x.nv-axis").attr("transform","translate(0,"+pt.range()[0]+")"),qt.select(".nv-context .nv-x.nv-axis").transition().call(A)),K&&(y.scale(pt)._ticks(zt/36).tickSize(-Ut,0),w.scale(xt)._ticks(zt/36).tickSize(oe.length?0:-Ut,0),qt.select(".nv-context .nv-y3.nv-axis").style("opacity",oe.length?1:0).attr("transform","translate(0,"+S.range()[0]+")"),qt.select(".nv-context .nv-y2.nv-axis").style("opacity",se.length?1:0).attr("transform","translate("+S.range()[1]+",0)"),qt.select(".nv-context .nv-y1.nv-axis").transition().call(y),qt.select(".nv-context .nv-y2.nv-axis").transition().call(w)),j.x(S).on("brush",At),z&&j.extent(z);var ke=qt.select(".nv-brushBackground").selectAll("g").data([z||j.extent()]),Ae=ke.enter().append("g");Ae.append("rect").attr("class","left").attr("x",0).attr("y",0).attr("height",zt),Ae.append("rect").attr("class","right").attr("x",0).attr("y",0).attr("height",zt);var Pt=qt.select(".nv-x.nv-brush").call(j);Pt.selectAll("rect").attr("height",zt),Pt.selectAll(".resize").append("path").attr("d",Xt),T.dispatch.on("stateChange",function(Ct){for(var Ft in Ct)g[Ft]=Ct[Ft];R.stateChange(g),gt.update()}),R.on("changeState",function(Ct){typeof Ct.disabled<"u"&&(kt.forEach(function(Ft,ie){Ft.disabled=Ct.disabled[ie]}),g.disabled=Ct.disabled),gt.update()});function Xt(Ct){var Ft=+(Ct=="e"),ie=Ft?1:-1,fe=zt/3;return"M"+.5*ie+","+fe+"A6,6 0 0 "+Ft+" "+6.5*ie+","+(fe+6)+"V"+(2*fe-6)+"A6,6 0 0 "+Ft+" "+.5*ie+","+2*fe+"ZM"+2.5*ie+","+(fe+8)+"V"+(2*fe-8)+"M"+4.5*ie+","+(fe+8)+"V"+(2*fe-8)}function lt(){j.empty()||j.extent(z),ke.data([j.empty()?S.domain():z]).each(function(Ct,Ft){var ie=S(Ct[0])-S.range()[0],fe=S.range()[1]-S(Ct[1]);d3.select(this).select(".left").attr("width",ie<0?0:ie),d3.select(this).select(".right").attr("x",S(Ct[1])).attr("width",fe<0?0:fe)})}function At(){z=j.empty()?null:j.extent(),p=j.empty()?S.domain():j.extent(),R.brush({extent:p,brush:j}),lt(),E.width(Ut).height(Jt).color(kt.map(function(ve,ee){return ve.color||b(ve,ee)}).filter(function(ve,ee){return!kt[ee].disabled&&kt[ee].bar})),u.width(Ut).height(Jt).color(kt.map(function(ve,ee){return ve.color||b(ve,ee)}).filter(function(ve,ee){return!kt[ee].disabled&&!kt[ee].bar}));var Ct=qt.select(".nv-focus .nv-barsWrap").datum(oe.length?oe.map(function(ve,ee){return{key:ve.key,values:ve.values.filter(function(ge,Ee){return E.x()(ge,Ee)>=p[0]&&E.x()(ge,Ee)<=p[1]})}}):[{values:[]}]),Ft=qt.select(".nv-focus .nv-linesWrap").datum(dt(se)?[{values:[]}]:se.filter(function(ve){return!ve.disabled}).map(function(ve,ee){return{area:ve.area,fillOpacity:ve.fillOpacity,key:ve.key,values:ve.values.filter(function(ge,Ee){return u.x()(ge,Ee)>=p[0]&&u.x()(ge,Ee)<=p[1]})}}));oe.length&&!ht?et=E.xScale():et=u.xScale(),F.scale(et)._ticks(i.utils.calcTicksX(Ut/100,kt)).tickSize(-Jt,0),F.domain([Math.ceil(p[0]),Math.floor(p[1])]),qt.select(".nv-x.nv-axis").transition().duration(L).call(F),Ct.transition().duration(L).call(E),Ft.transition().duration(L).call(u),qt.select(".nv-focus .nv-x.nv-axis").attr("transform","translate(0,"+M.range()[0]+")"),d.scale(M)._ticks(i.utils.calcTicksY(Jt/36,kt)).tickSize(-Ut,0),v.scale(nt)._ticks(i.utils.calcTicksY(Jt/36,kt)),ht?v.tickSize(se.length?0:-Ut,0):v.tickSize(oe.length?0:-Ut,0);var ie=oe.length?1:0,fe=se.length&&!dt(se)?1:0,xe=ht?fe:ie,Tt=ht?ie:fe;qt.select(".nv-focus .nv-y1.nv-axis").style("opacity",xe),qt.select(".nv-focus .nv-y2.nv-axis").style("opacity",Tt).attr("transform","translate("+et.range()[1]+",0)"),qt.select(".nv-focus .nv-y1.nv-axis").transition().duration(L).call(d),qt.select(".nv-focus .nv-y2.nv-axis").transition().duration(L).call(v)}At()}),gt}return u.dispatch.on("elementMouseover.tooltip",function(Q){G.duration(100).valueFormatter(function(kt,Rt){return at().main.tickFormat()(kt,Rt)}).data(Q).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(Q){G.hidden(!0)}),E.dispatch.on("elementMouseover.tooltip",function(Q){Q.value=gt.x()(Q.data),Q.series={value:gt.y()(Q.data),color:Q.color},G.duration(0).valueFormatter(function(kt,Rt){return vt().main.tickFormat()(kt,Rt)}).data(Q).hidden(!1)}),E.dispatch.on("elementMouseout.tooltip",function(Q){G.hidden(!0)}),E.dispatch.on("elementMousemove.tooltip",function(Q){G()}),gt.dispatch=R,gt.legend=T,gt.lines=u,gt.lines2=m,gt.bars=E,gt.bars2=x,gt.xAxis=F,gt.x2Axis=A,gt.y1Axis=d,gt.y2Axis=v,gt.y3Axis=y,gt.y4Axis=w,gt.tooltip=G,gt.options=i.utils.optionsFunc.bind(gt),gt._options=Object.create({},{width:{get:function(){return N},set:function(Q){N=Q}},height:{get:function(){return I},set:function(Q){I=Q}},showLegend:{get:function(){return W},set:function(Q){W=Q}},brushExtent:{get:function(){return z},set:function(Q){z=Q}},noData:{get:function(){return st},set:function(Q){st=Q}},focusEnable:{get:function(){return O},set:function(Q){O=Q}},focusHeight:{get:function(){return rt},set:function(Q){rt=Q}},focusShowAxisX:{get:function(){return V},set:function(Q){V=Q}},focusShowAxisY:{get:function(){return K},set:function(Q){K=Q}},legendLeftAxisHint:{get:function(){return J},set:function(Q){J=Q}},legendRightAxisHint:{get:function(){return ot},set:function(Q){ot=Q}},margin:{get:function(){return P},set:function(Q){P.top=Q.top!==void 0?Q.top:P.top,P.right=Q.right!==void 0?Q.r
vendor: 13,593 bytes, line 25
25ight:P.right,P.bottom=Q.bottom!==void 0?Q.bottom:P.bottom,P.left=Q.left!==void 0?Q.left:P.left}},focusMargin:{get:function(){return tt},set:function(Q){tt.top=Q.top!==void 0?Q.top:tt.top,tt.right=Q.right!==void 0?Q.right:tt.right,tt.bottom=Q.bottom!==void 0?Q.bottom:tt.bottom,tt.left=Q.left!==void 0?Q.left:tt.left}},duration:{get:function(){return L},set:function(Q){L=Q}},color:{get:function(){return b},set:function(Q){b=i.utils.getColor(Q),T.color(b)}},x:{get:function(){return q},set:function(Q){q=Q,u.x(Q),m.x(Q),E.x(Q),x.x(Q)}},y:{get:function(){return H},set:function(Q){H=Q,u.y(Q),m.y(Q),E.y(Q),x.y(Q)}},switchYAxisOrder:{get:function(){return ht},set:function(Q){if(ht!==Q){var kt=d;d=v,v=kt;var Rt=y;y=w,w=Rt}ht=Q,d.orient("left"),v.orient("right"),y.orient("left"),w.orient("right")}}}),i.utils.inheritOptions(gt,u),i.utils.initOptions(gt),gt},i.models.multiBar=function(){var u={top:0,right:0,bottom:0,left:0},m=960,E=500,x=d3.scale.ordinal(),F=d3.scale.linear(),A=Math.floor(Math.random()*1e4),d=null,v=function(S){return S.x},y=function(S){return S.y},w=[0],T=!0,j=!1,G="zero",P=i.utils.defaultColor(),tt=!1,N=null,I,q=500,H,b,W,O,K=.1,V=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),rt,p=i.utils.renderWatch(V,q),z=0;function et(S){return p.reset(),S.each(function(M){var nt=m-u.left-u.right,pt=E-u.top-u.bottom;d=d3.select(this),i.utils.initSVG(d);var xt=0;if(tt&&M.length&&(tt=[{values:M[0].values.map(function(D){return{x:D.x,y:0,series:D.series,size:.01}})}]),j){var st=d3.layout.stack().offset(G).values(function(D){return D.values}).y(y)(!M.length&&tt?tt:M);st.forEach(function(D,dt){D.nonStackable?(M[dt].nonStackableSeries=xt++,st[dt]=M[dt]):dt>0&&st[dt-1].nonStackable&&st[dt].values.map(function(gt,Q){gt.y0-=st[dt-1].values[Q].y,gt.y1=gt.y0+gt.y})}),M=st}M.forEach(function(D,dt){D.values.forEach(function(gt){gt.series=dt,gt.key=D.key})}),j&&M.length>0&&M[0].values.map(function(D,dt){var gt=0,Q=0;M.map(function(kt,Rt){if(!M[Rt].nonStackable){var Ut=kt.values[dt];Ut.size=Math.abs(Ut.y),Ut.y<0?(Ut.y1=Q,Q=Q-Ut.size):(Ut.y1=Ut.size+gt,gt=gt+Ut.size)}})});var R=H&&b?[]:M.map(function(D,dt){return D.values.map(function(gt,Q){return{x:v(gt,Q),y:y(gt,Q),y0:gt.y0,y1:gt.y1,idx:dt}})});x.domain(H||d3.merge(R).map(function(D){return D.x})).rangeBands(W||[0,nt],K),F.domain(b||d3.extent(d3.merge(R).map(function(D){var dt=D.y;return j&&!M[D.idx].nonStackable&&(D.y>0?dt=D.y1:dt=D.y1+D.y),dt}).concat(w))).range(O||[pt,0]),x.domain()[0]===x.domain()[1]&&(x.domain()[0]?x.domain([x.domain()[0]-x.domain()[0]*.01,x.domain()[1]+x.domain()[1]*.01]):x.domain([-1,1])),F.domain()[0]===F.domain()[1]&&(F.domain()[0]?F.domain([F.domain()[0]+F.domain()[0]*.01,F.domain()[1]-F.domain()[1]*.01]):F.domain([-1,1])),rt=rt||F;var L=d.selectAll("g.nv-wrap.nv-multibar").data([M]),g=L.enter().append("g").attr("class","nvd3 nv-wrap nv-multibar"),B=g.append("defs"),J=g.append("g"),ot=L.select("g");J.append("g").attr("class","nv-groups"),L.attr("transform","translate("+u.left+","+u.top+")"),B.append("clipPath").attr("id","nv-edge-clip-"+A).append("rect"),L.select("#nv-edge-clip-"+A+" rect").attr("width",nt).attr("height",pt),ot.attr("clip-path",T?"url(#nv-edge-clip-"+A+")":"");var ht=L.select(".nv-groups").selectAll(".nv-group").data(function(D){return D},function(D,dt){return dt});ht.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6);var vt=p.transition(ht.exit().selectAll("rect.nv-bar"),"multibarExit",Math.min(100,q)).attr("y",function(D,dt,gt){var Q=rt(0)||0;return j&&M[D.series]&&!M[D.series].nonStackable&&(Q=rt(D.y0)),Q}).attr("height",0).remove();vt.delay&&vt.delay(function(D,dt){var gt=dt*(q/(z+1))-dt;return gt}),ht.attr("class",function(D,dt){return"nv-group nv-series-"+dt}).classed("hover",function(D){return D.hover}).style("fill",function(D,dt){return P(D,dt)}).style("stroke",function(D,dt){return P(D,dt)}),ht.style("stroke-opacity",1).style("fill-opacity",.75);var at=ht.selectAll("rect.nv-bar").data(function(D){return tt&&!M.length?tt.values:D.values});at.exit().remove(),at.enter().append("rect").attr("class",function(D,dt){return y(D,dt)<0?"nv-bar negative":"nv-bar positive"}).attr("x",function(D,dt,gt){return j&&!M[gt].nonStackable?0:gt*x.rangeBand()/M.length}).attr("y",function(D,dt,gt){return rt(j&&!M[gt].nonStackable?D.y0:0)||0}).attr("height",0).attr("width",function(D,dt,gt){return x.rangeBand()/(j&&!M[gt].nonStackable?1:M.length)}).attr("transform",function(D,dt){return"translate("+x(v(D,dt))+",0)"}),at.style("fill",function(D,dt,gt){return P(D,gt,dt)}).style("stroke",function(D,dt,gt){return P(D,gt,dt)}).on("mouseover",function(D,dt){d3.select(this).classed("hover",!0),V.elementMouseover({data:D,index:dt,color:d3.select(this).style("fill")})}).on("mouseout",function(D,dt){d3.select(this).classed("hover",!1),V.elementMouseout({data:D,index:dt,color:d3.select(this).style("fill")})}).on("mousemove",function(D,dt){V.elementMousemove({data:D,index:dt,color:d3.select(this).style("fill")})}).on("click",function(D,dt){var gt=this;V.elementClick({data:D,index:dt,color:d3.select(this).style("fill"),event:d3.event,element:gt}),d3.event.stopPropagation()}).on("dblclick",function(D,dt){V.elementDblClick({data:D,index:dt,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}),at.attr("class",function(D,dt){return y(D,dt)<0?"nv-bar negative":"nv-bar positive"}).attr("transform",function(D,dt){return"translate("+x(v(D,dt))+",0)"}),N&&(I||(I=M.map(function(){return!0})),at.style("fill",function(D,dt,gt){return d3.rgb(N(D,dt)).darker(I.map(function(Q,kt){return kt}).filter(function(Q,kt){return!I[kt]})[gt]).toString()}).style("stroke",function(D,dt,gt){return d3.rgb(N(D,dt)).darker(I.map(function(Q,kt){return kt}).filter(function(Q,kt){return!I[kt]})[gt]).toString()}));var yt=at.watchTransition(p,"multibar",Math.min(250,q)).delay(function(D,dt){return dt*q/M[0].values.length});j?yt.attr("y",function(D,dt,gt){var Q=0;return M[gt].nonStackable?y(D,dt)<0?Q=F(0):F(0)-F(y(D,dt))<-1?Q=F(0)-1:Q=F(y(D,dt))||0:Q=F(D.y1),Q}).attr("height",function(D,dt,gt){return M[gt].nonStackable?Math.max(Math.abs(F(y(D,dt))-F(0)),0)||0:Math.max(Math.abs(F(D.y+D.y0)-F(D.y0)),0)}).attr("x",function(D,dt,gt){var Q=0;return M[gt].nonStackable&&(Q=D.series*x.rangeBand()/M.length,M.length!==xt&&(Q=M[gt].nonStackableSeries*x.rangeBand()/(xt*2))),Q}).attr("width",function(D,dt,gt){if(M[gt].nonStackable){var Q=x.rangeBand()/xt;return M.length!==xt&&(Q=x.rangeBand()/(xt*2)),Q}else return x.rangeBand()}):yt.attr("x",function(D,dt){return D.series*x.rangeBand()/M.length}).attr("width",x.rangeBand()/M.length).attr("y",function(D,dt){return y(D,dt)<0?F(0):F(0)-F(y(D,dt))<1?F(0)-1:F(y(D,dt))||0}).attr("height",function(D,dt){return Math.max(Math.abs(F(y(D,dt))-F(0)),1)||0}),x.copy(),rt=F.copy(),M[0]&&M[0].values&&(z=M[0].values.length)}),p.renderEnd("multibar immediate"),et}return et.dispatch=V,et.options=i.utils.optionsFunc.bind(et),et._options=Object.create({},{width:{get:function(){return m},set:function(S){m=S}},height:{get:function(){return E},set:function(S){E=S}},x:{get:function(){return v},set:function(S){v=S}},y:{get:function(){return y},set:function(S){y=S}},xScale:{get:function(){return x},set:function(S){x=S}},yScale:{get:function(){return F},set:function(S){F=S}},xDomain:{get:function(){return H},set:function(S){H=S}},yDomain:{get:function(){return b},set:function(S){b=S}},xRange:{get:function(){return W},set:function(S){W=S}},yRange:{get:function(){return O},set:function(S){O=S}},forceY:{get:function(){return w},set:function(S){w=S}},stacked:{get:function(){return j},set:function(S){j=S}},stackOffset:{get:function(){return G},set:function(S){G=S}},clipEdge:{get:function(){return T},set:function(S){T=S}},disabled:{get:function(){return I},set:function(S){I=S}},id:{get:function(){return A},set:function(S){A=S}},hideable:{get:function(){return tt},set:function(S){tt=S}},groupSpacing:{get:function(){return K},set:function(S){K=S}},margin:{get:function(){return u},set:function(S){u.top=S.top!==void 0?S.top:u.top,u.right=S.right!==void 0?S.right:u.right,u.bottom=S.bottom!==void 0?S.bottom:u.bottom,u.left=S.left!==void 0?S.left:u.left}},duration:{get:function(){return q},set:function(S){q=S,p.reset(q)}},color:{get:function(){return P},set:function(S){P=i.utils.getColor(S)}},barColor:{get:function(){return N},set:function(S){N=S?i.utils.getColor(S):null}}}),i.utils.initOptions(et),et},i.models.multiBarChart=function(){var u=i.models.multiBar(),m=i.models.axis(),E=i.models.axis(),x=i.interactiveGuideline(),F=i.models.legend(),A=i.models.legend(),d=i.models.tooltip(),v={top:30,right:20,bottom:50,left:60},y=null,w=null,T=i.utils.defaultColor(),j=!0,G={},P=!0,tt=!0,N=!0,I=!1,q=!0,H=!1,b=!1,W=0,O,K,V=i.utils.state(),rt=null,p=null,z=d3.dispatch("stateChange","changeState","renderEnd"),et=function(){return j?180:0},S=250,M=!1;V.stacked=!1,u.stacked(!1),m.orient("bottom").tickPadding(7).showMaxMin(!1).tickFormat(function(L){return L}),E.orient(I?"right":"left").tickFormat(d3.format(",.1f")),d.duration(0).valueFormatter(function(L,g){return E.tickFormat()(L,g)}).headerFormatter(function(L,g){return m.tickFormat()(L,g)}),A.updateState(!1);var nt=i.utils.renderWatch(z),pt=!1,xt=function(L){return function(){return{active:L.map(function(g){return!g.disabled}),stacked:pt}}},st=function(L){return function(g){g.stacked!==void 0&&(pt=g.stacked),g.active!==void 0&&L.forEach(function(B,J){B.disabled=!g.active[J]})}};function R(L){return nt.reset(),nt.models(u),tt&&nt.models(m),N&&nt.models(E),L.each(function(g){var B=d3.select(this),J=this;i.utils.initSVG(B);var ot=i.utils.availableWidth(y,B,v),ht=i.utils.availableHeight(w,B,v);if(R.update=function(){S===0?B.call(R):B.transition().duration(S).call(R)},R.container=this,V.setter(st(g),R.update).getter(xt(g)).update(),V.disabled=g.map(function(zt){return!!zt.disabled}),!rt){var vt;rt={};for(vt in V)V[vt]instanceof Array?rt[vt]=V[vt].slice(0):rt[vt]=V[vt]}if(!g||!g.length||!g.filter(function(zt){return zt.values.length}).length)return i.utils.noData(R,B),R;B.selectAll(".nv-noData").remove(),O=u.xScale(),K=u.yScale();var at=B.selectAll("g.nv-wrap.nv-multiBarWithLegend").data([g]),yt=at.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarWithLegend").append("g"),D=at.select("g");if(yt.append("g").attr("class","nv-x nv-axis"),yt.append("g").attr("class","nv-y nv-axis"),yt.append("g").attr("class","nv-barsWrap"),yt.append("g").attr("class","nv-legendWrap"),yt.append("g").attr("class","nv-controlsWrap"),yt.append("g").attr("class","nv-interactive"),P?(F.width(ot-et()),D.select(".nv-legendWrap").datum(g).call(F),v.top!=F.height()&&(v.top=F.height(),ht=i.utils.availableHeight(w,B,v)),D.select(".nv-legendWrap").attr("transform","translate("+et()+","+-v.top+")")):D.select(".nv-legendWrap").selectAll("*").remove(),!j)D.select(".nv-controlsWrap").selectAll("*").remove();else{var dt=[{key:G.grouped||"Grouped",disabled:u.stacked()},{key:G.stacked||"Stacked",disabled:!u.stacked()}];A.width(et()).color(["#444","#444","#444"]),D.select(".nv-controlsWrap").datum(dt).attr("transform","translate(0,"+-v.top+")").call(A)}at.attr("transform","translate("+v.left+","+v.top+")"),I&&D.select(".nv-y.nv-axis").attr("transform","translate("+ot+",0)"),u.disabled(g.map(function(zt){return zt.disabled})).width(ot).height(ht).color(g.map(function(zt,Ht){return zt.color||T(zt,Ht)}).filter(function(zt,Ht){return!g[Ht].disabled}));var gt=D.select(".nv-barsWrap").datum(g.filter(function(zt){return!zt.disabled}));if(gt.call(u),tt){m.scale(O)._ticks(i.utils.calcTicksX(ot/100,g)).tickSize(-ht,0),D.select(".nv-x.nv-axis").attr("transform","translate(0,"+K.range()[0]+")"),D.select(".nv-x.nv-axis").call(m);var Q=D.select(".nv-x.nv-axis > g").selectAll("g");if(Q.selectAll("line, text").style("opacity",1),H){var kt=function(zt,Ht){return"translate("+zt+","+Ht+")"},Rt=5,Ut=17;Q.selectAll("text").attr("transform",function(zt,Ht,oe){return kt(0,oe%2==0?Rt:Ut)});var Jt=d3.selectAll(".nv-x.nv-axis .nv-wrap g g text")[0].length;D.selectAll(".nv-x.nv-axis .nv-axisMaxMin text").attr("transform",function(zt,Ht){return kt(0,Ht===0||Jt%2!==0?Ut:Rt)})}b&&D.selectAll(".tick text").call(i.utils.wrapTicks,R.xAxis.rangeBand()),q&&Q.filter(function(zt,Ht){return Ht%Math.ceil(g[0].values.length/(ot/100))!==0}).selectAll("text, line").style("opacity",0),W&&Q.selectAll(".tick text").attr("transform","rotate("+W+" 0,0)").style("text-anchor",W>0?"start":"end"),D.select(".nv-x.nv-axis").selectAll("g.nv-axisMaxMin text").style("opacity",1)}N&&(E.scale(K)._ticks(i.utils.calcTicksY(ht/36,g)).tickSize(-ot,0),D.select(".nv-y.nv-axis").call(E)),M&&(x.width(ot).height(ht).margin({left:v.left,top:v.top}).svgContainer(B).xScale(O),at.select(".nv-interactive").call(x)),F.dispatch.on("stateChange",function(zt){for(var Ht in zt)V[Ht]=zt[Ht];z.stateChange(V),R.update()}),A.dispatch.on("legendClick",function(zt,Ht){if(zt.disabled){switch(dt=dt.map(function(oe){return oe.disabled=!0,oe}),zt.disabled=!1,zt.key){case"Grouped":case G.grouped:u.stacked(!1);break;case"Stacked":case G.stacked:u.stacked(!0);break}V.stacked=u.stacked(),z.stateChange(V),R.update()}}),z.on("changeState",function(zt){typeof zt.disabled<"u"&&(g.forEach(function(Ht,oe){Ht.disabled=zt.disabled[oe]}),V.disabled=zt.disabled),typeof zt.stacked<"u"&&(u.stacked(zt.stacked),V.stacked=zt.stacked,pt=zt.stacked),R.update()}),M?(x.dispatch.on("elementMousemove",function(zt){if(zt.pointXValue!=null){var Ht,oe,se,pe=[];g.filter(function(mt,Dt){return mt.seriesIndex=Dt,!mt.disabled}
25).forEach(function(mt,Dt){Ht=O.domain().indexOf(zt.pointXValue);var Kt=mt.values[Ht];Kt!==void 0&&(se=Kt.x,oe===void 0&&(oe=zt.mouseX),pe.push({key:mt.key,value:R.y()(Kt,Ht),color:T(mt,mt.seriesIndex),data:mt.values[Ht]}))}),x.tooltip.chartContainer(J.parentNode).data({value:se,index:Ht,series:pe})(),x.renderGuideLine(oe)}}),x.dispatch.on("elementMouseout",function(zt){x.tooltip.hidden(!0)})):(u.dispatch.on("elementMouseover.tooltip",function(zt){zt.value=R.x()(zt.data),zt.series={key:zt.data.key,value:R.y()(zt.data),color:zt.color},d.data(zt).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(zt){d.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(zt){d()}))}),nt.renderEnd("multibarchart immediate"),R}return R.dispatch=z,R.multibar=u,R.legend=F,R.controls=A,R.xAxis=m,R.yAxis=E,R.state=V,R.tooltip=d,R.interactiveLayer=x,R.options=i.utils.optionsFunc.bind(R),R._options=Object.create({},{width:{get:function(){return y},set:function(L){y=L}},height:{get:function(){return w},set:function(L){w=L}},showLegend:{get:function(){return P},set:function(L){P=L}},showControls:{get:function(){return j},set:function(L){j=L}}
vendor: 4,796 bytes, line 25
25,controlLabels:{get:function(){return G},set:function(L){G=L}},showXAxis:{get:function(){return tt},set:function(L){tt=L}},showYAxis:{get:function(){return N},set:function(L){N=L}},defaultState:{get:function(){return rt},set:function(L){rt=L}},noData:{get:function(){return p},set:function(L){p=L}},reduceXTicks:{get:function(){return q},set:function(L){q=L}},rotateLabels:{get:function(){return W},set:function(L){W=L}},staggerLabels:{get:function(){return H},set:function(L){H=L}},wrapLabels:{get:function(){return b},set:function(L){b=!!L}},margin:{get:function(){return v},set:function(L){v.top=L.top!==void 0?L.top:v.top,v.right=L.right!==void 0?L.right:v.right,v.bottom=L.bottom!==void 0?L.bottom:v.bottom,v.left=L.left!==void 0?L.left:v.left}},duration:{get:function(){return S},set:function(L){S=L,u.duration(S),m.duration(S),E.duration(S),nt.reset(S)}},color:{get:function(){return T},set:function(L){T=i.utils.getColor(L),F.color(T)}},rightAlignYAxis:{get:function(){return I},set:function(L){I=L,E.orient(I?"right":"left")}},useInteractiveGuideline:{get:function(){return M},set:function(L){M=L}},barColor:{get:function(){return u.barColor},set:function(L){u.barColor(L),F.color(function(g,B){return d3.rgb("#ccc").darker(B*1.5).toString()})}}}),i.utils.inheritOptions(R,u),i.utils.initOptions(R),R},i.models.multiBarHorizontal=function(){var u={top:0,right:0,bottom:0,left:0},m=960,E=500,x=Math.floor(Math.random()*1e4),F=null,A=d3.scale.ordinal(),d=d3.scale.linear(),v=function(S){return S.x},y=function(S){return S.y},w=function(S){return S.yErr},T=[0],j=i.utils.defaultColor(),G=null,P,tt=!1,N=!1,I=60,q=.1,H=d3.format(",.2f"),b,W,O,K,V=250,rt=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),p,z=i.utils.renderWatch(rt,V);function et(S){return z.reset(),S.each(function(M){var nt=m-u.left-u.right,pt=E-u.top-u.bottom;F=d3.select(this),i.utils.initSVG(F),tt&&(M=d3.layout.stack().offset("zero").values(function(ot){return ot.values}).y(y)(M)),M.forEach(function(ot,ht){ot.values.forEach(function(vt){vt.series=ht,vt.key=ot.key})}),tt&&M[0].values.map(function(ot,ht){var vt=0,at=0;M.map(function(yt){var D=yt.values[ht];D.size=Math.abs(D.y),D.y<0?(D.y1=at-D.size,at=at-D.size):(D.y1=vt,vt=vt+D.size)})});var xt=b&&W?[]:M.map(function(ot){return ot.values.map(function(ht,vt){return{x:v(ht,vt),y:y(ht,vt),y0:ht.y0,y1:ht.y1}})});A.domain(b||d3.merge(xt).map(function(ot){return ot.x})).rangeBands(O||[0,pt],q),d.domain(W||d3.extent(d3.merge(xt).map(function(ot){return tt?ot.y>0?ot.y1+ot.y:ot.y1:ot.y}).concat(T))),N&&!tt?d.range(K||[d.domain()[0]<0?I:0,nt-(d.domain()[1]>0?I:0)]):d.range(K||[0,nt]),p=p||d3.scale.linear().domain(d.domain()).range([d(0),d(0)]);var st=d3.select(this).selectAll("g.nv-wrap.nv-multibarHorizontal").data([M]),R=st.enter().append("g").attr("class","nvd3 nv-wrap nv-multibarHorizontal");R.append("defs");var L=R.append("g");st.select("g"),L.append("g").attr("class","nv-groups"),st.attr("transform","translate("+u.left+","+u.top+")");var g=st.select(".nv-groups").selectAll(".nv-group").data(function(ot){return ot},function(ot,ht){return ht});g.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),g.exit().watchTransition(z,"multibarhorizontal: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),g.attr("class",function(ot,ht){return"nv-group nv-series-"+ht}).classed("hover",function(ot){return ot.hover}).style("fill",function(ot,ht){return j(ot,ht)}).style("stroke",function(ot,ht){return j(ot,ht)}),g.watchTransition(z,"multibarhorizontal: groups").style("stroke-opacity",1).style("fill-opacity",.75);var B=g.selectAll("g.nv-bar").data(function(ot){return ot.values});B.exit().remove();var J=B.enter().append("g").attr("transform",function(ot,ht,vt){return"translate("+p(tt?ot.y0:0)+","+(tt?0:vt*A.rangeBand()/M.length+A(v(ot,ht)))+")"});J.append("rect").attr("width",0).attr("height",A.rangeBand()/(tt?1:M.length)),B.on("mouseover",function(ot,ht){d3.select(this).classed("hover",!0),rt.elementMouseover({data:ot,index:ht,color:d3.select(this).style("fill")})}).on("mouseout",function(ot,ht){d3.select(this).classed("hover",!1),rt.elementMouseout({data:ot,index:ht,color:d3.select(this).style("fill")})}).on("mouseout",function(ot,ht){rt.elementMouseout({data:ot,index:ht,color:d3.select(this).style("fill")})}).on("mousemove",function(ot,ht){rt.elementMousemove({data:ot,index:ht,color:d3.select(this).style("fill")})}).on("click",function(ot,ht){var vt=this;rt.elementClick({data:ot,index:ht,color:d3.select(this).style("fill"),event:d3.event,element:vt}),d3.event.stopPropagation()}).on("dblclick",function(ot,ht){rt.elementDblClick({data:ot,index:ht,color:d3.select(this).style("fill")}),d3.event.stopPropagation()}
25),w(M[0],0)&&(J.append("polyline"),B.select("polyline").attr("fill","none").attr("points",function(ot,ht){var vt=w(ot,ht),at=.8*A.rangeBand()/((tt?1:M.length)*2);vt=vt.length?vt:[-Math.abs(vt),Math.abs(vt)],vt=vt.map(function(D){return d(D)-d(0)});var yt=[[vt[0],-at],[vt[0],at],[vt[0],0],[vt[1],0],[vt[1],-at],[vt[1],at]];return yt.map(function(D){return D.join(",")}).join(" ")}).attr("transform",function(ot,ht){var vt=A.rangeBand()/((tt?1:M.length)*2);return"translate("+(y(ot,ht)<0?0:d(y(ot,ht))-d(0))+", "+vt+")"})),J.append("text"),N&&!tt?(B.select("text").attr("text-anchor",function(ot,ht){return y(ot,ht)<0?"end":"start"}).attr("y",A.rangeBand()/(M.length*2)).attr("dy",".32em").text(function(ot,ht){var vt=H(y(ot,ht)),at=w(ot,ht);return at===void 0?vt:at.length?vt+"+"+H(Math.abs(at[1]))+"-"+H(Math.abs(at[0])):vt+"±"+H(Math.abs(at))}),B.watchTransition(z,"multibarhorizontal: bars").select("text").attr("x",function(ot,ht){return y(ot,ht)<0?-4:d(y(ot,ht))-d(0)+4})):B.selectAll("text").text(""),B.selectAll("text.nv-bar-label").text(""),B.attr("class",function(ot,ht){return y(ot,ht)<0?"nv-bar negative":"nv-bar positive"}),G&&(P||(P=M.map(function(){return!0})),B.style("fill",function(ot,ht,vt){return d3.rgb(G(ot,ht)).darker(P.map(function(at,yt){return yt}).filter(function(at,yt){return!P[yt]})[vt]).toString()}).style("stroke",function(ot,ht,vt){return d3.rgb(G(ot,ht)).darker(P.map(function(at,yt){return yt}).filter(function(at,yt){return!P[yt]})[vt]).toString()})),tt?B.watchTransition(z,"multibarhorizontal: bars").attr("transform",function(ot,ht){return"translate("+d(ot.y1)+","+A(v(ot,ht))+")"}).select("rect").attr("width",function(ot,ht){return Math.abs(d(y(ot,ht)+ot.y0)-d(ot.y0))||0}).attr("height",A.rangeBand()):B.watchTransition(z,"multibarhorizontal: bars").attr("transform",function(ot,ht){return"translate("+(y(ot,ht)<0?d(y(ot,ht)):d(0))+","+(ot.series*A.rangeBand()/M.length+A(v(ot,ht)))+")"}).select("rect").attr("height",A.rangeBand()/M.length).attr("width",function(ot,ht){return Math.max(Math.abs(d(y(ot,ht))-d(0)),1)||0}),A.copy(),p=d.copy()}),z.renderEnd("multibarHorizontal immediate"),et}return et.dispatch=rt,et.options=i.utils.optionsFunc.bind(et),et._options=Object.create({},{width:{get:function(){return m},set:function(S){m=S}},height:{get:function(){return E},set:function(S){E=S}},x:{get:function(){return v},set:function(S){v=S}},y:{get:function(){return y},set:function(S){y=S}},yErr:{get:function(){return w},set:function(S){w=S}},xScale:{get:function(){return A},set:function(S){A=S}},yScale:{get:function(){return d},set:function(S){d=S}},xDomain:{get:function(){return b},set:function(S){b=S}},yDomain:{get:function(){return W},set:function(S){W=S}},xRange:{get:function(){return O},set:function(S){O=S}},yRange:{get:function(){return K},set:function(S){K=S}},forceY:{get:function(){return T},set:function(S){T=S}},stacked:{get:function(){return tt},set:function(S){tt=S}},showValues:{get:function(){return N},set:function(S){N=S}},disabled:{get:function(){return P},set:function(S){P=S}},id:{get:function(){return x},set:function(S){x=S}},valueFormat:{get:function(){return H},set:function(S){H=S}},valuePadding:{get:function(){return I},set:function(S){I=S}},groupSpacing:{get:function(){return q},set:function(S){q=S}},margin:{get:function(){return u},set:function(S){u.top=S.top!==void 0?S.top:u.top,u.right=S.right!==void 0?S.right:u.right,u.bottom=S.bottom!==void 0?S.bottom:u.bottom,u.left=S.left!==void 0?S.left:u.left}},duration:{get:function(){return V},set:function(S){V=S,z.reset(V)}},color:{get:function(){return j},set:function(S){j=i.utils.getColor(S)}},barColor:{get:function(){return G},set:function(S){G=S?i.utils.getColor(S):null}}}),i.utils.initOptions(et),et},i.models.multiBarHorizontalChart=function(){var u=i.models.multiBarHorizontal(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend().height(30),F=i.models.legend().height(30),A=i.models.tooltip(),d={top:30,right:20,bottom:50,left:60},v=null,y=null,w=i.utils.defaultColor(),T=!0,j={},G=!0,P=!0,tt=!0,N=!1,I,q,H=i.utils.state(),b=null,W=null,O=d3.dispatch("stateChange","changeState","renderEnd"),K=function(){return T?180:0},V=250;H.stacked=!1,u.stacked(N),m.orient("left").tickPadding(5).showMaxMin(!1).tickFormat(function(S){return S}),E.orient("bottom").tickFormat(d3.format(",.1f")),A.duration(0).valueFormatter(function(S,M){return E.tickFormat()(S,M)}).headerFormatter(function(S,M){return m.tickFormat()(S,M)}),F.updateState(!1);var rt=function(S){return function(){return{active:S.map(function(M){return!M.disabled}),stacked:N}}},p=function(S){return function(M){M.stacked!==void 0&&(N=M.stacked),M.active!==void 0&&S.forEac
vendor: 4,244 bytes, line 25
25h(function(nt,pt){nt.disabled=!M.active[pt]})}},z=i.utils.renderWatch(O,V);function et(S){return z.reset(),z.models(u),P&&z.models(m),tt&&z.models(E),S.each(function(M){var nt=d3.select(this);i.utils.initSVG(nt);var pt=i.utils.availableWidth(v,nt,d),xt=i.utils.availableHeight(y,nt,d);if(et.update=function(){nt.transition().duration(V).call(et)},et.container=this,N=u.stacked(),H.setter(p(M),et.update).getter(rt(M)).update(),H.disabled=M.map(function(ht){return!!ht.disabled}),!b){var st;b={};for(st in H)H[st]instanceof Array?b[st]=H[st].slice(0):b[st]=H[st]}if(!M||!M.length||!M.filter(function(ht){return ht.values.length}).length)return i.utils.noData(et,nt),et;nt.selectAll(".nv-noData").remove(),I=u.xScale(),q=u.yScale().clamp(!0);var R=nt.selectAll("g.nv-wrap.nv-multiBarHorizontalChart").data([M]),L=R.enter().append("g").attr("class","nvd3 nv-wrap nv-multiBarHorizontalChart").append("g"),g=R.select("g");if(L.append("g").attr("class","nv-x nv-axis"),L.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),L.append("g").attr("class","nv-barsWrap"),L.append("g").attr("class","nv-legendWrap"),L.append("g").attr("class","nv-controlsWrap"),G?(x.width(pt-K()),g.select(".nv-legendWrap").datum(M).call(x),d.top!=x.height()&&(d.top=x.height(),xt=i.utils.availableHeight(y,nt,d)),g.select(".nv-legendWrap").attr("transform","translate("+K()+","+-d.top+")")):g.select(".nv-legendWrap").selectAll("*").remove(),!T)g.select(".nv-controlsWrap").selectAll("*").remove();else{var B=[{key:j.grouped||"Grouped",disabled:u.stacked()},{key:j.stacked||"Stacked",disabled:!u.stacked()}];F.width(K()).color(["#444","#444","#444"]),g.select(".nv-controlsWrap").datum(B).attr("transform","translate(0,"+-d.top+")").call(F)}R.attr("transform","translate("+d.left+","+d.top+")"),u.disabled(M.map(function(ht){return ht.disabled})).width(pt).height(xt).color(M.map(function(ht,vt){return ht.color||w(ht,vt)}).filter(function(ht,vt){return!M[vt].disabled}));var J=g.select(".nv-barsWrap").datum(M.filter(function(ht){return!ht.disabled}));if(J.transition().call(u),P){m.scale(I)._ticks(i.utils.calcTicksY(xt/24,M)).tickSize(-pt,0),g.select(".nv-x.nv-axis").call(m);var ot=g.select(".nv-x.nv-axis").selectAll("g");ot.selectAll("line, text")}tt&&(E.scale(q)._ticks(i.utils.calcTicksX(pt/100,M)).tickSize(-xt,0),g.select(".nv-y.nv-axis").attr("transform","translate(0,"+xt+")"),g.select(".nv-y.nv-axis").call(E)),g.select(".nv-zeroLine line").attr("x1",q(0)).attr("x2",q(0)).attr("y1",0).attr("y2",-xt),x.dispatch.on("stateChange",function(ht){for(var vt in ht)H[vt]=ht[vt];O.stateChange(H),et.update()}),F.dispatch.on("legendClick",function(ht,vt){if(ht.disabled){switch(B=B.map(function(at){return at.disabled=!0,at}),ht.disabled=!1,ht.key){case"Grouped":case j.grouped:u.stacked(!1);break;case"Stacked":case j.stacked:u.stacked(!0);break}H.stacked=u.stacked(),O.stateChange(H),N=u.stacked(),et.update()}}),O.on("changeState",function(ht){typeof ht.disabled<"u"&&(M.forEach(function(vt,at){vt.disabled=ht.disabled[at]}),H.disabled=ht.disabled),typeof ht.stacked<"u"&&(u.stacked(ht.stacked),H.stacked=ht.stacked,N=ht.stacked),et.update()})}),z.renderEnd("multibar horizontal chart immediate"),et}return u.dispatch.on("elementMouseover.tooltip",function(S){S.value=et.x()(S.data),S.series={key:S.data.key,value:et.y()(S.data),color:S.color},A.data(S).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(S){A.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(S){A()}),et.dispatch=O,et.multibar=u,et.legend=x,et.controls=F,et.xAxis=m,et.yAxis=E,et.state=H,et.tooltip=A,et.options=i.utils.optionsFunc.bind(et),et._options=Object.create({},{width:{get:function(){return v},set:function(S){v=S}},height:{get:function(){return y},set:function(S){y=S}},showLegend:{get:function(){return G},set:function(S){G=S}},showControls:{get:function(){return T},set:function(S){T=S}},controlLabels:{get:function(){return j},set:function(S){j=S}},showXAxis:{get:function(){return P},set:function(S){P=S}},showYAxis:{get:function(){return tt},set:function(S){tt=S}},defaultState:{get:function(){return b},set:function(S){b=S}},noData:{get:function(){return W},set:function(S){W=S}},margin:{get:function(){return d}
25,set:function(S){d.top=S.top!==void 0?S.top:d.top,d.right=S.right!==void 0?S.right:d.right,d.bottom=S.bottom!==void 0?S.bottom:d.bottom,d.left=S.left!==void 0?S.left:d.left}},duration:{get:function(){return V},set:function(S){V=S,z.reset(V),u.duration(V),m.duration(V),E.duration(V)}},color:{get:function(){return w},set:function(S){w=i.utils.getColor(S),x.color(w)}},barColor:{get:function(){return u.barColor},set:function(S){u.barColor(S),x.color(function(M,nt){return d3.rgb("#ccc").darker(nt*1.5).toString()})}}}),i.utils.inheritOptions(et,u),i.utils.initOptions(et),et},i.models.multiChart=function(){var u={top:30,right:20,bottom:50,left:60},m=i.utils.defaultColor(),E=null,x=null,F=!0,A=null,d,v,y=function(R){return R.x},w=function(R){return R.y},T="linear",j=!0,G=i.interactiveGuideline(),P=!1,tt=" (right axis)",N=d3.scale.linear(),I=d3.scale.linear(),q=d3.scale.linear(),H=i.models.line().yScale(I),b=i.models.line().yScale(q),W=i.models.scatter().yScale(I),O=i.models.scatter().yScale(q),K=i.models.multiBar().stacked(!1).yScale(I),V=i.models.multiBar().stacked(!1).yScale(q),rt=i.models.stackedArea().yScale(I),p=i.models.stackedArea().yScale(q),z=i.models.axis().scale(N).orient("bottom").tickPadding(5),et=i.models.axis().scale(I).orient("left"),S=i.models.axis().scale(q).orient("right"),M=i.models.legend().height(30),nt=i.models.tooltip(),pt=d3.dispatch(),xt=[H,b,W,O,K,V,rt,p];function st(R){return R.each(function(L){var g=d3.select(this);i.utils.initSVG(g),st.update=function(){g.transition().call(st)},st.container=this;var B=i.utils.availableWidth(E,g,u),J=i.utils.availableHeight(x,g,u),ot=L.filter(function(lt){return lt.type=="line"&<.yAxis==1}),ht=L.filter(function(lt){return lt.type=="line"&<.yAxis==2}),vt=L.filter(function(lt){return lt.type=="scatter"&<.yAxis==1}),at=L.filter(function(lt){return lt.type=="scatter"&<.yAxis==2}),yt=L.filter(function(lt){return lt.type=="bar"&<.yAxis==1}),D=L.filter(function(lt){return lt.type=="bar"&<.yAxis==2}),dt=L.filter(function(lt){return lt.type=="area"&<.yAxis==1}),gt=L.filter(function(lt){return lt.type=="area"&<.yAxis==2});if(!L||!L.length||!L.filter(function(lt){return lt.values.length}).length)return i.utils.noData(st,g),st;g.selectAll(".nv-noData").remove();var Q=L.filter(function(lt){return!lt.disabled&<.yAxis==1}).map(function(lt){return lt.values.map(function(At,Ct){return{x:y(At),y:w(At)}})}),kt=L.filter(function(lt){return!lt.disabled&<.yAxis==2}).map(function(lt){return lt.values.map(function(At,Ct){return{x:y(At),y:w(At)}})});N.domain(d3.extent(d3.merge(Q.concat(kt)),function(lt){return lt.x})).range([0,B]);var Rt=g.selectAll("g.wrap.multiChart").data([L]),Ut=Rt.enter().append("g").attr("class","wrap nvd3 multiChart").append("g");Ut.append("g").attr("class","nv-x nv-axis"),Ut.append("g").attr("class","nv-y1 nv-axis"),Ut.append("g").attr("class","nv-y2 nv-axis"),Ut.append("g").attr("class","stack1Wrap"),Ut.append("g").attr("class","stack2Wrap"),Ut.append("g").attr("class","bars1Wrap"),Ut.append("g").attr("class","bars2Wrap"),Ut.append("g").attr("class","scatters1Wrap"),Ut.append("g").attr("class","scatters2Wrap"),Ut.append("g").attr("class","lines1Wrap"),Ut.append("g").attr("class","lines2Wrap"),Ut.append("g").attr("class","legendWrap"),Ut.append("g").attr("class","nv-interactive");var Jt=Rt.select("g"),zt=L.map(function(lt,At){return L[At].color||m(lt,At)});if(!F)Jt.select(".legendWrap").selectAll("*").remove();else{var Ht=M.align()?B/2:B,oe=M.align()?Ht:0;M.width(Ht),M.color(zt),Jt.select(".legendWrap").datum(L.map(function(lt){return lt.originalKey=lt.originalKey===void 0?lt.key:lt.originalKey,lt.key=lt.originalKey+(lt.yAxis==1?"":tt),lt})).call(M),u.top!=M.height()&&(u.top=M.height(),J=i.utils.availableHeight(x,g,u)),Jt.select(".legendWrap").attr("transform","translate("+oe+","+-u.top+")")}H.width(B).height(J).interpolate(T).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==1&&L[At].type=="line"})),b.width(B).height(J).interpolate(T).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==2&&L[At].type=="line"}
25)),W.width(B).height(J).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==1&&L[At].type=="scatter"})),O.width(B).height(J).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==2&&L[At].type=="scatter"})),K.width(B).height(J).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==1&&L[At].type=="bar"})),V.width(B).height(J).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==2&&L[At].type=="bar"})),rt.width(B).height(J).interpolate(T).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==1&&L[At].type=="area"})),p.width(B).height(J).interpolate(T).color(zt.filter(function(lt,At){return!L[At].disabled&&L[At].yAxis==2&&L[At].type=="area"})),Jt.attr("transform","translate("+u.left+","+u.top+")");var se=Jt.select(".lines1Wrap").datum(ot.filter(function(lt){return!lt.disabled})),pe=Jt.select(".scatters1Wrap").datum(vt.filter(function(lt){return!lt.disabled})),mt=Jt.select(".bars1Wrap").datum(yt.filter(function(lt){return!lt.disabled})),Dt=Jt.select(".stack1Wrap").datum(dt.filter(function(lt){return!lt.disabled})),Kt=Jt.select(".lines2Wrap").datum(ht.filter(function(lt){return!lt.disabled})),qt=Jt.select(".scatters2Wrap").datum(at.filter(function(lt){return!lt.disabled})),jt=Jt.select(".bars2Wrap").datum(D.filter(function(lt){return!lt.disabled})),Nt=Jt.select(".stack2Wrap").datum(gt.filter(function(lt){return!lt.disabled})),Zt=dt.length?dt.map(function(lt){return lt.values}).reduce(function(lt,At){return lt.map(function(Ct,Ft){return{x:Ct.x,y:Ct.y+At[Ft].y}})}).concat([{x:0,y:0}]):[],Et=gt.length?gt.map(function(lt){return lt.values}).reduce(function(lt,At){return lt.map(function(Ct,Ft){return{x:Ct.x,y:Ct.y+At[Ft].y}})}).concat([{x:0,y:0}]):[];I.domain(d||d3.extent(d3.merge(Q).concat(Zt),function(lt){return lt.y})).range([0,J]),q.domain(v||d3.extent(d3.merge(kt).concat(Et),function(lt){return lt.y})).range([0,J]),H.yDomain(I.domain()),W.yDomain(I.domain()),K.yDomain(I.domain()),rt.yDomain(I.domain()),b.yDomain(q.domain()),O.yDomain(q.domain()),V.yDomain(q.domain()),p.yDomain(q.domain()),dt.length&&d3.transition(Dt).call(rt),gt.length&&d3.transition(Nt).call(p),yt.length&&d3.transition(mt).call(K),D.length&&d3.transition(jt).call(V),ot.length&&d3.transition(se).call(H),ht.length&&d3.transition(Kt).call(b),vt.length&&d3.transition(pe).call(W),at.length&&d3.transition(qt).call(O),z._ticks(i.utils.calcTicksX(B/100,L)).tickSize(-J,0),Jt.select(".nv-x.nv-axis").attr("transform","translate(0,"+J+")"),d3.transition(Jt.select(".nv-x.nv-axis")).call(z),et._ticks(i.utils.calcTicksY(J/36,L)).tickSize(-B,0),d3.transition(Jt.select(".nv-y1.nv-axis")).call(et),S._ticks(i.utils.calcTicksY(J/36,L)).tickSize(-B,0),d3.transition(Jt.select(".nv-y2.nv-axis")).call(S),Jt.select(".nv-y1.nv-axis").classed("nv-disabled",!Q.length).attr("transform","translate("+N.range()[0]+",0)"),Jt.select(".nv-y2.nv-axis").classed("nv-disabled",!kt.length).attr("transform","translate("+N.range()[1]+",0)"),M.dispatch.on("stateChange",function(lt){st.update()}),P&&(G.width(B).height(J).margin({left:u.left,top:u.top}).svgContainer(g).xScale(N),Rt.select(".nv-interactive").call(G));function ae(lt){var At=L[lt.seriesIndex].yAxis===2?S:et;lt.value=lt.point.x,lt.series={value:lt.point.y,color:lt.point.color,key:lt.series.key},nt.duration(0).headerFormatter(function(Ct,Ft){return z.tickFormat()(Ct,Ft)}).valueFormatter(function(Ct,Ft){return At.tickFormat()(Ct,Ft)}).data(lt).hidden(!1)}function de(lt){var At=L[lt.seriesIndex].yAxis===2?S:et;lt.value=lt.point.x,lt.series={value:lt.point.y,color:lt.point.color,key:lt.series.key},nt.duration(100).headerFormatter(function(Ct,Ft){return z.tickFormat()(Ct,Ft)}).valueFormatter(function(Ct,Ft){return At.tickFormat()(Ct,Ft)}).data(lt).hidden(!1)}function ke(lt){var At=L[lt.seriesIndex].yAxis===2?S:et;lt.point.x=rt.x()(lt.point),lt.point.y=rt.y()(lt.point),nt.duration(0).headerFormatter(function(Ct,Ft){return z.tickFormat()(Ct,Ft)}).valueFormatter(function(Ct,Ft){return At.tickFormat()(Ct,Ft)}).data(lt).hidden(!1)}function Ae(lt){var At=L[lt.data.series].yAxis===2?S:et;lt.value=K.x()(lt.data),lt.series={value:K.y()(lt.data),color:lt.color,key:lt.data.key},nt.duration(0).headerFormatter(function(Ct,Ft){return z.tickFormat()(Ct,Ft)}).valueFormatter(function(Ct,Ft){return At.tickFormat()(Ct,Ft)}).data(lt).hidden(!1)}function Pt(){for(var lt=0,At=xt.length;lt<At;lt++){var Ct=xt[lt];try{Ct.clearHighlights()}catch{}}}function Xt(lt,At,Ct){for(var Ft=0,ie=xt.length;Ft<ie;Ft++){var fe=xt[Ft];try{fe.highlightPoint(lt,At,Ct)}catch{}}}P?(G.dispatch.on("elementMousemove",function(lt){Pt();var At,Ct,Ft,ie=[];L.filter(function(fe,xe){return fe.seriesIndex=xe,!fe.disabled}
25).forEach(function(fe,xe){var Tt=N.domain(),ve=fe.values.filter(function(Ee,ye){return st.x()(Ee,ye)>=Tt[0]&&st.x()(Ee,ye)<=Tt[1]});Ct=i.interactiveBisect(ve,lt.pointXValue,st.x());var ee=ve[Ct],ge=st.y()(ee,Ct);ge!==null&&Xt(xe,Ct,!0),ee!==void 0&&(At===void 0&&(At=ee),Ft===void 0&&(Ft=N(st.x()(ee,Ct))),ie.push({key:fe.key,value:ge,color:m(fe,fe.seriesIndex),data:ee,yAxis:fe.yAxis==2?S:et}))}),G.tooltip.chartContainer(st.container.parentNode).headerFormatter(function(fe,xe){return z.tickFormat()(fe,xe)}).valueFormatter(function(fe,xe){var Tt=ie[xe].yAxis;return fe===null?"N/A":Tt.tickFormat()(fe)}).data({value:st.x()(At,Ct),index:Ct,series:ie})(),G.renderGuideLine(Ft)}),G.dispatch.on("elementMouseout",function(lt){Pt()})):(H.dispatch.on("elementMouseover.tooltip",ae),b.dispatch.on("elementMouseover.tooltip",ae),H.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),b.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),W.dispatch.on("elementMouseover.tooltip",de),O.dispatch.on("elementMouseover.tooltip",de),W.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),O.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),rt.dispatch.on("elementMouseover.tooltip",ke),p.dispatch.on("elementMouseover.tooltip",ke),rt.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),p.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),K.dispatch.on("elementMouseover.tooltip",Ae),V.dispatch.on("elementMouseover.tooltip",Ae),K.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),V.dispatch.on("elementMouseout.tooltip",function(lt){nt.hidden(!0)}),K.dispatch.on("elementMousemove.tooltip",function(lt){nt()}),V.dispatch.on("elementMousemove.tooltip",function(lt){nt()}))}),st}return st.dispatch=pt,st.legend=M,st.lines1=H,st.lines2=b,st.scatters1=W,st.scatters2=O,st.bars1=K,st.bars2=V,st.stack1=rt,st.stack2=p,st.xAxis=z,st.yAxis1=et,st.yAxis2=S,st.tooltip=nt,st.interactiveLayer=G,st.options=i.utils.optionsFunc.bind(st),st._options=Object.create({},{width:{get:function(){return E},set:function(R){E=R}},height:{get:function(){return x},set:function(R){x=R}},showLegend:{get:function(){return F},set:function(R){F=R}},yDomain1:{get:function(){return d},set:function(R){d=R}},yDomain2:{get:function(){return v},set:function(R){v=R}},noData:{get:function(){return A},set:function(R){A=R}},interpolate:{get:function(){return T},set:function(R){T=R}},legendRightAxisHint:{get:function(){return tt},set:function(R){tt=R}},margin:{get:function(){return u},set:function(R){u.top=R.top!==void 0?R.top:u.top,u.right=R.right!==void 0?R.right:u.right,u.bottom=R.bottom!==void 0?R.bottom:u.bottom,u.left=R.left!==void 0?R.left:u.left}},color:{get:function(){return m},set:function(R){m=i.utils.getColor(R)}},x:{get:function(){return y},set:function(R){y=R,H.x(R),b.x(R),W.x(R),O.x(R),K.x(R),V.x(R),rt.x(R),p.x(R)}},y:{get:function(){return w},set:function(R){w=R,H.y(R),b.y(R),W.y(R),O.y(R),rt.y(R),p.y(R),K.y(R),V.y(R)}},useVoronoi:{get:function(){return j},set:function(R){j=R,H.useVoronoi(R),b.useVoronoi(R),rt.useVoronoi(R),p.useVoronoi(R)}},useInteractiveGuideline:{get:function(){return P},set:function(R){P=R,P&&(H.interactive(!1),H.useVoronoi(!1),b.interactive(!1),b.useVoronoi(!1),rt.interactive(!1),rt.useVoronoi(!1),p.interactive(!1),p.useVoronoi(!1),W.interactive(!1),O.interactive(!1))}}}),i.utils.initOptions(st),st},i.models.ohlcBar=function(){var u={top:0,right:0,bottom:0,left:0},m=null,E=null,x=Math.floor(Math.random()*1e4),F=null,A=d3.scale.linear(),d=d3.scale.linear(),v=function(p){return p.x},y=function(p){return p.y},w=function(p){return p.open},T=function(p){return p.close},j=function(p){return p.high},G=function(p){return p.low},P=[],tt=[],N=!1,I=!0,q=i.utils.defaultColor(),H=!1,b,W,O,K,V=d3.dispatch("stateChange","changeState","renderEnd","chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove");function rt(p){return p.each(function(z){F=d3.select(this);var et=i.utils.availableWidth(m,F,u),S=i.utils.availableHeight(E,F,u);i.utils.initSVG(F);var M=et/z[0].values.length*.9;A.domain(b||d3.extent(z[0].values.map(v).concat(P))),N?A.range(O||[et*.5/z[0].values.length,et*(z[0].values.length-.5)/z[0].values.length]):A.range(O||[5+M/2,et-M/2-5]),d.domain(W||[d3.min(z[0].values.map(G).concat(tt)),d3.max(z[0].values.map(j).concat(tt))]).range(K||[S,0]),A.domain()[0]===A.domain()[1]&&(A.domain()[0]?A.domain([A.domain()[0]-A.domain()[0]*.01,A.domain()[1]+A.domain()[1]*.01]):A.domain([-1,1])),d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]+d.domain()[0]*.01,d.domain()[1]-d.domain()[1]*.01]):d.domain([-1,1]));var nt=d3.select(this).selectAll("g.nv-wrap.nv-ohlcBar").data([z[0].values]),pt=nt.enter().append("g").attr("class","nvd3 nv-wrap nv-ohlcBar"),xt=pt.append("defs"),st=pt.append("g"),R=nt.select("g");st.append("g").attr("class","nv-ticks"),nt.attr("transform","translate("+u.left+","+u.top+")"),F.on("click",function(g,B){V.chartClick({data:g,index:B,pos:d3.event,id:x})}),xt.append("clipPath").attr("id","nv-chart-clip-path-"+x).append("rect"),nt.select("#nv-chart-clip-path-"+x+" rect").attr("width",et).attr("height",S),R.attr("clip-path",I?"url(#nv-chart-clip-path-"+x+")":"");var L=nt.select(".nv-ticks").selectAll(".nv-tick").data(function(g){return g});
vendor: 10,154 bytes, line 25
25L.exit().remove(),L.enter().append("path").attr("class",function(g,B,J){return(w(g,B)>T(g,B)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+J+"-"+B}).attr("d",function(g,B){return"m0,0l0,"+(d(w(g,B))-d(j(g,B)))+"l"+-M/2+",0l"+M/2+",0l0,"+(d(G(g,B))-d(w(g,B)))+"l0,"+(d(T(g,B))-d(G(g,B)))+"l"+M/2+",0l"+-M/2+",0z"}).attr("transform",function(g,B){return"translate("+A(v(g,B))+","+d(j(g,B))+")"}).attr("fill",function(g,B){return q[0]}).attr("stroke",function(g,B){return q[0]}).attr("x",0).attr("y",function(g,B){return d(Math.max(0,y(g,B)))}).attr("height",function(g,B){return Math.abs(d(y(g,B))-d(0))}),L.attr("class",function(g,B,J){return(w(g,B)>T(g,B)?"nv-tick negative":"nv-tick positive")+" nv-tick-"+J+"-"+B}),d3.transition(L).attr("transform",function(g,B){return"translate("+A(v(g,B))+","+d(j(g,B))+")"}).attr("d",function(g,B){var J=et/z[0].values.length*.9;return"m0,0l0,"+(d(w(g,B))-d(j(g,B)))+"l"+-J/2+",0l"+J/2+",0l0,"+(d(G(g,B))-d(w(g,B)))+"l0,"+(d(T(g,B))-d(G(g,B)))+"l"+J/2+",0l"+-J/2+",0z"})}),rt}return rt.highlightPoint=function(p,z){rt.clearHighlights(),F.select(".nv-ohlcBar .nv-tick-0-"+p).classed("hover",z)},rt.clearHighlights=function(){F.select(".nv-ohlcBar .nv-tick.hover").classed("hover",!1)},rt.dispatch=V,rt.options=i.utils.optionsFunc.bind(rt),rt._options=Object.create({},{width:{get:function(){return m},set:function(p){m=p}},height:{get:function(){return E},set:function(p){E=p}},xScale:{get:function(){return A},set:function(p){A=p}},yScale:{get:function(){return d},set:function(p){d=p}},xDomain:{get:function(){return b},set:function(p){b=p}},yDomain:{get:function(){return W},set:function(p){W=p}},xRange:{get:function(){return O},set:function(p){O=p}},yRange:{get:function(){return K},set:function(p){K=p}},forceX:{get:function(){return P},set:function(p){P=p}},forceY:{get:function(){return tt},set:function(p){tt=p}},padData:{get:function(){return N},set:function(p){N=p}},clipEdge:{get:function(){return I},set:function(p){I=p}},id:{get:function(){return x},set:function(p){x=p}},interactive:{get:function(){return H},set:function(p){H=p}},x:{get:function(){return v},set:function(p){v=p}},y:{get:function(){return y},set:function(p){y=p}},open:{get:function(){return w()},set:function(p){w=p}},close:{get:function(){return T()},set:function(p){T=p}},high:{get:function(){return j},set:function(p){j=p}},low:{get:function(){return G},set:function(p){G=p}},margin:{get:function(){return u},set:function(p){u.top=p.top!=null?p.top:u.top,u.right=p.right!=null?p.right:u.right,u.bottom=p.bottom!=null?p.bottom:u.bottom,u.left=p.left!=null?p.left:u.left}},color:{get:function(){return q},set:function(p){q=i.utils.getColor(p)}}}),i.utils.initOptions(rt),rt},i.models.parallelCoordinates=function(){var u={top:30,right:0,bottom:10,left:0},m=null,E=null,x=null,F=null,A=d3.scale.ordinal(),d={},v="undefined values",y=[],w=[],T=[],j=!0,G=i.utils.defaultColor(),P=[],tt=[],N=[],I=[],q=1,H,b,W,O=d3.svg.line(),K=d3.svg.axis(),V=d3.dispatch("brushstart","brush","brushEnd","dimensionsOrder","stateChange","elementClick","elementMouseover","elementMouseout","elementMousemove","renderEnd","activeChanged"),rt=i.utils.renderWatch(V);function p(z){return rt.reset(),z.each(function(et){var S=d3.select(this);if(x=i.utils.availableWidth(m,S,u),F=i.utils.availableHeight(E,S,u),i.utils.initSVG(S),et[0].values===void 0){var M=[];et.forEach(function(mt){var Dt={},Kt=Object.keys(mt);Kt.forEach(function(qt){qt!=="name"&&(Dt[qt]=mt[qt])}),M.push({key:mt.name,values:Dt})}),et=M}var nt=et.map(function(mt){return mt.values});tt.length===0&&(tt=et),T=y.sort(function(mt,Dt){return mt.currentPosition-Dt.currentPosition}).map(function(mt){return mt.key}),w=y.filter(function(mt){return!mt.disabled}),A.rangePoints([0,x],1).domain(w.map(function(mt){return mt.key}));var pt={},xt=!1,st=[];T.forEach(function(mt){var Dt=d3.extent(nt,function(Zt){return+Zt[mt]}),Kt=Dt[0],qt=Dt[1],jt=!1;(isNaN(Kt)||isNaN(qt))&&(jt=!0,Kt=0,qt=0),Kt===qt&&(Kt=Kt-1,qt=qt+1);var Nt=P.filter(function(Zt){return Zt.dimension==mt});Nt.length!==0&&(jt?(Kt=d[mt].domain()[0],qt=d[mt].domain()[1]):!Nt[0].hasOnlyNaN&&j?(Kt=Kt>Nt[0].extent[0]?Nt[0].extent[0]:Kt,qt=qt<Nt[0].extent[1]?Nt[0].extent[1]:qt):Nt[0].hasNaN&&(qt=qt<Nt[0].extent[1]?Nt[0].extent[1]:qt,pt[mt]=d[mt].domain()[1],xt=!0)),d[mt]=d3.scale.linear().domain([Kt,qt]).range([(F-12)*.9,0]),I=[],d[mt].brush=d3.svg.brush().y(d[mt]).on("brushstart",Rt).on("brush",Ut).on("brushend",Jt)});var R=S.selectAll("g.nv-wrap.nv-parallelCoordinates").data([et]),L=R.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinates"),g=L.append("g"),B=R.select("g");g.append("g").attr("class","nv-parallelCoordinates background"),g.append("g").attr("class","nv-parallelCoordinates foreground"),g.append("g").attr("class","nv-parallelCoordinates missingValuesline"),R.attr("transform","translate("+u.left+","+u.top+")"),O.interpolate("cardinal").tension(q),K.orient("left");var J=d3.behavior.drag().on("dragstart",Ht).on("drag",oe).on("dragend",se),ot,ht,vt=A.range()[1]-A.range()[0];if(!isNaN(vt)){var at=[0+vt/2,F-12,x-vt/2,F-12];ot=R.select(".missingValuesline").selectAll("line").data([at]),ot.enter().append("line"),ot.exit().remove(),ot.attr("x1",function(mt){return mt[0]}).attr("y1",function(mt){return mt[1]}).attr("x2",function(mt){return mt[2]}).attr("y2",function(mt){return mt[3]}),ht=R.select(".missingValuesline").selectAll("text").data([v]),ht.append("text").data([v]),ht.enter().append("text"),ht.exit().remove(),ht.attr("y",F).attr("x",x-92-vt/2).text(function(mt){return mt})}b=R.select(".background").selectAll("path").data(et),b.enter().append("path"),b.exit().remove(),b.attr("d",Q),H=R.select(".foreground").selectAll("path").data(et),H.enter().append("path"),H.exit().remove(),H.attr("d",Q).style("stroke-width",function(mt,Dt){return isNaN(mt.strokeWidth)&&(mt.strokeWidth=1),mt.strokeWidth}).attr("stroke",function(mt,Dt){return mt.color||G(mt,Dt)}),H.on("mouseover",function(mt,Dt){d3.select(this).classed("hover",!0).style("stroke-width",mt.strokeWidth+2+"px").style("stroke-opacity",1),V.elementMouseover({label:mt.name,color:mt.color||G(mt,Dt),values:mt.values,dimensions:w})}),H.on("mouseout",function(mt,Dt){d3.select(this).classed("hover",!1).style("stroke-width",mt.strokeWidth+"px").style("stroke-opacity",.7),V.elementMouseout({label:mt.name,index:Dt})}),H.on("mousemove",function(mt,Dt){V.elementMousemove()}),H.on("click",function(mt){V.elementClick({id:mt.id})}),W=B.selectAll(".dimension").data(w);var yt=W.enter().append("g").attr("class","nv-parallelCoordinates dimension");W.attr("transform",function(mt){return"translate("+A(mt.key)+",0)"}),yt.append("g").attr("class","nv-axis"),yt.append("text").attr("class","nv-label").style("cursor","move").attr("dy","-1em").attr("text-anchor","middle").on("mouseover",function(mt,Dt){V.elementMouseover({label:mt.tooltip||mt.key,color:mt.color})}).on("mouseout",function(mt,Dt){V.elementMouseout({label:mt.tooltip})}).on("mousemove",function(mt,Dt){V.elementMousemove()}).call(J),yt.append("g").attr("class","nv-brushBackground"),W.exit().remove(),W.select(".nv-label").text(function(mt){return mt.key}),kt(j);var D=T.filter(function(mt){return!d[mt].brush.empty()}),dt=D.map(function(mt){return d[mt].brush.extent()}),gt=tt.slice(0);tt=[],H.style("display",function(mt){var Dt=D.every(function(Kt,qt){return(isNaN(mt.values[Kt])||isNaN(parseFloat(mt.values[Kt])))&&dt[qt][0]==d[Kt].brush.y().domain()[0]?!0:dt[qt][0]<=mt.values[Kt]&&mt.values[Kt]<=dt[qt][1]&&!isNaN(parseFloat(mt.values[Kt]))});return Dt&&tt.push(mt),Dt?null:"none"}),(P.length>0||!i.utils.arrayEquals(tt,gt))&&V.activeChanged(tt);function Q(mt){return O(w.map(function(Dt){if(isNaN(mt.values[Dt.key])||isNaN(parseFloat(mt.values[Dt.key]))||xt){var Kt=d[Dt.key].domain(),qt=d[Dt.key].range(),jt=Kt[0]-(Kt[1]-Kt[0])/9;if(I.indexOf(Dt.key)<0){var Nt=d3.scale.linear().domain([jt,Kt[1]]).range([F-12,qt[1]]);d[Dt.key].brush.y(Nt),I.push(Dt.key)}if(isNaN(mt.values[Dt.key])||isNaN(parseFloat(mt.values[Dt.key])))return[A(Dt.key),d[Dt.key](jt)]}return ot!==void 0&&(I.length>0||xt?(ot.style("display","inline"),ht.style("display","inline")):(ot.style("display","none"),ht.style("display","none"))),[A(Dt.key),d[Dt.key](mt.values[Dt.key])]}))}function kt(mt){P.forEach(function(Dt){var Kt=d[Dt.dimension].brush.y().domain();Dt.hasOnlyNaN&&(Dt.extent[1]=(d[Dt.dimension].domain()[1]-Kt[0])*(Dt.extent[1]-Dt.extent[0])/(pt[Dt.dimension]-Dt.extent[0])+Kt[0]),Dt.hasNaN&&(Dt.extent[0]=Kt[0]),mt&&d[Dt.dimension].brush.extent(Dt.extent)}),W.select(".nv-brushBackground").each(function(Dt){d3.select(this).call(d[Dt.key].brush)}).selectAll("rect").attr("x",-8).attr("width",16),zt()}function Rt(){j===!1&&(j=!0,kt(!0))}function Ut(){D=T.filter(function(mt){return!d[mt].brush.empty()}),dt=D.map(function(mt){return d[mt].brush.extent()}),P=[],D.forEach(function(mt,Dt){P[Dt]={dimension:mt,extent:dt[Dt],hasNaN:!1,hasOnlyNaN:!1}}),tt=[],H.style("display",function(mt){var Dt=D.every(function(Kt,qt){return(isNaN(mt.values[Kt])||isNaN(parseFloat(mt.values[Kt])))&&dt[qt][0]==d[Kt].brush.y().domain()[0]?!0:dt[qt][0]<=mt.values[Kt]&&mt.values[Kt]<=dt[qt][1]&&!isNaN(parseFloat(mt.values[Kt]))});return Dt&&tt.push(mt),Dt?null:"none"}),zt(),V.brush({filters:P,active:tt})}function Jt(){var mt=D.length>0;P.forEach(function(Dt){Dt.extent[0]===d[Dt.dimension].brush.y().domain()[0]&&I.indexOf(Dt.dimension)>=0&&(Dt.hasNaN=!0),Dt.extent[1]<d[Dt.dimension].domain()[0]&&(Dt.hasOnlyNaN=!0)}),V.brushEnd(tt,mt)}function zt(){W.select(".nv-axis").each(function(mt,Dt){var Kt=P.filter(function(qt){return qt.dimension==mt.key});st[mt.key]=d[mt.key].domain(),Kt.length!=0&&j&&(st[mt.key]=[],Kt[0].extent[1]>d[mt.key].domain()[0]&&(st[mt.key]=[Kt[0].extent[1]]),Kt[0].extent[0]>=d[mt.key].domain()[0]&&st[mt.key].push(Kt[0].extent[0])),d3.select(this).call(K.scale(d[mt.key]).tickFormat(mt.format).tickValues(st[mt.key]))})}function Ht(mt){N[mt.key]=this.parentNode.__origin__=A(mt.key),b.attr("visibility","hidden")}function oe(mt){N[mt.key]=Math.min(x,Math.max(0,this.parentNode.__origin__+=d3.event.x)),H.attr("d",Q),w.sort(function(Dt,Kt){return pe(Dt.key)-pe(Kt.key)}
25),w.forEach(function(Dt,Kt){return Dt.currentPosition=Kt}),A.domain(w.map(function(Dt){return Dt.key})),W.attr("transform",function(Dt){return"translate("+pe(Dt.key)+")"})}function se(mt,Dt){delete this.parentNode.__origin__,delete N[mt.key],d3.select(this.parentNode).attr("transform","translate("+A(mt.key)+")"),H.attr("d",Q),b.attr("d",Q).attr("visibility",null),V.dimensionsOrder(w)}function pe(mt){var Dt=N[mt];return Dt??A(mt)}}),p}return p.dispatch=V,p.options=i.utils.optionsFunc.bind(p),p._options=Object.create({},{width:{get:function(){return m},set:function(z){m=z}},height:{get:function(){return E},set:function(z){E=z}},dimensionData:{get:function(){return y},set:function(z){y=z}},displayBrush:{get:function(){return j},set:function(z){j=z}},filters:{get:function(){return P},set:function(z){P=z}},active:{get:function(){return tt},set:function(z){tt=z}},lineTension:{get:function(){return q},set:function(z){q=z}},undefinedValuesLabel:{get:function(){return v},set:function(z){v=z}},dimensions:{get:function(){return y.map(function(z){return z.key})},set:function(z){i.deprecated("dimensions","use dimensionData instead"),y.length===0?z.forEach(function(et){y.push({key:et})}):z.forEach(function(et,S){y[S].key=et})}},dimensionNames:{get:function(){return y.map(function(z){return z.key})},set:function(z){i.deprecated("dimensionNames","use dimensionData instead"),T=[],y.length===0?z.forEach(function(et){y.push({key:et})}):z.forEach(function(et,S){y[S].key=et})}},dimensionFormats:{get:function(){return y.map(function(z){return z.format})},set:function(z){i.deprecated("dimensionFormats","use dimensionData instead"),y.length===0?z.forEach(function(et){y.push({format:et})}):z.forEach(function(et,S){y[S].format=et})}},margin:{get:function(){return u},set:function(z){u.top=z.top!==void 0?z.top:u.top,u.right=z.right!==void 0?z.right:u.right,u.bottom=z.bottom!==void 0?z.bottom:u.bottom,u.left=z.left!==void 0?z.left:u.left}},color:{get:function(){return G},set:function(z){G=i.utils.getColor(z)}}}),i.utils.initOptions(p),p},i.models.parallelCoordinatesChart=function(){var u=i.models.parallelCoordinates(),m=i.models.legend(),E=i.models.tooltip();i.models.tooltip();var x={top:0,right:0,bottom:0,left:0},F=null,A=null,d=!0,v=i.utils.defaultColor(),y=i.utils.state(),w=[],T=!0,j=null,G=null,P="undefined",tt=d3.dispatch("dimensionsOrder","brushEnd","stateChange","changeState","renderEnd"),N=i.utils.renderWatch(tt),I=function(b){return function(){return{active:b.map(function(W){return!W.disabled})}}},q=function(b){return function(W){W.active!==void 0&&b.forEach(function(O,K){O.disabled=!W.active[K]})}};E.contentGenerator(function(b){var W='<table><thead><tr><td class="legend-color-guide"><div style="background-color:'+b.color+'"></div></td><td><strong>'+b.key+"</strong></td></tr></thead>";return b.series.length!==0&&(W=W+'<tbody><tr><td height ="10px"></td></tr>',b.series.forEach(function(O){W=W+'<tr><td class="legend-color-guide"><div style="background-color:'+O.color+'"></div></td><td class="key">'+O.key+'</td><td class="value">'+O.value+"</td></tr>"}),W=W+"</tbody>"),W=W+"</table>",W});function H(b){return N.reset(),N.models(u),b.each(function(W){var O=d3.select(this);i.utils.initSVG(O);var K=i.utils.availableWidth(F,O,x),V=i.utils.availableHeight(A,O,x);if(H.update=function(){O.call(H)},H.container=this,y.setter(q(w),H.update).getter(I(w)).update(),y.disabled=w.map(function(M){return!!M.disabled}),w=w.map(function(M){return M.disabled=!!M.disabled,M}),w.forEach(function(M,nt){M.originalPosition=isNaN(M.originalPosition)?nt:M.originalPosition,M.currentPosition=isNaN(M.currentPosition)?nt:M.currentPosition}),!j){var rt;j={};for(rt in y)y[rt]instanceof Array?j[rt]=y[rt].slice(0):j[rt]=y[rt]}if(!W||!W.length)return i.utils.noData(H,O),H;O.selectAll(".nv-noData").remove();var p=O.selectAll("g.nv-wrap.nv-parallelCoordinatesChart").data([W]),z=p.enter().append("g").attr("class","nvd3 nv-wrap nv-parallelCoordinatesChart").append("g"),et=p.select("g");z.append("g").attr("class","nv-parallelCoordinatesWrap"),z.append("g").attr("class","nv-legendWrap"),et.select("rect").attr("width",K).attr("height",V>0?V:0),d?(m.width(K).color(function(M){return"rgb(188,190,192)"}),et.select(".nv-legendWrap").datum(w.sort(function(M,nt){return M.originalPosition-nt.originalPosition}
vendor: 9,004 bytes, line 25
25)).call(m),x.top!=m.height()&&(x.top=m.height(),V=i.utils.availableHeight(A,O,x)),p.select(".nv-legendWrap").attr("transform","translate( 0 ,"+-x.top+")")):et.select(".nv-legendWrap").selectAll("*").remove(),p.attr("transform","translate("+x.left+","+x.top+")"),u.width(K).height(V).dimensionData(w).displayBrush(T);var S=et.select(".nv-parallelCoordinatesWrap ").datum(W);S.transition().call(u),u.dispatch.on("brushEnd",function(M,nt){nt?(T=!0,tt.brushEnd(M)):T=!1}),m.dispatch.on("stateChange",function(M){for(var nt in M)y[nt]=M[nt];tt.stateChange(y),H.update()}),u.dispatch.on("dimensionsOrder",function(M){w.sort(function(pt,xt){return pt.currentPosition-xt.currentPosition});var nt=!1;w.forEach(function(pt,xt){pt.currentPosition=xt,pt.currentPosition!==pt.originalPosition&&(nt=!0)}),tt.dimensionsOrder(w,nt)}),tt.on("changeState",function(M){typeof M.disabled<"u"&&(w.forEach(function(nt,pt){nt.disabled=M.disabled[pt]}),y.disabled=M.disabled),H.update()})}),N.renderEnd("parraleleCoordinateChart immediate"),H}return u.dispatch.on("elementMouseover.tooltip",function(b){var W={key:b.label,color:b.color,series:[]};b.values&&(Object.keys(b.values).forEach(function(O){var K=b.dimensions.filter(function(rt){return rt.key===O})[0];if(K){var V;isNaN(b.values[O])||isNaN(parseFloat(b.values[O]))?V=P:V=K.format(b.values[O]),W.series.push({idx:K.currentPosition,key:O,value:V,color:K.color})}}),W.series.sort(function(O,K){return O.idx-K.idx})),E.data(W).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(b){E.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(){E()}),H.dispatch=tt,H.parallelCoordinates=u,H.legend=m,H.tooltip=E,H.options=i.utils.optionsFunc.bind(H),H._options=Object.create({},{width:{get:function(){return F},set:function(b){F=b}},height:{get:function(){return A},set:function(b){A=b}},showLegend:{get:function(){return d},set:function(b){d=b}},defaultState:{get:function(){return j},set:function(b){j=b}},dimensionData:{get:function(){return w},set:function(b){w=b}},displayBrush:{get:function(){return T},set:function(b){T=b}},noData:{get:function(){return G},set:function(b){G=b}},nanValue:{get:function(){return P},set:function(b){P=b}},margin:{get:function(){return x},set:function(b){x.top=b.top!==void 0?b.top:x.top,x.right=b.right!==void 0?b.right:x.right,x.bottom=b.bottom!==void 0?b.bottom:x.bottom,x.left=b.left!==void 0?b.left:x.left}},color:{get:function(){return v},set:function(b){v=i.utils.getColor(b),m.color(v),u.color(v)}}}),i.utils.inheritOptions(H,u),i.utils.initOptions(H),H},i.models.pie=function(){var u={top:0,right:0,bottom:0,left:0},m=500,E=500,x=function(M){return M.x},F=function(M){return M.y},A=Math.floor(Math.random()*1e4),d=null,v=i.utils.defaultColor(),y=d3.format(",.2f"),w=!0,T=!1,j="key",G=.02,P=!1,tt=!1,N=!0,I=0,q=!1,H=!1,b=!1,W=!1,O=0,K=.5,V=[],rt=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),p=[],z=[],et=i.utils.renderWatch(rt);function S(M){return et.reset(),M.each(function(nt){var pt=m-u.left-u.right,xt=E-u.top-u.bottom,st=Math.min(pt,xt)/2,R=[],L=[];if(d=d3.select(this),V.length===0)for(var g=st-st/5,B=K*st,J=0;J<nt[0].length;J++)R.push(g),L.push(B);else N?(R=V.map(function(mt){return(mt.outer-mt.outer/5)*st}),L=V.map(function(mt){return(mt.inner-mt.inner/5)*st}),K=d3.min(V.map(function(mt){return mt.inner-mt.inner/5}))):(R=V.map(function(mt){return mt.outer*st}),L=V.map(function(mt){return mt.inner*st}),K=d3.min(V.map(function(mt){return mt.inner})));i.utils.initSVG(d);var ot=d.selectAll(".nv-wrap.nv-pie").data(nt),ht=ot.enter().append("g").attr("class","nvd3 nv-wrap nv-pie nv-chart-"+A),vt=ht.append("g"),at=ot.select("g"),yt=vt.append("g").attr("class","nv-pie");vt.append("g").attr("class","nv-pieLabels"),ot.attr("transform","translate("+u.left+","+u.top+")"),at.select(".nv-pie").attr("transform","translate("+pt/2+","+xt/2+")"),at.select(".nv-pieLabels").attr("transform","translate("+pt/2+","+xt/2+")"),d.on("click",function(mt,Dt){rt.chartClick({data:mt,index:Dt,pos:d3.event,id:A})}),p=[],z=[];for(var J=0;J<nt[0].length;J++){var D=d3.svg.arc().outerRadius(R[J]),dt=d3.svg.arc().outerRadius(R[J]+5);H!==!1&&(D.startAngle(H),dt.startAngle(H)),W!==!1&&(D.endAngle(W),dt.endAngle(W)),P&&(D.innerRadius(L[J]),dt.innerRadius(L[J])),D.cornerRadius&&O&&(D.cornerRadius(O),dt.cornerRadius(O)),p.push(D),z.push(dt)}var gt=d3.layout.pie().sort(null).value(function(mt){return mt.disabled?0:F(mt)});gt.padAngle&&b&>.padAngle(b),P&&tt&&(yt.append("text").attr("class","nv-pie-title"),ot.select(".nv-pie-title").style("text-anchor","middle").text(function(mt){return tt}).style("font-size",Math.min(pt,xt)*K*2/(tt.length+2)+"px").attr("dy","0.35em").attr("transform",function(mt,Dt){return"translate(0, "+I+")"}));var Q=ot.select(".nv-pie").selectAll(".nv-slice").data(gt),kt=ot.select(".nv-pieLabels").selectAll(".nv-label").data(gt);Q.exit().remove(),kt.exit().remove();var Rt=Q.enter().append("g");if(Rt.attr("class","nv-slice"),Rt.on("mouseover",function(mt,Dt){d3.select(this).classed("hover",!0),N&&d3.select(this).select("path").transition().duration(70).attr("d",z[Dt]),rt.elementMouseover({data:mt.data,index:Dt,color:d3.select(this).style("fill")})}),Rt.on("mouseout",function(mt,Dt){d3.select(this).classed("hover",!1),N&&d3.select(this).select("path").transition().duration(50).attr("d",p[Dt]),rt.elementMouseout({data:mt.data,index:Dt})}),Rt.on("mousemove",function(mt,Dt){rt.elementMousemove({data:mt.data,index:Dt})}),Rt.on("click",function(mt,Dt){var Kt=this;rt.elementClick({data:mt.data,index:Dt,color:d3.select(this).style("fill"),event:d3.event,element:Kt})}),Rt.on("dblclick",function(mt,Dt){rt.elementDblClick({data:mt.data,index:Dt,color:d3.select(this).style("fill")})}),Q.attr("fill",function(mt,Dt){return v(mt.data,Dt)}),Q.attr("stroke",function(mt,Dt){return v(mt.data,Dt)}),Rt.append("path").each(function(mt){this._current=mt}),Q.select("path").transition().attr("d",function(mt,Dt){return p[Dt](mt)}).attrTween("d",pe),w){for(var Ut=[],J=0;J<nt[0].length;J++)Ut.push(p[J]),T?P&&(Ut[J]=d3.svg.arc().outerRadius(p[J].outerRadius()),H!==!1&&Ut[J].startAngle(H),W!==!1&&Ut[J].endAngle(W)):P||Ut[J].innerRadius(0);kt.enter().append("g").classed("nv-label",!0).each(function(mt,Dt){var Kt=d3.select(this);Kt.attr("transform",function(qt,jt){if(q){qt.outerRadius=R[jt]+10,qt.innerRadius=R[jt]+15;var Nt=(qt.startAngle+qt.endAngle)/2*(180/Math.PI);return(qt.startAngle+qt.endAngle)/2<Math.PI?Nt-=90:Nt+=90,"translate("+Ut[jt].centroid(qt)+") rotate("+Nt+")"}else return qt.outerRadius=st+10,qt.innerRadius=st+15,"translate("+Ut[jt].centroid(qt)+")"}),Kt.append("rect").style("stroke","#fff").style("fill","#fff").attr("rx",3).attr("ry",3),Kt.append("text").style("text-anchor",q?(mt.startAngle+mt.endAngle)/2<Math.PI?"start":"end":"middle").style("fill","#000")});var Jt={},zt=14,Ht=140,oe=function(mt){return Math.floor(mt[0]/Ht)*Ht+","+Math.floor(mt[1]/zt)*zt},se=function(mt){return(mt.endAngle-mt.startAngle)/(2*Math.PI)};kt.watchTransition(et,"pie labels").attr("transform",function(mt,Dt){if(q){mt.outerRadius=R[Dt]+10,mt.innerRadius=R[Dt]+15;var Kt=(mt.startAngle+mt.endAngle)/2*(180/Math.PI);return(mt.startAngle+mt.endAngle)/2<Math.PI?Kt-=90:Kt+=90,"translate("+Ut[Dt].centroid(mt)+") rotate("+Kt+")"}else{mt.outerRadius=st+10,mt.innerRadius=st+15;var qt=Ut[Dt].centroid(mt),jt=se(mt);if(mt.value&&jt>=G){var Nt=oe(qt);Jt[Nt]&&(qt[1]-=zt),Jt[oe(qt)]=!0}return"translate("+qt+")"}}),kt.select(".nv-label text").style("text-anchor",function(mt,Dt){return q?(mt.startAngle+mt.endAngle)/2<Math.PI?"start":"end":"middle"}).text(function(mt,Dt){var Kt=se(mt),qt="";if(!mt.value||Kt<G)return"";if(typeof j=="function")qt=j(mt,Dt,{key:x(mt.data),value:F(mt.data),percent:y(Kt)});else switch(j){case"key":qt=x(mt.data);break;case"value":qt=y(F(mt.data));break;case"percent":qt=d3.format("%")(Kt);break}return qt})}function pe(mt,Dt){mt.endAngle=isNaN(mt.endAngle)?0:mt.endAngle,mt.startAngle=isNaN(mt.startAngle)?0:mt.startAngle,P||(mt.innerRadius=0);var Kt=d3.interpolate(this._current,mt);return this._current=Kt(0),function(qt){return p[Dt](Kt(qt))}}}),et.renderEnd("pie immediate"),S}return S.dispatch=rt,S.options=i.utils.optionsFunc.bind(S),S._options=Object.create({},{arcsRadius:{get:function(){return V},set:function(M){V=M}},width:{get:function(){return m},set:function(M){m=M}},height:{get:function(){return E},set:function(M){E=M}},showLabels:{get:function(){return w},set:function(M){w=M}},title:{get:function(){return tt},set:function(M){tt=M}},titleOffset:{get:function(){return I},set:function(M){I=M}},labelThreshold:{get:function(){return G},set:function(M){G=M}},valueFormat:{get:function(){return y},set:function(M){y=M}},x:{get:function(){return x},set:function(M){x=M}},id:{get:function(){return A},set:function(M){A=M}},endAngle:{get:function(){return W},set:function(M){W=M}},startAngle:{get:function(){return H},set:function(M){H=M}},padAngle:{get:function(){return b}
25,set:function(M){b=M}},cornerRadius:{get:function(){return O},set:function(M){O=M}},donutRatio:{get:function(){return K},set:function(M){K=M}},labelsOutside:{get:function(){return T},set:function(M){T=M}},labelSunbeamLayout:{get:function(){return q},set:function(M){q=M}},donut:{get:function(){return P},set:function(M){P=M}},growOnHover:{get:function(){return N},set:function(M){N=M}},pieLabelsOutside:{get:function(){return T},set:function(M){T=M,i.deprecated("pieLabelsOutside","use labelsOutside instead")}},donutLabelsOutside:{get:function(){return T},set:function(M){T=M,i.deprecated("donutLabelsOutside","use labelsOutside instead")}},labelFormat:{get:function(){return y},set:function(M){y=M,i.deprecated("labelFormat","use valueFormat instead")}},margin:{get:function(){return u},set:function(M){u.top=typeof M.top<"u"?M.top:u.top,u.right=typeof M.right<"u"?M.right:u.right,u.bottom=typeof M.bottom<"u"?M.bottom:u.bottom,u.left=typeof M.left<"u"?M.left:u.left}},y:{get:function(){return F},set:function(M){F=d3.functor(M)}},color:{get:function(){return v},set:function(M){v=i.utils.getColor(M)}},labelType:{get:function(){return j},set:function(M){j=M||"key"}}}),i.utils.initOptions(S),S},i.models.pieChart=function(){var u=i.models.pie(),m=i.models.legend(),E=i.models.tooltip(),x={top:30,right:20,bottom:20,left:20},F=null,A=null,d=!0,v="top",y=i.utils.defaultColor(),w=i.utils.state(),T=null,j=null,G=250,P=d3.dispatch("stateChange","changeState","renderEnd");E.duration(0).headerEnabled(!1).valueFormatter(function(H,b){return u.valueFormat()(H,b)});var tt=i.utils.renderWatch(P),N=function(H){return function(){return{active:H.map(function(b){return!b.disabled})}}},I=function(H){return function(b){b.active!==void 0&&H.forEach(function(W,O){W.disabled=!b.active[O]})}};function q(H){return tt.reset(),tt.models(u),H.each(function(b){var W=d3.select(this);i.utils.initSVG(W);var O=i.utils.availableWidth(F,W,x),K=i.utils.availableHeight(A,W,x);if(q.update=function(){W.transition().call(q)},q.container=this,w.setter(I(b),q.update).getter(N(b)).update(),w.disabled=b.map(function(M){return!!M.disabled}),!T){var V;T={};for(V in w)w[V]instanceof Array?T[V]=w[V].slice(0):T[V]=w[V]}if(!b||!b.length)return i.utils.noData(q,W),q;W.selectAll(".nv-noData").remove();var rt=W.selectAll("g.nv-wrap.nv-pieChart").data([b]),p=rt.enter().append("g").attr("class","nvd3 nv-wrap nv-pieChart").append("g"),z=rt.select("g");if(p.append("g").attr("class","nv-pieWrap"),p.append("g").attr("class","nv-legendWrap"),!d)z.select(".nv-legendWrap").selectAll("*").remove();else if(v==="top")m.width(O).key(u.x()),rt.select(".nv-legendWrap").datum(b).call(m),x.top!=m.height()&&(x.top=m.height(),K=i.utils.availableHeight(A,W,x)),rt.select(".nv-legendWrap").attr("transform","translate(0,"+-x.top+")");else if(v==="right"){var et=i.models.legend().width();O/2<et&&(et=O/2),m.height(K).key(u.x()),m.width(et),O-=m.width(),rt.select(".nv-legendWrap").datum(b).call(m).attr("transform","translate("+O+",0)")}rt.attr("transform","translate("+x.left+","+x.top+")"),u.width(O).height(K);var S=z.select(".nv-pieWrap").datum([b]);d3.transition(S).call(u),m.dispatch.on("stateChange",function(M){for(var nt in M)w[nt]=M[nt];P.stateChange(w),q.update()}),P.on("changeState",function(M){typeof M.disabled<"u"&&(b.forEach(function(nt,pt){nt.disabled=M.disabled[pt]}),w.disabled=M.disabled),q.update()})}),tt.renderEnd("pieChart immediate"),q}return u.dispatch.on("elementMouseover.tooltip",function(H){H.series={key:q.x()(H.data),value:q.y()(H.data),color:H.color},E.data(H).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(H){E.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(H){E()}),q.legend=m,q.dispatch=P,q.pie=u,q.tooltip=E,q.options=i.utils.optionsFunc.bind(q),q._options=Object.create({},{width:{get:function(){return F},set:function(H){F=H}},height:{get:function(){return A},set:function(H){A=H}},noData:{get:function(){return j},set:function(H){j=H}},showLegend:{get:function(){return d},set:function(H){d=H}},legendPosition:{get:function(){return v},set:function(H){v=H}},defaultState:{get:function(){return T},set:function(H){T=H}},color:{get:function(){return y},set:function(H){y=H,m.color(y),u.color(y)}},duration:{get:function(){return G},set:function(H){G=H,tt.reset(G)}},margin:{get:function(){return x},set:function(H){x.top=H.top!==void 0?H.top:x.top,x.right=H.right!==void 0?H.right:x.right,x.bottom=H.bottom!==void 0?H.bottom:x.bottom,x.left=H.left!==void 0?H.left:x.left}}}),i.utils.inheritOptions(q,u),i.utils.initOptions(q),q},i.models.scatter=function(){var u={top:0,right:0,bottom:0,left:0},m=null,E=null,x=i.utils.defaultColor(),F=Math.floor(Math.random()*1e5),A=null,d=d3.scale.linear(),v=d3.scale.linear(),y=d3.scale.linear(),w=function(Q){return Q.x},T=function(Q){return Q.y},j=function(Q){return Q.size||1},G=function(Q){return Q.shape||"circle"},P=[],tt=[],N=[],I=!0,q=function(Q){return!Q.notActive},H=!1,b=.1,W=!1,O=!0,K=!1,V=function(){return 25}
25,rt=null,p=null,z=null,et=null,S=null,M=null,nt=!1,pt=d3.dispatch("elementClick","elementDblClick","elementMouseover","elementMouseout","renderEnd"),xt=!0,st=250,R=300,L=!1,g,B,J,ot,ht=!1,vt=i.utils.renderWatch(pt,st),at=[16,256],yt;function D(Q){var kt,Rt;return kt=yt=yt||{},Rt=Q[0].series,kt=kt[Rt]=kt[Rt]||{},Rt=Q[1],kt=kt[Rt]=kt[Rt]||{},kt}function dt(Q){var kt,Rt,Ut=Q[0],Jt=D(Q),zt=!1;for(kt=1;kt<arguments.length;kt++)Rt=arguments[kt],(Jt[Rt]!==Ut[Rt]||!Jt.hasOwnProperty(Rt))&&(Jt[Rt]=Ut[Rt],zt=!0);return zt}function gt(Q){return vt.reset(),Q.each(function(kt){A=d3.select(this);var Rt=i.utils.availableWidth(m,A,u),Ut=i.utils.availableHeight(E,A,u);i.utils.initSVG(A),kt.forEach(function(Et,ae){Et.values.forEach(function(de){de.series=ae})});var Jt=gt.yScale().name===d3.scale.log().name,zt=rt&&p&&S?[]:d3.merge(kt.map(function(Et){return Et.values.map(function(ae,de){return{x:w(ae,de),y:T(ae,de),size:j(ae,de)}})}));if(d.domain(rt||d3.extent(zt.map(function(Et){return Et.x}).concat(P))),H&&kt[0]?d.range(z||[(Rt*b+Rt)/(2*kt[0].values.length),Rt-Rt*(1+b)/(2*kt[0].values.length)]):d.range(z||[0,Rt]),Jt){var Ht=d3.min(zt.map(function(Et){if(Et.y!==0)return Et.y}));v.clamp(!0).domain(p||d3.extent(zt.map(function(Et){return Et.y!==0?Et.y:Ht*.1}).concat(tt))).range(et||[Ut,0])}else v.domain(p||d3.extent(zt.map(function(Et){return Et.y}).concat(tt))).range(et||[Ut,0]);y.domain(S||d3.extent(zt.map(function(Et){return Et.size}).concat(N))).range(M||at),nt=d.domain()[0]===d.domain()[1]||v.domain()[0]===v.domain()[1],d.domain()[0]===d.domain()[1]&&(d.domain()[0]?d.domain([d.domain()[0]-d.domain()[0]*.01,d.domain()[1]+d.domain()[1]*.01]):d.domain([-1,1])),v.domain()[0]===v.domain()[1]&&(v.domain()[0]?v.domain([v.domain()[0]-v.domain()[0]*.01,v.domain()[1]+v.domain()[1]*.01]):v.domain([-1,1])),isNaN(d.domain()[0])&&d.domain([-1,1]),isNaN(v.domain()[0])&&v.domain([-1,1]),g=g||d,B=B||v,J=J||y;var oe=d(1)!==g(1)||v(1)!==B(1)||y(1)!==J(1),se=A.selectAll("g.nv-wrap.nv-scatter").data([kt]),pe=se.enter().append("g").attr("class","nvd3 nv-wrap nv-scatter nv-chart-"+F),mt=pe.append("defs"),Dt=pe.append("g"),Kt=se.select("g");se.classed("nv-single-point",nt),Dt.append("g").attr("class","nv-groups"),Dt.append("g").attr("class","nv-point-paths"),pe.append("g").attr("class","nv-point-clips"),se.attr("transform","translate("+u.left+","+u.top+")"),mt.append("clipPath").attr("id","nv-edge-clip-"+F).append("rect"),se.select("#nv-edge-clip-"+F+" rect").attr("width",Rt).attr("height",Ut>0?Ut:0),Kt.attr("clip-path",W?"url(#nv-edge-clip-"+F+")":"");function qt(){if(ht=!1,!I)return!1;if(xt===!0){var Et=d3.merge(kt.map(function(lt,At){return lt.values.map(function(Ct,Ft){var ie=w(Ct,Ft),fe=T(Ct,Ft);return[i.utils.NaNtoZero(d(ie))+Math.random()*1e-4,i.utils.NaNtoZero(v(fe))+Math.random()*1e-4,At,Ft,Ct]}).filter(function(Ct,Ft){return q(Ct[4],Ft)})}));if(Et.length==0)return!1;Et.length<3&&(Et.push([d.range()[0]-20,v.range()[0]-20,null,null]),Et.push([d.range()[1]+20,v.range()[1]+20,null,null]),Et.push([d.range()[0]-20,v.range()[0]+20,null,null]),Et.push([d.range()[1]+20,v.range()[1]-20,null,null]));var ae=d3.geom.polygon([[-10,-10],[-10,E+10],[m+10,E+10],[m+10,-10]]),de=d3.geom.voronoi(Et).map(function(lt,At){return{data:ae.clip(lt),series:Et[At][2],point:Et[At][3]}});se.select(".nv-point-paths").selectAll("path").remove();var ke=se.select(".nv-point-paths").selectAll("path").data(de),Ae=ke.enter().append("svg:path").attr("d",function(lt){return!lt||!lt.data||lt.data.length===0?"M 0 0":"M"+lt.data.join(",")+"Z"}).attr("id",function(lt,At){return"nv-path-"+At}).attr("clip-path",function(lt,At){return"url(#nv-clip-"+F+"-"+At+")"});if(K&&Ae.style("fill",d3.rgb(230,230,230)).style("fill-opacity",.4).style("stroke-opacity",1).style("stroke",d3.rgb(200,200,200)),O){se.select(".nv-point-clips").selectAll("*").remove();var Pt=se.select(".nv-point-clips").selectAll("clipPath").data(Et);Pt.enter().append("svg:clipPath").attr("id",function(lt,At){return"nv-clip-"+F+"-"+At}).append("svg:circle").attr("cx",function(lt){return lt[0]}).attr("cy",function(lt){return lt[1]}).attr("r",V)}var Xt=function(lt,At){if(ht)return 0;var Ct=kt[lt.series];if(Ct!==void 0){var Ft=Ct.values[lt.point];Ft.color=x(Ct,lt.series),Ft.x=w(Ft),Ft.y=T(Ft);var ie=A.node().getBoundingClientRect(),fe=window.pageYOffset||document.documentElement.scrollTop,xe=window.pageXOffset||document.documentElement.scrollLeft,Tt={left:d(w(Ft,lt.point))+ie.left+xe+u.left+10,top:v(T(Ft,lt.point))+ie.top+fe
vendor: 5,341 bytes, line 25
25+u.top+10};At({point:Ft,series:Ct,pos:Tt,relativePos:[d(w(Ft,lt.point))+u.left,v(T(Ft,lt.point))+u.top],seriesIndex:lt.series,pointIndex:lt.point})}};ke.on("click",function(lt){Xt(lt,pt.elementClick)}).on("dblclick",function(lt){Xt(lt,pt.elementDblClick)}).on("mouseover",function(lt){Xt(lt,pt.elementMouseover)}).on("mouseout",function(lt,At){Xt(lt,pt.elementMouseout)})}else se.select(".nv-groups").selectAll(".nv-group").selectAll(".nv-point").on("click",function(lt,At){if(ht||!kt[lt.series])return 0;var Ct=kt[lt.series],Ft=Ct.values[At];pt.elementClick({point:Ft,series:Ct,pos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],relativePos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],seriesIndex:lt.series,pointIndex:At})}).on("dblclick",function(lt,At){if(ht||!kt[lt.series])return 0;var Ct=kt[lt.series],Ft=Ct.values[At];pt.elementDblClick({point:Ft,series:Ct,pos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],relativePos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],seriesIndex:lt.series,pointIndex:At})}).on("mouseover",function(lt,At){if(ht||!kt[lt.series])return 0;var Ct=kt[lt.series],Ft=Ct.values[At];pt.elementMouseover({point:Ft,series:Ct,pos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],relativePos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],seriesIndex:lt.series,pointIndex:At,color:x(lt,At)})}).on("mouseout",function(lt,At){if(ht||!kt[lt.series])return 0;var Ct=kt[lt.series],Ft=Ct.values[At];pt.elementMouseout({point:Ft,series:Ct,pos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],relativePos:[d(w(Ft,At))+u.left,v(T(Ft,At))+u.top],seriesIndex:lt.series,pointIndex:At,color:x(lt,At)})})}ht=!0;var jt=se.select(".nv-groups").selectAll(".nv-group").data(function(Et){return Et},function(Et){return Et.key});jt.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),jt.exit().remove(),jt.attr("class",function(Et,ae){return(Et.classed||"")+" nv-group nv-series-"+ae}).classed("nv-noninteractive",!I).classed("hover",function(Et){return Et.hover}),jt.watchTransition(vt,"scatter: groups").style("fill",function(Et,ae){return x(Et,ae)}).style("stroke",function(Et,ae){return x(Et,ae)}).style("stroke-opacity",1).style("fill-opacity",.5);var Nt=jt.selectAll("path.nv-point").data(function(Et){return Et.values.map(function(ae,de){return[ae,de]}).filter(function(ae,de){return q(ae[0],de)})});if(Nt.enter().append("path").attr("class",function(Et){return"nv-point nv-point-"+Et[1]}).style("fill",function(Et){return Et.color}).style("stroke",function(Et){return Et.color}).attr("transform",function(Et){return"translate("+i.utils.NaNtoZero(g(w(Et[0],Et[1])))+","+i.utils.NaNtoZero(B(T(Et[0],Et[1])))+")"}).attr("d",i.utils.symbol().type(function(Et){return G(Et[0])}).size(function(Et){return y(j(Et[0],Et[1]))})),Nt.exit().remove(),jt.exit().selectAll("path.nv-point").watchTransition(vt,"scatter exit").attr("transform",function(Et){return"translate("+i.utils.NaNtoZero(d(w(Et[0],Et[1])))+","+i.utils.NaNtoZero(v(T(Et[0],Et[1])))+")"}).remove(),Nt.filter(function(Et){return oe||dt(Et,"x","y")}).watchTransition(vt,"scatter points").attr("transform",function(Et){return"translate("+i.utils.NaNtoZero(d(w(Et[0],Et[1])))+","+i.utils.NaNtoZero(v(T(Et[0],Et[1])))+")"}),Nt.filter(function(Et){return oe||dt(Et,"shape","size")}).watchTransition(vt,"scatter points").attr("d",i.utils.symbol().type(function(Et){return G(Et[0])}).size(function(Et){return y(j(Et[0],Et[1]))})),L){var Zt=jt.selectAll(".nv-label").data(function(Et){return Et.values.map(function(ae,de){return[ae,de]}).filter(function(ae,de){return q(ae[0],de)})});Zt.enter().append("text").style("fill",function(Et,ae){return Et.color}).style("stroke-opacity",0).style("fill-opacity",1).attr("transform",function(Et){var ae=i.utils.NaNtoZero(g(w(Et[0],Et[1])))+Math.sqrt(y(j(Et[0],Et[1]))/Math.PI)+2;return"translate("+ae+","+i.utils.NaNtoZero(B(T(Et[0],Et[1])))+")"}).text(function(Et,ae){return Et[0].label}),Zt.exit().remove(),jt.exit().selectAll("path.nv-label").watchTransition(vt,"scatter exit").attr("transform",function(Et){var ae=i.utils.NaNtoZero(d(w(Et[0],Et[1])))+Math.sqrt(y(j(Et[0],Et[1]))/Math.PI)+2;return"translate("+ae+","+i.utils.NaNtoZero(v(T(Et[0],Et[1])))+")"}).remove(),Zt.each(function(Et){d3.select(this).classed("nv-label",!0).classed("nv-label-"+Et[1],!1).classed("hover",!1)}),Zt.watchTransition(vt,"scatter labels").attr("transform",function(Et){var ae=i.utils.NaNtoZero(d(w(Et[0],Et[1])))+Math.sqrt(y(j(Et[0],Et[1]))/Math.PI)+2;return"translate("+ae+","+i.utils.NaNtoZero(v(T(Et[0],Et[1])))+")"})}R?(clearTimeout(ot),ot=setTimeout(qt,R)):qt(),g=d.copy(),B=v.copy(),J=y.copy()}),vt.renderEnd("scatter immediate"),gt}return gt.dispatch=pt,gt.options=i.utils.optionsFunc.bind(gt),gt._calls=new function(){this.clearHighlights=function(){return i.dom.write(function(){A.selectAll(".nv-point.hover").classed("hover",!1)}),null},this.highlightPoint=function(Q,kt,Rt){i.dom.write(function(){A.select(".nv-groups").selectAll(".nv-series-"+Q).selectAll(".nv-point-"+kt).classed("hover",Rt)})}},pt.on("elementMouseover.point",function(Q){I&>._calls.highlightPoint(Q.seriesIndex,Q.pointIndex,!0)}),pt.on("elementMouseout.point",function(Q){I&>._calls.highlightPoint(Q.seriesIndex,Q.pointIndex,!1)}),gt._options=Object.create({},{width:{get:function(){return m},set:function(Q){m=Q}},height:{get:function(){return E},set:function(Q){E=Q}},xScale:{get:function(){return d}
25,set:function(Q){d=Q}},yScale:{get:function(){return v},set:function(Q){v=Q}},pointScale:{get:function(){return y},set:function(Q){y=Q}},xDomain:{get:function(){return rt},set:function(Q){rt=Q}},yDomain:{get:function(){return p},set:function(Q){p=Q}},pointDomain:{get:function(){return S},set:function(Q){S=Q}},xRange:{get:function(){return z},set:function(Q){z=Q}},yRange:{get:function(){return et},set:function(Q){et=Q}},pointRange:{get:function(){return M},set:function(Q){M=Q}},forceX:{get:function(){return P},set:function(Q){P=Q}},forceY:{get:function(){return tt},set:function(Q){tt=Q}},forcePoint:{get:function(){return N},set:function(Q){N=Q}},interactive:{get:function(){return I},set:function(Q){I=Q}},pointActive:{get:function(){return q},set:function(Q){q=Q}},padDataOuter:{get:function(){return b},set:function(Q){b=Q}},padData:{get:function(){return H},set:function(Q){H=Q}},clipEdge:{get:function(){return W},set:function(Q){W=Q}},clipVoronoi:{get:function(){return O},set:function(Q){O=Q}},clipRadius:{get:function(){return V},set:function(Q){V=Q}},showVoronoi:{get:function(){return K},set:function(Q){K=Q}},id:{get:function(){return F},set:function(Q){F=Q}},interactiveUpdateDelay:{get:function(){return R},set:function(Q){R=Q}},showLabels:{get:function(){return L},set:function(Q){L=Q}},x:{get:function(){return w},set:function(Q){w=d3.functor(Q)}},y:{get:function(){return T},set:function(Q){T=d3.functor(Q)}},pointSize:{get:function(){return j},set:function(Q){j=d3.functor(Q)}},pointShape:{get:function(){return G},set:function(Q){G=d3.functor(Q)}},margin:{get:function(){return u},set:function(Q){u.top=Q.top!==void 0?Q.top:u.top,u.right=Q.right!==void 0?Q.r
vendor: 13,458 bytes, line 25
25ight:u.right,u.bottom=Q.bottom!==void 0?Q.bottom:u.bottom,u.left=Q.left!==void 0?Q.left:u.left}},duration:{get:function(){return st},set:function(Q){st=Q,vt.reset(st)}},color:{get:function(){return x},set:function(Q){x=i.utils.getColor(Q)}},useVoronoi:{get:function(){return xt},set:function(Q){xt=Q,xt===!1&&(O=!1)}}}),i.utils.initOptions(gt),gt},i.models.scatterChart=function(){var u=i.models.scatter(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend(),F=i.models.distribution(),A=i.models.distribution(),d=i.models.tooltip(),v={top:30,right:20,bottom:50,left:75},y=null,w=null,T=null,j=i.utils.defaultColor(),G=u.xScale(),P=u.yScale(),tt=!1,N=!1,I=!0,q=!0,H=!0,b=!1,W=i.utils.state(),O=null,K=d3.dispatch("stateChange","changeState","renderEnd"),V=null,rt=250,p=!1;u.xScale(G).yScale(P),m.orient("bottom").tickPadding(10),E.orient(b?"right":"left").tickPadding(10),F.axis("x"),A.axis("y"),d.headerFormatter(function(nt,pt){return m.tickFormat()(nt,pt)}).valueFormatter(function(nt,pt){return E.tickFormat()(nt,pt)});var z=i.utils.renderWatch(K,rt),et=function(nt){return function(){return{active:nt.map(function(pt){return!pt.disabled})}}},S=function(nt){return function(pt){pt.active!==void 0&&nt.forEach(function(xt,st){xt.disabled=!pt.active[st]})}};function M(nt){return z.reset(),z.models(u),q&&z.models(m),H&&z.models(E),tt&&z.models(F),N&&z.models(A),nt.each(function(pt){T=d3.select(this),i.utils.initSVG(T);var xt=i.utils.availableWidth(y,T,v),st=i.utils.availableHeight(w,T,v);if(M.update=function(){rt===0?T.call(M):T.transition().duration(rt).call(M)},M.container=this,W.setter(S(pt),M.update).getter(et(pt)).update(),W.disabled=pt.map(function(at){return!!at.disabled}),!O){var R;O={};for(R in W)W[R]instanceof Array?O[R]=W[R].slice(0):O[R]=W[R]}if(!pt||!pt.length||!pt.filter(function(at){return at.values.length}).length)return i.utils.noData(M,T),z.renderEnd("scatter immediate"),M;T.selectAll(".nv-noData").remove(),G=u.xScale(),P=u.yScale();var L=T.selectAll("g.nv-wrap.nv-scatterChart").data([pt]),g=L.enter().append("g").attr("class","nvd3 nv-wrap nv-scatterChart nv-chart-"+u.id()),B=g.append("g"),J=L.select("g");if(B.append("rect").attr("class","nvd3 nv-background").style("pointer-events","none"),B.append("g").attr("class","nv-x nv-axis"),B.append("g").attr("class","nv-y nv-axis"),B.append("g").attr("class","nv-scatterWrap"),B.append("g").attr("class","nv-regressionLinesWrap"),B.append("g").attr("class","nv-distWrap"),B.append("g").attr("class","nv-legendWrap"),b&&J.select(".nv-y.nv-axis").attr("transform","translate("+xt+",0)"),!I)J.select(".nv-legendWrap").selectAll("*").remove();else{var ot=xt;x.width(ot),L.select(".nv-legendWrap").datum(pt).call(x),v.top!=x.height()&&(v.top=x.height(),st=i.utils.availableHeight(w,T,v)),L.select(".nv-legendWrap").attr("transform","translate(0,"+-v.top+")")}L.attr("transform","translate("+v.left+","+v.top+")"),u.width(xt).height(st).color(pt.map(function(at,yt){return at.color=at.color||j(at,yt),at.color}).filter(function(at,yt){return!pt[yt].disabled})).showLabels(p),L.select(".nv-scatterWrap").datum(pt.filter(function(at){return!at.disabled})).call(u),L.select(".nv-regressionLinesWrap").attr("clip-path","url(#nv-edge-clip-"+u.id()+")");var ht=L.select(".nv-regressionLinesWrap").selectAll(".nv-regLines").data(function(at){return at});ht.enter().append("g").attr("class","nv-regLines");var vt=ht.selectAll(".nv-regLine").data(function(at){return[at]});vt.enter().append("line").attr("class","nv-regLine").style("stroke-opacity",0),vt.filter(function(at){return at.intercept&&at.slope}).watchTransition(z,"scatterPlusLineChart: regline").attr("x1",G.range()[0]).attr("x2",G.range()[1]).attr("y1",function(at,yt){return P(G.domain()[0]*at.slope+at.intercept)}).attr("y2",function(at,yt){return P(G.domain()[1]*at.slope+at.intercept)}).style("stroke",function(at,yt,D){return j(at,D)}).style("stroke-opacity",function(at,yt){return at.disabled||typeof at.slope>"u"||typeof at.intercept>"u"?0:1}),q&&(m.scale(G)._ticks(i.utils.calcTicksX(xt/100,pt)).tickSize(-st,0),J.select(".nv-x.nv-axis").attr("transform","translate(0,"+P.range()[0]+")").call(m)),H&&(E.scale(P)._ticks(i.utils.calcTicksY(st/36,pt)).tickSize(-xt,0),J.select(".nv-y.nv-axis").call(E)),tt&&(F.getData(u.x()).scale(G).width(xt).color(pt.map(function(at,yt){return at.color||j(at,yt)}).filter(function(at,yt){return!pt[yt].disabled})),B.select(".nv-distWrap").append("g").attr("class","nv-distributionX"),J.select(".nv-distributionX").attr("transform","translate(0,"+P.range()[0]+")").datum(pt.filter(function(at){return!at.disabled})).call(F)),N&&(A.getData(u.y()).scale(P).width(st).color(pt.map(function(at,yt){return at.color||j(at,yt)}).filter(function(at,yt){return!pt[yt].disabled})),B.select(".nv-distWrap").append("g").attr("class","nv-distributionY"),J.select(".nv-distributionY").attr("transform","translate("+(b?xt:-A.size())+",0)").datum(pt.filter(function(at){return!at.disabled})).call(A)),x.dispatch.on("stateChange",function(at){for(var yt in at)W[yt]=at[yt];K.stateChange(W),M.update()}),K.on("changeState",function(at){typeof at.disabled<"u"&&(pt.forEach(function(yt,D){yt.disabled=at.disabled[D]}),W.disabled=at.disabled),M.update()}),u.dispatch.on("elementMouseout.tooltip",function(at){d.hidden(!0),T.select(".nv-chart-"+u.id()+" .nv-series-"+at.seriesIndex+" .nv-distx-"+at.pointIndex).attr("y1",0),T.select(".nv-chart-"+u.id()+" .nv-series-"+at.seriesIndex+" .nv-disty-"+at.pointIndex).attr("x2",A.size())}),u.dispatch.on("elementMouseover.tooltip",function(at){T.select(".nv-series-"+at.seriesIndex+" .nv-distx-"+at.pointIndex).attr("y1",at.relativePos[1]-st),T.select(".nv-series-"+at.seriesIndex+" .nv-disty-"+at.pointIndex).attr("x2",at.relativePos[0]+F.size()),d.data(at).hidden(!1)}),G.copy(),P.copy()}),z.renderEnd("scatter with line immediate"),M}return M.dispatch=K,M.scatter=u,M.legend=x,M.xAxis=m,M.yAxis=E,M.distX=F,M.distY=A,M.tooltip=d,M.options=i.utils.optionsFunc.bind(M),M._options=Object.create({},{width:{get:function(){return y},set:function(nt){y=nt}},height:{get:function(){return w},set:function(nt){w=nt}},container:{get:function(){return T},set:function(nt){T=nt}},showDistX:{get:function(){return tt},set:function(nt){tt=nt}},showDistY:{get:function(){return N},set:function(nt){N=nt}},showLegend:{get:function(){return I},set:function(nt){I=nt}},showXAxis:{get:function(){return q},set:function(nt){q=nt}},showYAxis:{get:function(){return H},set:function(nt){H=nt}},defaultState:{get:function(){return O},set:function(nt){O=nt}},noData:{get:function(){return V},set:function(nt){V=nt}},duration:{get:function(){return rt},set:function(nt){rt=nt}},showLabels:{get:function(){return p},set:function(nt){p=nt}},margin:{get:function(){return v},set:function(nt){v.top=nt.top!==void 0?nt.top:v.top,v.right=nt.right!==void 0?nt.right:v.right,v.bottom=nt.bottom!==void 0?nt.bottom:v.bottom,v.left=nt.left!==void 0?nt.left:v.left}},rightAlignYAxis:{get:function(){return b},set:function(nt){b=nt,E.orient(nt?"right":"left")}},color:{get:function(){return j},set:function(nt){j=i.utils.getColor(nt),x.color(j),F.color(j),A.color(j)}}}),i.utils.inheritOptions(M,u),i.utils.initOptions(M),M},i.models.sparkline=function(){var u={top:2,right:0,bottom:2,left:0},m=400,E=32,x=null,F=!0,A=d3.scale.linear(),d=d3.scale.linear(),v=function(b){return b.x},y=function(b){return b.y},w=i.utils.getColor(["#000"]),T,j,G,P,tt=!0,N=!0,I=d3.dispatch("renderEnd"),q=i.utils.renderWatch(I);function H(b){return q.reset(),b.each(function(W){var O=m-u.left-u.right,K=E-u.top-u.bottom;x=d3.select(this),i.utils.initSVG(x),A.domain(T||d3.extent(W,v)).range(G||[0,O]),d.domain(j||d3.extent(W,y)).range(P||[K,0]);var V=x.selectAll("g.nv-wrap.nv-sparkline").data([W]),rt=V.enter().append("g").attr("class","nvd3 nv-wrap nv-sparkline");rt.append("g"),V.select("g"),V.attr("transform","translate("+u.left+","+u.top+")");var p=V.selectAll("path").data(function(et){return[et]});p.enter().append("path"),p.exit().remove(),p.style("stroke",function(et,S){return et.color||w(et,S)}).attr("d",d3.svg.line().x(function(et,S){return A(v(et,S))}).y(function(et,S){return d(y(et,S))}));var z=V.selectAll("circle.nv-point").data(function(et){var S=et.map(function(st,R){return y(st,R)});function M(st){if(st!=-1){var R=et[st];return R.pointIndex=st,R}else return null}var nt=M(S.lastIndexOf(d.domain()[1])),pt=M(S.indexOf(d.domain()[0])),xt=M(S.length-1);return[tt?pt:null,tt?nt:null,N?xt:null].filter(function(st){return st!=null})});z.enter().append("circle"),z.exit().remove(),z.attr("cx",function(et,S){return A(v(et,et.pointIndex))}).attr("cy",function(et,S){return d(y(et,et.pointIndex))}).attr("r",2).attr("class",function(et,S){return v(et,et.pointIndex)==A.domain()[1]?"nv-point nv-currentValue":y(et,et.pointIndex)==d.domain()[0]?"nv-point nv-minValue":"nv-point nv-maxValue"})}),q.renderEnd("sparkline immediate"),H}return H.options=i.utils.optionsFunc.bind(H),H._options=Object.create({},{width:{get:function(){return m},set:function(b){m=b}},height:{get:function(){return E},set:function(b){E=b}},xDomain:{get:function(){return T},set:function(b){T=b}},yDomain:{get:function(){return j},set:function(b){j=b}},xRange:{get:function(){return G},set:function(b){G=b}},yRange:{get:function(){return P},set:function(b){P=b}},xScale:{get:function(){return A},set:function(b){A=b}},yScale:{get:function(){return d},set:function(b){d=b}},animate:{get:function(){return F},set:function(b){F=b}},showMinMaxPoints:{get:function(){return tt},set:function(b){tt=b}},showCurrentPoint:{get:function(){return N},set:function(b){N=b}},x:{get:function(){return v},set:function(b){v=d3.functor(b)}},y:{get:function(){return y},set:function(b){y=d3.functor(b)}},margin:{get:function(){return u},set:function(b){u.top=b.top!==void 0?b.top:u.top,u.right=b.right!==void 0?b.right:u.right,u.bottom=b.bottom!==void 0?b.bottom:u.bottom,u.left=b.left!==void 0?b.left:u.left}},color:{get:function(){return w},set:function(b){w=i.utils.getColor(b)}}}),H.dispatch=I,i.utils.initOptions(H),H},i.models.sparklinePlus=function(){var u=i.models.sparkline(),m={top:15,right:100,bottom:10,left:50},E=null,x=null,F,A,d=[],v=!1,y=d3.format(",r"),w=d3.format(",.2f"),T=!0,j=!0,G=!1,P=null,tt=d3.dispatch("renderEnd"),N=i.utils.renderWatch(tt);function I(q){return N.reset(),N.models(u),q.each(function(H){var b=d3.select(this);i.utils.initSVG(b);var W=i.utils.availableWidth(E,b,m),O=i.utils.availableHeight(x,b,m);if(I.update=function(){b.call(I)},I.container=this,!H||!H.length)return i.utils.noData(I,b),I;b.selectAll(".nv-noData").remove();var K=u.y()(H[H.length-1],H.length-1);F=u.xScale(),A=u.yScale();var V=b.selectAll("g.nv-wrap.nv-sparklineplus").data([H]),rt=V.enter().append("g").attr("class","nvd3 nv-wrap nv-sparklineplus"),p=rt.append("g"),z=V.select("g");p.append("g").attr("class","nv-sparklineWrap"),p.append("g").attr("class","nv-valueWrap"),p.append("g").attr("class","nv-hoverArea"),V.attr("transform","translate("+m.left+","+m.top+")");var et=z.select(".nv-sparklineWrap");if(u.width(W).height(O),et.call(u),T){var S=z.select(".nv-valueWrap"),M=S.selectAll(".nv-currentValue").data([K]);M.enter().append("text").attr("class","nv-currentValue").attr("dx",G?-8:8).attr("dy",".9em").style("text-anchor",G?"end":"start"),M.attr("x",W+(G?m.right:0)).attr("y",j?function(xt){return A(xt)}:0).style("fill",u.color()(H[H.length-1],H.length-1)).text(w(K))}p.select(".nv-hoverArea").append("rect").on("mousemove",pt).on("click",function(){v=!v}).on("mouseout",function(){d=[],nt()}),z.select(".nv-hoverArea rect").attr("transform",function(xt){return"translate("+-m.left+","+-m.top+")"}).attr("width",W+m.left+m.right).attr("height",O+m.top);function nt(){if(!v){var xt=z.selectAll(".nv-hoverValue").data(d),st=xt.enter().append("g").attr("class","nv-hoverValue").style("stroke-opacity",0).style("fill-opacity",0);xt.exit().transition().duration(250).style("stroke-opacity",0).style("fill-opacity",0).remove(),xt.attr("transform",function(R){return"translate("+F(u.x()(H[R],R))+",0)"}).transition().duration(250).style("stroke-opacity",1).style("fill-opacity",1),d.length&&(st.append("line").attr("x1",0).attr("y1",-m.top).attr("x2",0).attr("y2",O),st.append("text").attr("class","nv-xValue").attr("x",-6).attr("y",-m.top).attr("text-anchor","end").attr("dy",".9em"),z.select(".nv-hoverValue .nv-xValue").text(y(u.x()(H[d[0]],d[0]))),st.append("text").attr("class","nv-yValue").attr("x",6).attr("y",-m.top).attr("text-anchor","start").attr("dy",".9em"),z.select(".nv-hoverValue .nv-yValue").text(w(u.y()(H[d[0]],d[0]))))}}function pt(){if(v)return;var xt=d3.mouse(this)[0]-m.left;function st(R,L){for(var g=Math.abs(u.x()(R[0],0)-L),B=0,J=0;J<R.length;J++)Math.abs(u.x()(R[J],J)-L)<g&&(g=Math.abs(u.x()(R[J],J)-L),B=J);return B}d=[st(H,Math.round(F.invert(xt)))],nt()}}),N.renderEnd("sparklinePlus immediate"),I}return I.dispatch=tt,I.sparkline=u,I.options=i.utils.optionsFunc.bind(I),I._options=Object.create({},{width:{get:function(){return E},set:function(q){E=q}},height:{get:function(){return x},set:function(q){x=q}},xTickFormat:{get:function(){return y},set:function(q){y=q}},yTickFormat:{get:function(){return w},set:function(q){w=q}},showLastValue:{get:function(){return T},set:function(q){T=q}},alignValue:{get:function(){return j},set:function(q){j=q}},rightAlignValue:{get:function(){return G},set:function(q){G=q}},noData:{get:function(){return P},set:function(q){P=q}},margin:{get:function(){return m}
25,set:function(q){m.top=q.top!==void 0?q.top:m.top,m.right=q.right!==void 0?q.right:m.right,m.bottom=q.bottom!==void 0?q.bottom:m.bottom,m.left=q.left!==void 0?q.left:m.left}}}),i.utils.inheritOptions(I,u),i.utils.initOptions(I),I},i.models.stackedArea=function(){var u={top:0,right:0,bottom:0,left:0},m=960,E=500,x=i.utils.defaultColor(),F=Math.floor(Math.random()*1e5),A=null,d=function(O){return O.x},v=function(O){return O.y},y=function(O,K){return!isNaN(v(O,K))&&v(O,K)!==null},w="stack",T="zero",j="default",G="linear",P=!1,tt,N,I=i.models.scatter(),q=250,H=d3.dispatch("areaClick","areaMouseover","areaMouseout","renderEnd","elementClick","elementMouseover","elementMouseout");I.pointSize(2.2).pointDomain([2.2,2.2]);var b=i.utils.renderWatch(H,q);function W(O){return b.reset(),b.models(I),O.each(function(K){var V=m-u.left-u.right,rt=E-u.top-u.bottom;A=d3.select(this),i.utils.initSVG(A),tt=I.xScale(),N=I.yScale();var p=K;K.forEach(function(g,B){g.seriesIndex=B,g.values=g.values.map(function(J,ot){return J.index=ot,J.seriesIndex=B,J})});var z=K.filter(function(g){return!g.disabled});K=d3.layout.stack().order(j).offset(T).values(function(g){return g.values}).x(d).y(v).out(function(g,B,J){g.display={y:J,y0:B}})(z);var et=A.selectAll("g.nv-wrap.nv-stackedarea").data([K]),S=et.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedarea"),M=S.append("defs"),nt=S.append("g"),pt=et.select("g");nt.append("g").attr("class","nv-areaWrap"),nt.append("g").attr("class","nv-scatterWrap"),et.attr("transform","translate("+u.left+","+u.top+")"),I.forceY().length==0&&I.forceY().push(0),I.width(V).height(rt).x(d).y(function(g){if(g.display!==void 0)return g.display.y+g.display.y0}).color(K.map(function(g,B){return g.color=g.color||x(g,g.seriesIndex),g.color}));var xt=pt.select(".nv-scatterWrap").datum(K);xt.call(I),M.append("clipPath").attr("id","nv-edge-clip-"+F).append("rect"),et.select("#nv-edge-clip-"+F+" rect").attr("width",V).attr("height",rt),pt.attr("clip-path",P?"url(#nv-edge-clip-"+F+")":"");var st=d3.svg.area().defined(y).x(function(g,B){return tt(d(g,B))}).y0(function(g){return N(g.display.y0)}).y1(function(g){return N(g.display.y+g.display.y0)}).interpolate(G),R=d3.svg.area().defined(y).x(function(g,B){return tt(d(g,B))}).y0(function(g){return N(g.display.y0)}).y1(function(g){return N(g.display.y0)}),L=pt.select(".nv-areaWrap").selectAll("path.nv-area").data(function(g){return g});L.enter().append("path").attr("class",function(g,B){return"nv-area nv-area-"+B}).attr("d",function(g,B){return R(g.values,g.seriesIndex)}).on("mouseover",function(g,B){d3.select(this).classed("hover",!0),H.areaMouseover({point:g,series:g.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:g.seriesIndex})}).on("mouseout",function(g,B){d3.select(this).classed("hover",!1),H.areaMouseout({point:g,series:g.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:g.seriesIndex})}).on("click",function(g,B){d3.select(this).classed("hover",!1),H.areaClick({point:g,series:g.key,pos:[d3.event.pageX,d3.event.pageY],seriesIndex:g.seriesIndex})}),L.exit().remove(),L.style("fill",function(g,B){return g.color||x(g,g.seriesIndex)}).style("stroke",function(g,B){return g.color||x(g,g.seriesIndex)}),L.watchTransition(b,"stackedArea path").attr("d",function(g,B){return st(g.values,B)}),I.dispatch.on("elementMouseover.area",function(g){pt.select(".nv-chart-"+F+" .nv-area-"+g.seriesIndex).classed("hover",!0)}),I.dispatch.on("elementMouseout.area",function(g){pt.select(".nv-chart-"+F+" .nv-area-"+g.seriesIndex).classed("hover",!1)}),W.d3_stackedOffset_stackPercent=function(g){var B=g.length,J=g[0].length,ot,ht,vt,at=[];for(ht=0;ht<J;++ht){for(ot=0,vt=0;ot<p.length;ot++)vt+=v(p[ot].values[ht]);if(vt)for(ot=0;ot<B;ot++)g[ot][ht][1]/=vt;else for(ot=0;ot<B;ot++)g[ot][ht][1]=0}for(ht=0;ht<J;++ht)at[ht]=0;return at}}),b.renderEnd("stackedArea immediate"),W}return W.dispatch=H,W.scatter=I,I.dispatch.on("elementClick",function(){H.elementClick.apply(this,arguments)}),I.dispatch.on("elementMouseover",function(){H.elementMouseover.apply(this,arguments)}),I.dispatch.on("elementMouseout",function(){H.elementMouseout.apply(this,arguments)}),W.interpolate=function(O){return arguments.length?(G=O,W):G},W.duration=function(O){return arguments.length?(q=O,b.reset(q),I.duration(q),W):q}
25,W.dispatch=H,W.scatter=I,W.options=i.utils.optionsFunc.bind(W),W._options=Object.create({},{width:{get:function(){return m},set:function(O){m=O}},height:{get:function(){return E},set:function(O){E=O}},defined:{get:function(){return y},set:function(O){y=O}},clipEdge:{get:function(){return P},set:function(O){P=O}},offset:{get:function(){return T},set:function(O){T=O}},order:{get:function(){return j},set:function(O){j=O}},interpolate:{get:function(){return G},set:function(O){G=O}},x:{get:function(){return d},set:function(O){d=d3.functor(O)}},y:{get:function(){return v},set:function(O){v=d3.functor(O)}},margin:{get:function(){return u},set:function(O){u.top=O.top!==void 0?O.top:u.top,u.right=O.right!==void 0?O.right:u.right,u.bottom=O.bottom!==void 0?O.bottom:u.bottom,u.left=O.left!==void 0?O.left:u.left}},color:{get:function(){return x},set:function(O){x=i.utils.getColor(O)}},style:{get:function(){return w},set:function(O){switch(w=O,w){case"stack":W.offset("zero"),W.order("default");break;case"stream":W.offset("wiggle"),W.order("inside-out");break;case"stream-center":W.offset("silhouette"),W.order("inside-out");break;case"expand":W.offset("expand"),W.order("default");break;case"stack_percent":W.offset(W.d3_stackedOffset_stackPercent),W.order("default");break}}},duration:{get:function(){return q},set:function(O){q=O,b.reset(q),I.duration(q)}}}),i.utils.inheritOptions(W,I),i.utils.initOptions(W),W},i.models.stackedAreaChart=function(){var u=i.models.stackedArea(),m=i.models.axis(),E=i.models.axis(),x=i.models.legend(),F=i.models.legend(),A=i.interactiveGuideline(),d=i.models.tooltip(),v={top:30,right:25,bottom:50,left:60},y=null,w=null,T=i.utils.defaultColor(),j=!0,G=!0,P=!0,tt=!0,N=!1,I=!1,q=!0,H="TOTAL",b,W,O=i.utils.state(),K=null,V=null,rt=d3.dispatch("stateChange","changeState","renderEnd"),p=250,z=["Stacked","Stream","Expanded"],et={},S=250;O.style=u.style(),m.orient("bottom").tickPadding(7),E.orient(N?"right":"left"),d.headerFormatter(function(g,B){return m.tickFormat()(g,B)}).valueFormatter(function(g,B){return E.tickFormat()(g,B)}),A.tooltip.headerFormatter(function(g,B){return m.tickFormat()(g,B)}).valueFormatter(function(g,B){return E.tickFormat()(g,B)});var M=null,nt=null;F.updateState(!1);var pt=i.utils.renderWatch(rt);u.style();var xt=function(g){return function(){return{active:g.map(function(B){return!B.disabled}),style:u.style()}}},st=function(g){return function(B){B.style!==void 0&&B.style,B.active!==void 0&&g.forEach(function(J,ot){J.disabled=!B.active[ot]})}},R=d3.format("%");function L(g){return pt.reset(),pt.models(u),P&&pt.models(m),tt&&pt.models(E),g.each(function(B){var J=d3.select(this),ot=this;i.utils.initSVG(J);var ht=i.utils.availableWidth(y,J,v),vt=i.utils.availableHeight(w,J,v);if(L.update=function(){J.transition().duration(S).call(L)},L.container=this,O.setter(st(B),L.update).getter(xt(B)).update(),O.disabled=B.map(function(Jt){return!!Jt.disabled}),!K){var at;K={};for(at in O)O[at]instanceof Array?K[at]=O[at].slice(0):K[at]=O[at]}if(!B||!B.length||!B.filter(function(Jt){return Jt.values.length}).length)return i.utils.noData(L,J),L;J.selectAll(".nv-noData").remove(),b=u.xScale(),W=u.yScale();var yt=J.selectAll("g.nv-wrap.nv-stackedAreaChart").data([B]),D=yt.enter().append("g").attr("class","nvd3 nv-wrap nv-stackedAreaChart").append("g"),dt=yt.select("g");if(D.append("rect").style("opacity",0),D.append("g").attr("class","nv-x nv-axis"),D.append("g").attr("class","nv-y nv-axis"),D.append("g").attr("class","nv-stackedWrap"),D.append("g").attr("class","nv-legendWrap"),D.append("g").attr("class","nv-controlsWrap"),D.append("g").attr("class","nv-interactive"),dt.select("rect").attr("width",ht).attr("height",vt),!G)dt.select(".nv-legendWrap").selectAll("*").remove();else{var gt=j?ht-p:ht;x.width(gt),dt.select(".nv-legendWrap").datum(B).call(x),v.top!=x.height()&&(v.top=x.height(),vt=i.utils.availableHeight(w,J,v)),dt.select(".nv-legendWrap").attr("transform","translate("+(ht-gt)+","+-v.top+")")}if(!j)dt.select(".nv-controlsWrap").selectAll("*").remove();else{var Q=[{key:et.stacked||"Stacked",metaKey:"Stacked",disabled:u.style()!="stack",style:"stack"},{key:et.stream||"Stream",metaKey:"Stream",disabled:u.style()!="stream",style:"stream"},{key:et.expanded||"Expanded",metaKey:"Expanded",disabled:u.style()!="expand",style:"expand"},{key:et.stack_percent||"Stack %",metaKey:"Stack_Percent",disabled:u.style()!="stack_percent",style:"stack_percent"}];p=z.length/3*260,Q=Q.filter(function(Jt){return z.indexOf(Jt.metaKey)!==-1}),F.width(p).color(["#444","#444","#444"]),dt.select(".nv-control
25sWrap").datum(Q).call(F),v.top!=Math.max(F.height(),x.height())&&(v.top=Math.max(F.height(),x.height()),vt=i.utils.availableHeight(w,J,v)),dt.select(".nv-controlsWrap").attr("transform","translate(0,"+-v.top+")")}yt.attr("transform","translate("+v.left+","+v.top+")"),N&&dt.select(".nv-y.nv-axis").attr("transform","translate("+ht+",0)"),I&&(A.width(ht).height(vt).margin({left:v.left,top:v.top}).svgContainer(J).xScale(b),yt.select(".nv-interactive").call(A)),u.width(ht).height(vt);var kt=dt.select(".nv-stackedWrap").datum(B);if(kt.transition().call(u),P&&(m.scale(b)._ticks(i.utils.calcTicksX(ht/100,B)).tickSize(-vt,0),dt.select(".nv-x.nv-axis").attr("transform","translate(0,"+vt+")"),dt.select(".nv-x.nv-axis").transition().duration(0).call(m)),tt){var Rt;if(u.offset()==="wiggle"?Rt=0:Rt=i.utils.calcTicksY(vt/36,B),E.scale(W)._ticks(Rt).tickSize(-ht,0),u.style()==="expand"||u.style()==="stack_percent"){var Ut=E.tickFormat();(!M||Ut!==R)&&(M=Ut),E.tickFormat(R)}else M&&(E.tickFormat(M),M=null);dt.select(".nv-y.nv-axis").transition().duration(0).call(E)}u.dispatch.on("areaClick.toggle",function(Jt){B.filter(function(zt){return!zt.disabled}).length===1?B.forEach(function(zt){zt.disabled=!1}):B.forEach(function(zt,Ht){zt.disabled=Ht!=Jt.seriesIndex}),O.disabled=B.map(function(zt){return!!zt.disabled}),rt.stateChange(O),L.update()}),x.dispatch.on("stateChange",function(Jt){for(var zt in Jt)O[zt]=Jt[zt];rt.stateChange(O),L.update()}),F.dispatch.on("legendClick",function(Jt,zt){Jt.disabled&&(Q=Q.map(function(Ht){return Ht.disabled=!0,Ht}),Jt.disabled=!1,u.style(Jt.style),O.style=u.style(),rt.stateChange(O),L.update())}),A.dispatch.on("elementMousemove",function(Jt){u.clearHighlights();var zt,Ht,oe,se=[],pe=0;if(B.filter(function(jt,Nt){return jt.seriesIndex=Nt,!jt.disabled}).forEach(function(jt,Nt){Ht=i.interactiveBisect(jt.values,Jt.pointXValue,L.x());var Zt=jt.values[Ht],Et=L.y()(Zt,Ht);if(Et!=null&&u.highlightPoint(Nt,Ht,!0),!(typeof Zt>"u")){typeof zt>"u"&&(zt=Zt),typeof oe>"u"&&(oe=L.xScale()(L.x()(Zt,Ht)));var ae=u.style()=="expand"?Zt.display.y:L.y()(Zt,Ht);se.push({key:jt.key,value:ae,color:T(jt,jt.seriesIndex),point:Zt}),q&&u.style()!="expand"&&(pe+=ae)}}),se.reverse(),se.length>2){var mt=L.yScale().invert(Jt.mouseY),Dt=null;se.forEach(function(jt,Nt){mt=Math.abs(mt);var Zt=Math.abs(jt.point.display.y0),Et=Math.abs(jt.point.display.y);if(mt>=Zt&&mt<=Et+Zt){Dt=Nt;return}}),Dt!=null&&(se[Dt].highlight=!0)}q&&u.style()!="expand"&&se.length>=2&&se.push({key:H,value:pe,total:!0});var Kt=L.x()(zt,Ht),qt=A.tooltip.valueFormatter();u.style()==="expand"||u.style()==="stack_percent"?(nt||(nt=qt),qt=d3.format(".1%")):nt&&(qt=nt,nt=null),A.tooltip.chartContainer(ot.parentNode).valueFormatter(qt).data({value:Kt,series:se})(),A.renderGuideLine(oe)}),A.dispatch.on("elementMouseout",function(Jt){u.clearHighlights()}),rt.on("changeState",function(Jt){typeof Jt.disabled<"u"&&B.length===Jt.disabled.length&&(B.forEach(function(zt,Ht){zt.disabled=Jt.disabled[Ht]}),O.disabled=Jt.disabled),typeof Jt.style<"u"&&(u.style(Jt.style),Jt.style),L.update()})}),pt.renderEnd("stacked Area chart immediate"),L}return u.dispatch.on("elementMouseover.tooltip",function(g){g.point.x=u.x()(g.point),g.point.y=u.y()(g.point),d.data(g).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(g){d.hidden(!0)}),L.dispatch=rt,L.stacked=u,L.legend=x,L.controls=F,L.xAxis=m,L.yAxis=E,L.interactiveLayer=A,L.tooltip=d,L.dispatch=rt,L.options=i.utils.optionsFunc.bind(L),L._options=Object.create({},{width:{get:function(){return y},set:function(g){y=g}},height:{get:function(){return w},set:function(g){w=g}},showLegend:{get:function(){return G},set:function(g){G=g}},showXAxis:{get:function(){return P},set:function(g){P=g}},showYAxis:{get:function(){return tt},set:function(g){tt=g}},defaultState:{get:function(){return K},set:function(g){K=g}},noData:{get:function(){return V},set:function(g){V=g}},showControls:{get:function(){return j},set:function(g){j=g}},controlLabels:{get:function(){return et},set:function(g){et=g}},controlOptions:{get:function(){return z},set:function(g){z=g}},showTotalInTooltip:{get:function(){return q},set:function(g){q=g}},totalLabel:{get:function(){return H},set:function(g){H=g}},margin:{get:function(){return v},set:function(g){v.top=g.top!==void 0?g.top:v.top,v.right=g.right!==void 0?g.right:v.right,v.bottom=g.bottom!==void 0?g.bottom:v.bottom,v.left=g.left!==void 0?g.left:v.left}},duration:{get:function(){return S},set:function(g){S=g,pt.reset(S),u.duration(S),m.duration(S),E.duration(S)}},color:{get:function(){return T},set:function(g){T=i.utils.getColor(g),x.color(T),u.color(T)}},rightAlignYAxis:{get:function(){return N},set:function(g){N=g,E.orient(N?"right":"left")}},useInteractiveGuideline:{get:function(){return I},set:function(g){I=!!g,L.interactive(!g),L.useVoronoi(!g),u.scatter.interactive(!g)}}}),i.utils.inheritOptions(L,u),i.utils.initOptions(L),L},i.models.sunburst=function(){var u={top:0,right:0,bottom:0,left:0},m=600,E=600,x="count",F={count:function(L){return 1},value:function(L){return L.value||L.size},size:function(L){return L.value||L.size}},A=Math.floor(Math.random()*1e4),d=null,v=i.utils.defaultColor(),y=!1,w=function(L){return x==="count"?L.name+" #"+L.value:L.name+" "+(L.value||L.size)},T=.02,j=function(L,g){return L.name>g.name},G=function(L,g){return L.name},P=!0,tt=500,N=d3.dispatch("chartClick","elementClick","elementDblClick","elementMousemove","elementMouseover","elementMouseout","renderEnd"),I=d3.scale.linear().range([0,2*Math.PI]),q=d3.scale.sqrt(),H=d3.layout.partition().sort(j),b,W,O,K,V={},rt=d3.svg.arc().startAngle(function(L){return Math.max(0,Math.min(2*Math.PI,I(L.x)))}).endAngle(function(L){return Math.max(0,Math.min(2*Math.PI,I(L.x+L.dx)))}).innerRadius(function(L){return Math.max(0,q(L.y))}).outerRadius(function(L){return Math.max(0,q(L.y+L.dy))});function p(L){var g=z(L);return g>90?180:0}
vendor: 4,298 bytes, line 25
25function z(L){var g=Math.max(0,Math.min(2*Math.PI,I(L.x))),B=Math.max(0,Math.min(2*Math.PI,I(L.x+L.dx))),J=(g+B)/2*(180/Math.PI)-90;return J}function et(L){var g=Math.max(0,Math.min(2*Math.PI,I(L.x))),B=Math.max(0,Math.min(2*Math.PI,I(L.x+L.dx))),J=B-g;return J>T}function S(L,g){var B=d3.interpolate(I.domain(),[b.x,b.x+b.dx]),J=d3.interpolate(q.domain(),[b.y,1]),ot=d3.interpolate(q.range(),[b.y?20:0,K]);return g===0?function(){return rt(L)}:function(ht){return I.domain(B(ht)),q.domain(J(ht)).range(ot(ht)),rt(L)}}function M(L){var g=d3.interpolate({x:L.x0,dx:L.dx0,y:L.y0,dy:L.dy0},L);return function(B){var J=g(B);return L.x0=J.x,L.dx0=J.dx,L.y0=J.y,L.dy0=J.dy,rt(J)}}function nt(L){var g=G(L);V[g]||(V[g]={});var B=V[g];B.dx=L.dx,B.x=L.x,B.dy=L.dy,B.y=L.y}function pt(L){L.forEach(function(g){var B=G(g),J=V[B];J?(g.dx0=J.dx,g.x0=J.x,g.dy0=J.dy,g.y0=J.y):(g.dx0=g.dx,g.x0=g.x,g.dy0=g.dy,g.y0=g.y),nt(g)})}function xt(L){var g=d.selectAll("text"),B=d.selectAll("path");g.transition().attr("opacity",0),b=L,B.transition().duration(tt).attrTween("d",S).each("end",function(J){if(J.x>=L.x&&J.x<L.x+L.dx&&J.depth>=L.depth){var ot=d3.select(this.parentNode),ht=ot.select("text");ht.transition().duration(tt).text(function(vt){return w(vt)}).attr("opacity",function(vt){return et(vt)?1:0}).attr("transform",function(){var vt=this.getBBox().width;if(J.depth===0)return"translate("+vt/2*-1+",0)";if(J.depth===L.depth)return"translate("+(q(J.y)+5)+",0)";var at=z(J),yt=p(J);return yt===0?"rotate("+at+")translate("+(q(J.y)+5)+",0)":"rotate("+at+")translate("+(q(J.y)+vt+5)+",0)rotate("+yt+")"})}})}var st=i.utils.renderWatch(N);function R(L){return st.reset(),L.each(function(g){d=d3.select(this),W=i.utils.availableWidth(m,d,u),O=i.utils.availableHeight(E,d,u),K=Math.min(W,O)/2,q.range([0,K]);var B=d.select("g.nvd3.nv-wrap.nv-sunburst");B[0][0]||(B=d.append("g").attr("class","nvd3 nv-wrap nv-sunburst nv-chart-"+A).attr("transform","translate("+W/2+","+O/2+")")),d.on("click",function(vt,at){N.chartClick({data:vt,index:at,pos:d3.event,id:A})}),H.value(F[x]||F.count);var J=H.nodes(g[0]).reverse();pt(J);var ot=B.selectAll(".arc-container").data(J,G),ht=ot.enter().append("g").attr("class","arc-container");ht.append("path").attr("d",rt).style("fill",function(vt){return vt.color?vt.color:v(P?(vt.children?vt:vt.parent).name:vt.name)}).style("stroke","#FFF").on("click",xt).on("mouseover",function(vt,at){d3.select(this).classed("hover",!0).style("opacity",.8),N.elementMouseover({data:vt,color:d3.select(this).style("fill")})}).on("mouseout",function(vt,at){d3.select(this).classed("hover",!1).style("opacity",1),N.elementMouseout({data:vt})}).on("mousemove",function(vt,at){N.elementMousemove({data:vt})}),ot.each(function(vt){d3.select(this).select("path").transition().duration(tt).attrTween("d",M)}),y&&(ot.selectAll("text").remove(),ot.append("text").text(function(vt){return w(vt)}).transition().duration(tt).attr("opacity",function(vt){return et(vt)?1:0}).attr("transform",function(vt){var at=this.getBBox().width;if(vt.depth===0)return"rotate(0)translate("+at/2*-1+",0)";var yt=z(vt),D=p(vt);return D===0?"rotate("+yt+")translate("+(q(vt.y)+5)+",0)":"rotate("+yt+")translate("+(q(vt.y)+at+5)+",0)rotate("+D+")"})),xt(J[J.length-1]),ot.exit().transition().duration(tt).attr("opacity",0).each("end",function(vt){var at=G(vt);V[at]=void 0}).remove()}),st.renderEnd("sunburst immediate"),R}return R.dispatch=N,R.options=i.utils.optionsFunc.bind(R),R._options=Object.create({},{width:{get:function(){return m},set:function(L){m=L}},height:{get:function(){return E},set:function(L){E=L}},mode:{get:function(){return x},set:function(L){x=L}},id:{get:function(){return A},set:function(L){A=L}},duration:{get:function(){return tt},set:function(L){tt=L}},groupColorByParent:{get:function(){return P},set:function(L){P=!!L}},showLabels:{get:function(){return y},set:function(L){y=!!L}},labelFormat:{get:function(){return w},set:function(L){w=L}},labelThreshold:{get:function(){return T},set:function(L){T=L}},sort:{get:function(){return j},set:function(L){j=L}},key:{get:function(){return G},set:function(L){G=L}},margin:{get:function(){return u},set:function(L){u.top=L.top!=null?L.top:u.top,u.right=L.right!=null?L.right:u.right,u.bottom=L.bottom!=null?L.bottom:u.bottom,u.left=L.left!=null?L.left
25:u.left}},color:{get:function(){return v},set:function(L){v=i.utils.getColor(L)}}}),i.utils.initOptions(R),R},i.models.sunburstChart=function(){var u=i.models.sunburst(),m=i.models.tooltip(),E={top:30,right:20,bottom:20,left:20},x=null,F=null,A=i.utils.defaultColor(),d=null,v=null,y=250,w=d3.dispatch("stateChange","changeState","renderEnd"),T=i.utils.renderWatch(w);m.duration(0).headerEnabled(!1).valueFormatter(function(G){return G});function j(G){return T.reset(),T.models(u),G.each(function(P){var tt=d3.select(this);i.utils.initSVG(tt);var N=i.utils.availableWidth(x,tt,E),I=i.utils.availableHeight(F,tt,E);if(j.update=function(){y===0?tt.call(j):tt.transition().duration(y).call(j)},j.container=tt,!P||!P.length)return i.utils.noData(j,tt),j;tt.selectAll(".nv-noData").remove(),u.width(N).height(I),tt.call(u)}),T.renderEnd("sunburstChart immediate"),j}return u.dispatch.on("elementMouseover.tooltip",function(G){G.series={key:G.data.name,value:G.data.value||G.data.size,color:G.color},m.data(G).hidden(!1)}),u.dispatch.on("elementMouseout.tooltip",function(G){m.hidden(!0)}),u.dispatch.on("elementMousemove.tooltip",function(G){m()}),j.dispatch=w,j.sunburst=u,j.tooltip=m,j.options=i.utils.optionsFunc.bind(j),j._options=Object.create({},{noData:{get:function(){return v},set:function(G){v=G}},defaultState:{get:function(){return d},set:function(G){d=G}},color:{get:function(){return A},set:function(G){A=G,u.color(A)}},duration:{get:function(){return y},set:function(G){y=G,T.reset(y),u.duration(y)}},margin:{get:function(){return E},set:function(G){E.top=G.top!==void 0?G.top:E.top,E.right=G.right!==void 0?G.right:E.right,E.bottom=G.bottom!==void 0?G.bottom:E.bottom,E.left=G.left!==void 0?G.left:E.left}}}),i.utils.inheritOptions(j,u),i.utils.initOptions(j),j},i.version="1.8.3"})()},{d3:19}],24:[function($t,te,ue){te.exports=window.nunjucks},{}],25:[function($t,te,ue){var i=$t("babel-runtime/core-js/object/create").default,u=$t("babel-runtime/helpers/interop-require-default").default;Object.defineProperty(ue,"__esModule",{value:!0}),$t("dom4"),$t("document-register-element");var m=$t("./views/publicidad/PublicidadMainView"),E=u(m),x=$t("./views/publicidad/RankingAudienciaView"),F=u(x);function A(v,y){var w={default:E.default,ranking:F.default},T=v.el.data();return y&&(v.pubsub=y),T.theme?w[T.theme.toLowerCase()]?new w[T.theme.toLowerCase()](v):new w.default(v):new w.default(v)}function d(v,y){var w={createdCallback:{value:function(){},enumerable:!1},attachedCallback:{value:function(){this.widget=y({el:$(this)},typeof evt_agr<"u"?evt_agr:null)},enumerable:!1},attributeChangedCallback:{value:function(G){var P=new RegExp("^data-opta-.*","gi");(G=="data-config"||P.test(G))&&(this.detachedCallback(),this.attachedCallback())},enumerable:!1},detachedCallback:{value:function(){},enumerable:!1}},T=i(HTMLElement.prototype,w);document.registerElement(v,{prototype:T})}d("atresmedia-publicidad",A),ue.default=A,te.exports=ue.default},{"./views/publicidad/PublicidadMainView":34,"./views/publicidad/RankingAudienciaView":35,"babel-runtime/core-js/object/create":2,"babel-runtime/helpers/interop-require-default":3,"document-register-element":20,dom4:21}],26:[function($t,te,ue){Object.defineProperty(ue,"__esModule",{value:!0});var i={a3:"Antena 3",la1:"La 1",la2:"La 2",t5:"Tele5",cuatro:"Cuatro",lasexta:"La Sexta",neox:"Neox",nova:"Nova",mega:"Mega",fdf:"FDF",energy:"Energy",divinity:"Divinity",discoverymax:"Discovery Max",trecetv:"13tv",clantv:"Clan"};ue.names=i;var u={default:"#d8c300",a3:"#ff8b00",la1:"#1b32e6",la2:"#00c7ec",t5:"#00a5db",cuatro:"#ff0000",lasexta:"#00b300",autonomicas:"#0075a7"};ue.colors=u},{}],27:[function($t,te,ue){var i=$t("babel-runtime/core-js/object/create").default,u=$t("babel-runtime/helpers/interop-require-default").default,m=$t("./discreteBarCustom");u(m),te.exports=nv.models.discreteBarChart=function(){var E=nv.models.discreteBar(),x=nv.models.axis(),F=nv.models.axis(),A=nv.models.legend(),d=nv.models.tooltip(),v={top:15,right:10,bottom:50,left:60},y=null,w=null,T=null,j=nv.utils.getColor(),G=!1,P=!0,tt=!0,N=!1,I=!1,q=!1,H=0,b,W,O=null,K=d3.dispatch("beforeUpdate","renderEnd"),V=250;x.orient("bottom").showMaxMin(!1).tickFormat(function(z){return z}),F.orient(N?"right":"left").tickFormat(d3.format(",.1f")),d.duration(0).headerEnabled(!1).valueFormatter(function(z,et){return F.tickFormat()(z,et)}).keyFormatter(function(z,et){return x.tickFormat()(z,et)});var rt=nv.utils.renderWatch(K,V);function p(z){return rt.reset(),rt.models(E),P&&rt.models(x),tt&&rt.models(F),z.each(function(et){var S=d3.select(this);nv.utils.initSVG(S);var M=nv.utils.availableWidth(w,S,v),nt=nv.utils.availableHeight(T,S,v);if(p.update=function(){K.beforeUpdate(),S.transition().duration(V).call(p)},p.container=this,!et||!et.length||!et.filter(function(B){return B.values.length}).length)return nv.utils.noData(p,S),p;S.selectAll(".nv-noData").remove(),b=E.xScale(),W=E.yScale().clamp(!0);var pt=S.selectAll("g.nv-wrap.nv-discreteBarWithAxes").data([et]),xt=pt.enter().append("g").attr("class","nvd3 nv-wrap nv-discreteBarWithAxes").append("g"),st=xt.append("defs"),R=pt.select("g");xt.append("g").attr("class","nv-x nv-axis"),xt.append("g").attr("class","nv-y nv-axis").append("g").attr("class","nv-zeroLine").append("line"),xt.append("g").attr("class","nv-barsWrap"),xt.append("g").attr("class","nv-legendWrap"),R.attr("transform","translate("+v.left+","+v.top+")"),G?(A.width(M),R.select(".nv-legendWrap").datum(et).call(A),!y&&A.height()!==v.top&&(v.top=A.height(),nt=nv.utils.availableHeight(T,S,v)),pt.select(".nv-legendWrap").attr("transform","translate(0,"+-v.top+")")):R.select(".nv-legendWrap").selectAll("*").remove(),N&&R.select(".nv-y.nv-axis").attr("transform","translate("+M+",0)"),E.width(M).height(nt);var L=R.select(".nv-barsWrap").datum(et.filter(function(B){return!B.disabled}));if(L.transition().call(E),st.append("clipPath").attr("id","nv-x-label-clip-"+E.id()).append("rect"),R.select("#nv-x-label-clip-"+E.id()+" rect").attr("width",b.rangeBand()*(I?2:1)).attr("height",16).attr("x",-b.rangeBand()/(I?1:2)),P){x.scale(b)._ticks(nv.utils.calcTicksX(M/100,et)).tickSize(-nt,0),R.select(".nv-x.nv-axis").attr("transform","translate(0,"+(W.range()[0]+(E.showValues()&&W.domain()[0]<0?16:0))+")"),R.select(".nv-x.nv-axis").call(x);var g=R.select(".nv-x.nv-axis").selectAll("g");I&&g.selectAll("text").attr("transform",function(B,J,ot){return"translate(0,"+(ot%2==0?"5":"17")+")"}),H&&g.selectAll(".tick text").attr("transform","rotate("+H+" 0,0)").style("text-anchor",H>0?"start":"end"),q&&R.selectAll(".tick text").call(nv.utils.wrapTicks,p.xAxis.rangeBand())}tt&&(F.scale(W)._ticks(nv.utils.calcTicksY(nt/36,et,E.y())).tickSize(-M,0),R.select(".nv-y.nv-axis").call(F)),R.select(".nv-zeroLine line").attr("x1",0).attr("x2",N?-M:M).attr("y1",W(0)).attr("y2",W(0))}),rt.renderEnd("discreteBar chart immediate"),p}return E.dispatch.on("elementMouseover.tooltip",function(z){z.series={key:p.x()(z.data),value:p.y()(z.data),color:z.color},d.data(z).hidden(!1)}),E.dispatch.on("elementMouseout.tooltip",function(z){d.hidden(!0)}),E.dispatch.on("elementMousemove.tooltip",function(z){d()}),p.dispatch=K,p.discretebar=E,p.legend=A,p.xAxis=x,p.yAxis=F,p.tooltip=d,p.options=nv.utils.optionsFunc.bind(p),p._options=i({},{width:{get:function(){return w},set:function(et){w=et}},height:{get:function(){return T},set:function(et){T=et}},showLegend:{get:function(){return G},set:function(et){G=et}},staggerLabels:{get:function(){return I},set:function(et){I=et}},rotateLabels:{get:function(){return H},set:function(et){H=et}},wrapLabels:{get:function(){return q},set:function(et){q=!!et}},showXAxis:{get:function(){return P},set:function(et){P=et}},showYAxis:{get:function(){return tt},set:function(et){tt=et}},noData:{get:function(){return O},set:function(et){O=et}},margin:{get:function(){return v},set:function(et){et.top!==void 0&&(v.top=et.top,y=et.top),v.right=et.right!==void 0?et.right:v.right,v.bottom=et.bottom!==void 0?et.bottom:v.bottom,v.left=et.left!==void 0?et.left:v.left}},duration:{get:function(){return V},set:function(et){V=et,rt.reset(V),E.duration(V),x.duration(V),F.duration(V)}},color:{get:function(){return j},set:function(et){j=nv.utils.getColor(et),E.color(j),A.color(j)}},rightAlignYAxis:{get:function(){return N},set:function(et){N=et,F.orient(et?"right":"left")}}}),nv.utils.inheritOptions(p,E),nv.utils.initOptions(p),p}},{"./discreteBarCustom":28,"babel-runtime/core-js/object/create":2,"babel-runtime/helpers/interop-require-default":3}],28:[function($t,te,ue){var i=$t("babel-runtime/core-js/object/create").default;function u(){var m={top:0,right:0,bottom:0,left:0},E=960,x=500,F=Math.floor(Math.random()*1e4),A,d=d3.scale.ordinal(),v=d3.scale.linear(),y=function(z){return z.x},w=function(z){return z.y},T=[0],j=nv.utils.defaultColor(),G=!1,P=d3.format(",.2f"),tt,N,I,q,H=d3.dispatch("chartClick","elementClick","elementDblClick","elementMouseover","elementMouseout","elementMousemove","renderEnd"),b="discreteBar",W="",O=250,K,V=nv.utils.renderWatch(H,O);function rt(p){return V.reset(),p.each(function(z){var et=E-m.left-m.right,S=x-m.top-m.bottom;A=d3.select(this),nv.utils.initSVG(A),z.forEach(function(g,B){g.values.forEac
25h(function(J){J.series=B})});var M=tt&&N?[]:z.map(function(g){return g.values.map(function(B,J){return{x:y(B,J),y:w(B,J),y0:B.y0}})});d.domain(tt||d3.merge(M).map(function(g){return g.x})).rangeBands(I||[0,et],.1),v.domain(N||d3.extent(d3.merge(M).map(function(g){return g.y}).concat(T))),G?v.range(q||[S-(v.domain()[0]<0?12:0),v.domain()[1]>0?12:0]):v.range(q||[S,0]),K=K||v.copy().range([v(0),v(0)]);var nt=A.selectAll("g.nv-wrap.nv-discretebar").data([z]),pt=nt.enter().append("g").attr("class","nvd3 nv-wrap nv-discretebar"),xt=pt.append("g");nt.select("g"),xt.append("g").attr("class","nv-groups"),nt.attr("transform","translate("+m.left+","+m.top+")");var st=nt.select(".nv-groups").selectAll(".nv-group").data(function(g){return g},function(g){return g.key});st.enter().append("g").style("stroke-opacity",1e-6).style("fill-opacity",1e-6),st.exit().watchTransition(V,"discreteBar: exit groups").style("stroke-opacity",1e-6).style("fill-opacity",1e-6).remove(),st.attr("class",function(g,B){return"nv-group nv-series-"+B}).classed("hover",function(g){return g.hover}),st.watchTransition(V,"discreteBar: groups").style("stroke-opacity",1).style("fill-opacity",.75);var R=st.selectAll("g.nv-bar").data(function(g){return g.values});R.exit().remove();var L=R.enter().append("g").attr("transform",function(g,B,J){return"translate("+(d(y(g,B))+d.rangeBand()*.05)+", "+v(0)+")"}).on("mouseover",function(g,B){d3.select(this).classed("hover",!0),H.elementMouseover({data:g,index:B,color:d3.select(this).style("fill")})}).on("mouseout",function(g,B){d3.select(this).classed("hover",!1),H.elementMouseout({data:g,index:B,color:d3.select(this).style("fill")})}).on("mousemove",function(g,B){H.elementMousemove({data:g,index:B,color:d3.select(this).style("fill")})}).on("click",function(g,B){var J=this;H.elementClick({data:g,index:B,color:d3.select(this).style("fill"),event:d3.event,element:J}),d3.event.stopPropagation()}).on("dblclick",function(g,B){H.elementDblClick({data:g,index:B,color:d3.select(this).style("fill")}),d3.event.stopPropagation()});L.append("rect").attr("height",0).attr("width",d.rangeBand()*.9/z.length),L.append("image").attr("height",40).attr("width",d.rangeBand()*.9/z.length),G?(L.append("text").attr("text-anchor","middle"),R.select("text").text(function(g,B){return P(w(g,B))}).watchTransition(V,"discreteBar: bars text").attr("x",d.rangeBand()*.9/2).attr("y",function(g,B){return w(g,B)<0?v(w(g,B))-v(0)+12:-4}),R.select("image").watchTransition(V,"discreteBar: bars").attr("xlink:href",W).attr("y",function(g,B){return v(0)-v(w(g,B))+5}).attr("width",d.rangeBand()*.9/z.length)):R.selectAll("text").remove(),R.attr("class",function(g,B){return w(g,B)<0?"nv-bar negative":"nv-bar positive"}).style("fill",function(g,B){return g.color||j(g,B)}).style("stroke",function(g,B){return g.color||j(g,B)}).select("rect").attr("class",b).watchTransition(V,"discreteBar: bars rect").attr("width",d.rangeBand()*.9/z.length),R.watchTransition(V,"discreteBar: bars").attr("transform",function(g,B){var J=d(y(g,B))+d.rangeBand()*.05,ot=w(g,B)<0?v(0):v(0)-v(w(g,B))<1?v(0)-1:v(w(g,B));return"translate("+J+", "+ot+")"}).select("rect").attr("height",function(g,B){return Math.max(Math.abs(v(w(g,B))-v(0)),1)}),d.copy(),K=v.copy()}),V.renderEnd("discreteBar immediate"),rt}return rt.dispatch=H,rt.options=nv.utils.optionsFunc.bind(rt),rt._options=i({},{width:{get:function(){return E},set:function(z){E=z}},height:{get:function(){return x},set:function(z){x=z}},forceY:{get:function(){return T},set:function(z){T=z}},showValues:{get:function(){return G},set:function(z){G=z}},x:{get:function(){return y},set:function(z){y=z}},y:{get:function(){return w},set:function(z){w=z}},xScale:{get:function(){return d},set:function(z){d=z}},yScale:{get:function(){return v},set:function(z){v=z}},xDomain:{get:function(){return tt},set:function(z){tt=z}},yDomain:{get:function(){return N},set:function(z){N=z}},xRange:{get:function(){return I},set:function(z){I=z}},yRange:{get:function(){return q},set:function(z){q=z}},valueFormat:{get:function(){return P},set:function(z){P=z}},id:{get:function(){return F},set:function(z){F=z}},rectClass:{get:function(){return b},set:function(z){b=z}},imageHref:{get:function(){return W},set:function(z){W=z}},margin:{get:function(){return m},set:function(z){m.top=z.top!==void 0?z.top:m.top,m.right=z.right!==void 0?z.right:m.right,m.bottom=z.bottom!==void 0?z.bottom:m.bottom,m.left=z.left!==void 0?z.left:m.left}},color:{get:function(){return j},set:function(z){j=nv.utils.getColor(z)}},duration:{get:function(){return O},set:function(z){O=z,V.reset(O)}}}),nv.utils.initOptions(rt),rt}te.exports=nv.models.discreteBar=u},{"babel-runtime/core-js/object/create":2}],29:[function($t,te,ue){te.exports=function(){var i=document.attachEvent,u=!1;if(!i){var m=function(){var N=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(I){return window.setTimeout(I,20)};return function(I){return N(I)}}(),E=function(){var N=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout;return function(I){return N(I)}}();window.resetTriggers=function(I){var q=I.__resizeTriggers__,H=q.firstElementChild,b=q.lastElementChild,W=H.firstElementChild;b.scrollLeft=b.scrollWidth,b.scrollTop=b.scrollHeight,W.style.width=H.offsetWidth+1+"px",W.style.height=H.offsetHeight+1+"px",H.scrollLeft=H.scrollWidth,H.scrollTop=H.scrollHeight},window.checkTriggers=function(I){return I.offsetWidth!=I.__resizeLast__.width||I.offsetHeight!=I.__resizeLast__.height},window.scrollListener=function(I){var q=this;resetTriggers(this),this.__resizeRAF__&&E(this.__resizeRAF__),this.__resizeRAF__=m(function(){checkTriggers(q)&&(q.__resizeLast__.width=q.offsetWidth,q.__resizeLast__.height=q.offsetHeight,q.__resizeListeners__.forEach(function(H){H.call(q,I)}))})};var x=!1,F="",A="animationstart",d="Webkit Moz O ms".split(" "),v="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),y="";{var w=document.createElement("fakeelement");
25if(w.style.animationName!==void 0&&(x=!0),x===!1){for(var T=0;T<d.length;T++)if(w.style[d[T]+"AnimationName"]!==void 0){y=d[T],F="-"+y.toLowerCase()+"-",A=v[T],x=!0;break}}}var j="resizeanim",G="@"+F+"keyframes "+j+" { from { opacity: 0; } to { opacity: 0; } } ",P=F+"animation: 1ms "+j+"; "}function tt(){if(!u){var N=(G||"")+".resize-triggers { "+(P||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',I=document.head||document.getElementsByTagName("head")[0],q=document.createElement("style");q.type="text/css",q.styleSheet?q.styleSheet.cssText=N:q.appendChild(document.createTextNode(N)),I.appendChild(q),u=!0}}window.addResizeListener=function(N,I){i?N.attachEvent("onresize",I):(N.__resizeTriggers__||(getComputedStyle(N).position=="static"&&(N.style.position="relative"),tt(),N.__resizeLast__={},N.__resizeListeners__=[],(N.__resizeTriggers__=document.createElement("div")).className="resize-triggers",N.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',N.appendChild(N.__resizeTriggers__),resetTriggers(N),N.addEventListener("scroll",scrollListener,!0),A&&N.__resizeTriggers__.addEventListener(A,function(q){q.animationName==j&&resetTriggers(N)})),N.__resizeListeners__.push(I))},window.removeResizeListener=function(N,I){i?N.detachEvent("onresize",I):(N.__resizeListeners__.splice(N.__resizeListeners__.indexOf(I),1),N.__resizeListeners__.length||(N.removeEventListener("scroll",scrollListener),N.__resizeTriggers__=!N.removeChild(N.__resizeTriggers__)))}}},{}],30:[function($t,te,ue){var i=$t("nunjucks"),u=i.env||new i.Environment,m=function(){function E(d,v,y,w,T){var j=null,G=null,P="";try{v.getBlock("title")(d,v,y,w,function(tt,N){if(tt){T(tt);return}P+=N,P+=`\r 26\r 27`,v.getBlock("content")(d,v,y,w,function(I,q){if(I){T(I);return}P+=q,P+=`\r 28\r 29`,v.getBlock("chart")(d,v,y,w,function(H,b){if(H){T(H);return}P+=b,P+=`\r 30`,T(null,P)})})})}catch(tt){T(w.handleError(tt,j,G))}}function x(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 31<h4>`,P+=w.suppressValue(w.contextOrFrameLookup(v,y,"title"),d.opts.autoescape),P+=`</h4>\r 32`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}function F(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 33<!--\r 34<ul>\r 35`,y=y.push();var tt=w.contextOrFrameLookup(v,y,"results");if(tt)for(var N=tt.length,I=0;I<tt.length;I++){var q=tt[I];y.set("channel",q),y.set("loop.index",I+1),y.set("loop.index0",I),y.set("loop.revindex",N-I),y.set("loop.revindex0",N-I-1),y.set("loop.first",I===0),y.set("loop.last",I===N-1),y.set("loop.length",N),P+=`\r 36 <li>`,P+=w.suppressValue(w.memberLookup(q,"name",d.opts.autoescape),d.opts.autoescape),P+=" --- ",P+=w.suppressValue(w.memberLookup(q,"value",d.opts.autoescape),d.opts.autoescape),P+=`</li>\r 37`}y=y.pop(),P+=`\r 38</ul>\r 39-->\r 40`,T(null,P)}catch(H){T(w.handleError(H,j,G))}}function A(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 41<div id="chart"><svg></svg></div>\r 42`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}return{b_title:x,b_content:F,b_chart:A,root:E}}();te.exports=$t("nunjucksify/runtime-shim")(i,u,m,$t)},{nunjucks:24,"nunjucksify/runtime-shim":22}],31:[function($t,te,ue){var i=$t("nunjucks"),u=i.env||new i.Environment;$t("./MainGraphTemplate.nunj");var m=function(){function E(d,v,y,w,T){var j=null,G=null,P="";try{d.getTemplate("./MainGraphTemplate.nunj",!0,void 0,function(tt,N){if(tt){T(tt);return}for(var I in N.blocks)v.addBlock(I,N.blocks[I]);P+=`\r 43`,P+=`\r 44\r 45`,P+=`\r 46\r 47\r 48`,P+=`\r 49\r 50`,N.rootRenderFunc(d,v,y,w,T)})}catch(tt){T(w.handleError(tt,j,G))}}function x(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 51\r 52`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}function F(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 53\r 54 `;var tt;tt=d.getFilter("random").call(v,(j=7,G=23,w.callWrap(w.contextOrFrameLookup(v,y,"range"),"range",[1,1e4]))),y.set("chartUDID",tt,!0),y.parent||(v.setVariable("chartUDID",tt),v.addExport("chartUDID")),P+=`\r 55\r 56 <ul class="nav nav-tabs">\r 57 `,y=y.push();var N=w.contextOrFrameLookup(v,y,"results");if(N)for(var I=N.length,q=0;q<N.length;q++){var H=N[q];
57y.set("tab",H),y.set("loop.index",q+1),y.set("loop.index0",q),y.set("loop.revindex",I-q),y.set("loop.revindex0",I-q-1),y.set("loop.first",q===0),y.set("loop.last",q===I-1),y.set("loop.length",I),P+=`\r 58 <li role="tablist" `,w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape)==0&&(P+=' class="active" '),P+=' data-tab-index="',P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+=`">\r 59 <a href="#tab_`,P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+="_",P+=w.suppressValue(w.contextOrFrameLookup(v,y,"chartUDID"),d.opts.autoescape),P+='" aria-controls="tab_',P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+="_",P+=w.suppressValue(w.contextOrFrameLookup(v,y,"chartUDID"),d.opts.autoescape),P+='" role="tab" data-toggle="tab" data-tab-idx="',P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+='">',P+=w.suppressValue(w.memberLookup(H,"label",d.opts.autoescape),d.opts.autoescape),P+=`</a>\r 60 </li>\r 61 `}y=y.pop(),P+=`\r 62 </ul>\r 63\r 64 <div class="tab-content">\r 65 `,y=y.push();var b=w.contextOrFrameLookup(v,y,"results");if(b)for(var W=b.length,O=0;O<b.length;O++){var K=b[O];y.set("tab",K),y.set("loop.index",O+1),y.set("loop.index0",O),y.set("loop.revindex",W-O),y.set("loop.revindex0",W-O-1),y.set("loop.first",O===0),y.set("loop.last",O===W-1),y.set("loop.length",W),P+=`\r 66 \r 67 <div role="tabpanel" class="tab-pane `,w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape)==0&&(P+=" active "),P+='" id="tab_',P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+="_",P+=w.suppressValue(w.contextOrFrameLookup(v,y,"chartUDID"),d.opts.autoescape),P+=`">\r 68\r 69 <div id="chart">\r 70 <svg class="svg-tab_`,P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+=`"></svg>\r 71 </div>\r 72\r 73 `;var V;V=w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),y.set("tab_index",V,!0),y.parent||(v.setVariable("tab_index",V),v.addExport("tab_index")),P+=`\r 74 <ul class="categories">\r 75 `,y=y.push();var rt=w.memberLookup(K,"indexs",d.opts.autoescape);if(rt)for(var p=rt.length,z=0;z<rt.length;z++){var et=rt[z];y.set("category",et),y.set("loop.index",z+1),y.set("loop.index0",z),y.set("loop.revindex",p-z),y.set("loop.revindex0",p-z-1),y.set("loop.first",z===0),y.set("loop.last",z===p-1),y.set("loop.length",p),P+=`\r 76 \r 77 <li style="display: inline; list-style-type: none; padding-right: 5px;">\r 78 <a href="#" class="tab-index" data-cat="`,P+=w.suppressValue(w.contextOrFrameLookup(v,y,"tab_index"),d.opts.autoescape),P+="_",P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+=`" \r 79 `,w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape)==0&&(P+=' style="color: #fd4c07;" '),P+=' data-index-idx="',P+=w.suppressValue(w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape),d.opts.autoescape),P+='" >',P+=w.suppressValue(w.memberLookup(et,"name",d.opts.autoescape),d.opts.autoescape),P+=`</a>\r 80 </li>\r 81\r 82 `,w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index",d.opts.autoescape)!=w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"length",d.opts.autoescape)&&(P+=` \r 83 <li style="display: inline; list-style-type: none; padding-right: 5px;">\r 84 |\r 85 </li>\r 86 `),P+=`\r 87\r 88 `}if(y=y.pop(),P+=`\r 89 </ul>\r 90 `,w.memberLookup(w.contextOrFrameLookup(v,y,"loop"),"index0",d.opts.autoescape)==0){P+=` \r 91 `;var S;S=d.getFilter("int").call(v,w.memberLookup(w.memberLookup(w.memberLookup(w.memberLookup(w.memberLookup(K,"indexs",d.opts.autoescape),0,d.opts.autoescape),"channels",d.opts.autoescape),0,d.opts.autoescape),"value",d.opts.autoescape)),y.set("value",S,!0),y.parent||(v.setVariable("value",S),v.addExport("value")),P+=`\r 92 \r 93 `,w.contextOrFrameLookup(v,y,"value")>
93100&&(P+=' <span style="font-size:10px!important; font-weight: bold;">* Valores en miles </span> '),P+=`\r 94 `}P+=`\r 95 </div>\r 96\r 97 `}y=y.pop(),P+=`\r 98 </div>\r 99\r 100`,T(null,P)}catch(M){T(w.handleError(M,j,G))}}function A(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 101\r 102`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}return{b_title:x,b_content:F,b_chart:A,root:E}}();te.exports=$t("nunjucksify/runtime-shim")(i,u,m,$t)},{"./MainGraphTemplate.nunj":30,nunjucks:24,"nunjucksify/runtime-shim":22}],32:[function($t,te,ue){var i=$t("nunjucks"),u=i.env||new i.Environment;$t("./MainGraphTemplate.nunj");var m=function(){function E(d,v,y,w,T){var j=null,G=null,P="";try{d.getTemplate("./MainGraphTemplate.nunj",!0,void 0,function(tt,N){if(tt){T(tt);return}for(var I in N.blocks)v.addBlock(I,N.blocks[I]);P+=`\r 103`,P+=`\r 104\r 105`,P+=`\r 106\r 107\r 108`,P+=`\r 109`,N.rootRenderFunc(d,v,y,w,T)})}catch(tt){T(w.handleError(tt,j,G))}}function x(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 110\r 111`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}function F(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 112 `;var tt;tt=w.memberLookup(w.memberLookup(w.memberLookup(w.memberLookup(w.memberLookup(w.memberLookup(w.contextOrFrameLookup(v,y,"tabs"),0,d.opts.autoescape),"indexs",d.opts.autoescape),0,d.opts.autoescape),"programs",d.opts.autoescape),0,d.opts.autoescape),"tweets",d.opts.autoescape),y.set("mayorTweets",tt,!0),y.parent||(v.setVariable("mayorTweets",tt),v.addExport("mayorTweets")),P+=`\r 113 `,y=y.push();var N=w.contextOrFrameLookup(v,y,"tabs");if(N)for(var I=N.length,q=0;q<N.length;q++){var H=N[q];y.set("tab",H),y.set("loop.index",q+1),y.set("loop.index0",q),y.set("loop.revindex",I-q),y.set("loop.revindex0",I-q-1),y.set("loop.first",q===0),y.set("loop.last",q===I-1),y.set("loop.length",I),P+=`\r 114 `,y=y.push();var b=w.memberLookup(H,"indexs",d.opts.autoescape);if(b)for(var W=b.length,O=0;O<b.length;O++){var K=b[O];y.set("index",K),y.set("loop.index",O+1),y.set("loop.index0",O),y.set("loop.revindex",W-O),y.set("loop.revindex0",W-O-1),y.set("loop.first",O===0),y.set("loop.last",O===W-1),y.set("loop.length",W),P+=`\r 115 <div class="ranking-container clearfix">\r 116 `,y=y.push();var V=w.memberLookup(K,"programs",d.opts.autoescape);if(V)for(var rt=V.length,p=0;p<V.length;p++){var z=V[p];y.set("program",z),y.set("loop.index",p+1),y.set("loop.index0",p),y.set("loop.revindex",rt-p),y.set("loop.revindex0",rt-p-1),y.set("loop.first",p===0),y.set("loop.last",p===rt-1),y.set("loop.length",rt),P+=`\r 117\r 118 <div class="linea-ranking"> `,P+=w.suppressValue(w.memberLookup(z,"name",d.opts.autoescape),d.opts.autoescape),P+=`\r 119 <div class="linea-ranking">\r 120 <div id="resultados" class="barra-votos">\r 121 <img class="img-channel" src="https://cdnjs.atresmedia.com/atresmedia_audiencias/latest/static/images/logos_publicidad/`,P+=w.suppressValue(w.memberLookup(z,"channel",d.opts.autoescape),d.opts.autoescape),P+=`.svg" />\r 122 <div class="porcentaje-color" style="background-color: #fd7945; width: `,P+=w.suppressValue(100*w.memberLookup(z,"tweets",d.opts.autoescape)/w.contextOrFrameLookup(v,y,"mayorTweets"),d.opts.autoescape),P+=`%">\r 123 </div>\r 124 <div class="texto-tweets">`,P+=w.suppressValue(w.memberLookup(z,"tweets",d.opts.autoescape),d.opts.autoescape),P+=` tweets </div>\r 125 </div>\r 126 </div>\r 127 </div>\r 128\r 129 `}y=y.pop(),P+=`\r 130 </div>\r 131 `}y=y.pop(),P+=`\r 132 `}y=y.pop(),P+=`\r 133\r 134`,T(null,P)}catch(et){T(w.handleError(et,j,G))}}function A(d,v,y,w,T){var j=null,G=null,P="";try{P+=`\r 135\r 136`,T(null,P)}catch(tt){T(w.handleError(tt,j,G))}}return{b_title:x,b_content:F,b_chart:A,root:E}}();te.exports=$t("nunjucksify/runtime-shim")(i,u,m,$t)},{"./MainGraphTemplate.nunj":30,nunjucks:24,"nunjucksify/runtime-shim":22}],33:[function($t,te,ue){var i=$t("babel-runtime/helpers/interop-require-default").default;Object.defineProperty(ue,"__esModule",{value:!0});var u=$t("../datas/NormalizedNames"),m=$t("../libs/resizeListener"),E=i(m);$t("d3"),$t("nvd3");var x=$t("../libs/discreteBarChartCustom"),F=i(x),A=Backbone.View.extend({pubsub:_.extend({},Backbone.Events),template:$t("../templates/MainGraphTemplate.nunj"),dataUrl:null,colors:u.colors,normalizedNames:u.names,tooltipEnable:!0,initialize:function(v){var y=this;v&&_.extend(this,v);var w=this.$el.data();if(this.dataUrl=w.service||null,this.dataImgPath=w.imgPath||"/public/img/objetivotv/",this.dataImgFormat=w.imgFormat||"svg",!this.dataUrl){console.log("no Datas",this.dataUrl);return}this.getData(this.dataUrl).then(function(T){y.parseXML(T,y.successParse.bind(y))}).fail(function(T){if(T.status!==200){console.warn("Error en el archivo XML",y.dataUrl);return}y.parseXML($(T.responseText),y.successParse.bind(y))})},getData:function(v){return $.ajax({type:"GET",url:v,dataType:"xml",success:function(w){},error:function(){}})},parseXML:function(v,y){y.call(this,this.parser(v))},parser:function(){var v={title:null,results:[]};return v},successParse:function(v){this.renderGraph(v)},getD3Data:function(v){var y=[{key:v.title,values:v.results.map(function(w){return{label:w.name,value:w.value}})}];return y},renderGraph:function(v){this.$el.html(this.template.render(v));var y=this.getD3Data(v),w=this;nv.addGraph(function(){var T=(0,F.default)().x(function(j){return w.normalizedNames[j.label.toLowerCase()]||j.label}).y(function(j){return parseFloat(j.value)}).color(function(j,G){return w.colors[j.label.toLowerCase()]||w.colors.default}).showXAxis(!1).showYAxis(!1).margin({left:0,right:0}).rectClass(function(j){return j.label}).imageHref(function(j){return w.dataImgPath+j.label.toUpperCase().replace(" ","")+"."+w.dataImgFormat}).showValues(!0).valueFormat(function(j){return j>100?j=j.toString().replace(/\B(?=(\d{3})+(?!\d))/g,"."):j=parseFloat(j).toFixed(1),j});return T.tooltip.enabled(w.tooltipEnable),w.chart=T,d3.select($("#chart svg",w.$el)[0]).datum(y).transition().duration(1e3).call(T),nv.utils.windowResize(T.update),T}),typeof addResizeListener>"u"&&(0,E.default)(),addResizeListener(this.$el[0],(function(){typeof this.chart<"u"&&(console.log("resize---update",this),this.chart.update(
136))}).bind(this))},updateGraphData:function(v,y){d3.select(v).datum(y).transition().duration(1e3).call(this.chart)}});ue.default=A,te.exports=ue.default},{"../datas/NormalizedNames":26,"../libs/discreteBarChartCustom":27,"../libs/resizeListener":29,"../templates/MainGraphTemplate.nunj":30,"babel-runtime/helpers/interop-require-default":3,d3:19,nvd3:23}],34:[function($t,te,ue){var i=$t("babel-runtime/core-js/object/assign").default,u=$t("babel-runtime/helpers/interop-require-default").default;Object.defineProperty(ue,"__esModule",{value:!0});var m=$t("../MainView"),E=u(m),x=E.default.extend({template:$t("../../templates/PubliTemplate.nunj"),tooltipEnable:!1,events:{"click .nav-tabs li a":"onTabClickHandler","click .tab-content a.tab-index":"onIndexClickHandler"},colors:{default:"#fd4c07"},onTabClickHandler:function(A){A.preventDefault(),this.selectedTab=$(A.target).data().tabIdx,this.updateGraph(),setTimeout((function(){$('[data-cat="'+this.selectedTab+"_"+this.selectedIndex+'"]',this.$el).trigger("click")}).bind(this),1)},onIndexClickHandler:function(A){A.preventDefault(),$('a[data-index-idx="'+this.selectedIndex+'"]',this.$el).css({color:""}),this.selectedIndex=$(A.target).data().indexIdx,$('a[data-index-idx="'+this.selectedIndex+'"]',this.$el).css({color:this.colors.default}),this.updateGraph()},updateGraph:function(){var A=this.getD3Data(this.resultData),d=$("#chart svg.svg-tab_"+this.selectedTab,this.$el)[0];this.updateGraphData(d,A)},getData:function(A){return $.ajax({type:"GET",url:A,dataType:"json"})},parser:function(A){return A.tabs.forEach(function(d){d.indexs=_.uniq(d.indexs,function(v){return v.name})}),this.resultData={title:A.title,results:A.tabs},this.selectedTab=0,this.selectedIndex=0,this.resultData},getD3Data:function(A){var d=A.results[this.selectedTab],v=d.indexs[this.selectedIndex];if(v.channels){var y=v.channels.sort(function(T,j){return parseFloat(T.value)<parseFloat(j.value)?1:parseFloat(T.value)>parseFloat(j.value)?-1:0});v=i({},v,{channels:y})}var w=[{key:A.title,values:v.channels.map(function(T){return{label:T.name,value:T.value}})}];return w}});ue.default=x,te.exports=ue.default},{"../../templates/PubliTemplate.nunj":31,"../MainView":33,"babel-runtime/core-js/object/assign":1,"babel-runtime/helpers/interop-require-default":3}],35:[function($t,te,ue){var i=$t("babel-runtime/helpers/interop-require-default").default;Object.defineProperty(ue,"__esModule",{value:!0});var u=$t("./PublicidadMainView"),m=i(u),E=m.default.extend({template:$t("../../templates/RankingAudienciaTemplate.nunj"),events:{},getData:function(F){return $.ajax({type:"GET",url:F,dataType:"json"})},parseResponseData:function(F){for(var A,d,v,y=0;y<F.programs.length;y++)F.programs[y].tweets=parseInt(F.programs[y].tweets),A=F.programs[y].name,d=A.trim().split("|"),F.programs[y].name=d.length>1?d[d.length-1].length>0?A:d[0]:A,v=this.normalizedNames[F.programs[y].channel.toLowerCase()],F.programs[y].channel=v?v.toUpperCase().replace(" ",""):F.programs[y].channel.toUpperCase().replace(" ","");return F},parser:function(F){return F.tabs[0].indexs[0]=this.parseResponseData(F.tabs[0].indexs[0]),F.tabs[0].indexs[0].programs=_.first(_.sortBy(F.tabs[0].indexs[0].programs,"tweets").reverse(),3),F},renderGraph:function(F){this.$el.html(this.template.render(F))}});ue.default=E,te.exports=ue.default},{"../../templates/RankingAudienciaTemplate.nunj":32,"./PublicidadMainView":34,"babel-runtime/helpers/interop-require-default":3}]},{},[25])(25)})}(aa)),aa.exports}var Eu=xc();const bc=mc(Eu),kc=yc({__proto__:null,default:bc},[Eu]);export{kc as a};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.