eurostat-map 3.6.53 → 3.6.55

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(self,(function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(){}function a(t){return null==t?i:function(){return this.querySelector(t)}}function o(){return[]}function l(t){return null==t?o:function(){return this.querySelectorAll(t)}}function s(t){return function(){return this.matches(t)}}function u(t){return new Array(t.length)}function c(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function f(t,e,n,r,i,a){for(var o,l=0,s=e.length,u=a.length;l<u;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new c(t,a[l]);for(;l<s;++l)(o=e[l])&&(i[l]=o)}function h(t,e,n,r,i,a,o){var l,s,u,f={},h=e.length,p=a.length,d=new Array(h);for(l=0;l<h;++l)(s=e[l])&&(d[l]=u="$"+o.call(s,s.__data__,l,e),u in f?i[l]=s:f[u]=s);for(l=0;l<p;++l)(s=f[u="$"+o.call(t,a[l],l,a)])?(r[l]=s,s.__data__=a[l],f[u]=null):n[l]=new c(t,a[l]);for(l=0;l<h;++l)(s=e[l])&&f[d[l]]===s&&(i[l]=s)}function p(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}t.r(e),t.d(e,{getFillPatternDefinitionFun:function(){return xc},map:function(){return mc}}),c.prototype={constructor:c,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="http://www.w3.org/1999/xhtml",g={svg:"http://www.w3.org/2000/svg",xhtml:d,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),g.hasOwnProperty(e)?{space:g[e],local:t}:t}function y(t){return function(){this.removeAttribute(t)}}function v(t){return function(){this.removeAttributeNS(t.space,t.local)}}function m(t,e){return function(){this.setAttribute(t,e)}}function x(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function b(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function S(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function w(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function T(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function F(t,e){return t.style.getPropertyValue(e)||w(t).getComputedStyle(t,null).getPropertyValue(e)}function A(t){return function(){delete this[t]}}function M(t,e){return function(){this[t]=e}}function C(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function L(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new N(t)}function N(t){this._node=t,this._names=L(t.getAttribute("class")||"")}function D(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function O(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function P(t){return function(){D(this,t)}}function R(t){return function(){O(this,t)}}function I(t,e){return function(){(e.apply(this,arguments)?D:O)(this,t)}}function W(){this.textContent=""}function j(t){return function(){this.textContent=t}}function H(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function U(){this.innerHTML=""}function B(t){return function(){this.innerHTML=t}}function G(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function q(){this.nextSibling&&this.parentNode.appendChild(this)}function V(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===d&&e.documentElement.namespaceURI===d?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function K(t){var e=_(t);return(e.local?X:Y)(e)}function J(){return null}function Z(){var t=this.parentNode;t&&t.removeChild(this)}function $(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}N.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var tt={},et=null;function nt(t,e,n){return t=rt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function rt(t,e,n){return function(r){var i=et;et=r;try{t.call(this,this.__data__,e,n)}finally{et=i}}}function it(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function at(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ot(t,e,n){var r=tt.hasOwnProperty(t.type)?nt:rt;return function(i,a,o){var l,s=this.__on,u=r(e,a,o);if(s)for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),void(l.value=e);this.addEventListener(t.type,u,n),l={type:t.type,name:t.name,value:e,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function lt(t,e,n){var r=w(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function st(t,e){return function(){return lt(this,t,e)}}function ut(t,e){return function(){return lt(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(tt={mouseenter:"mouseover",mouseleave:"mouseout"}));var ct=[null];function ft(t,e){this._groups=t,this._parents=e}function ht(){return new ft([[document.documentElement]],ct)}ft.prototype=ht.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,l,s=e[i],u=s.length,c=r[i]=new Array(u),f=0;f<u;++f)(o=s[f])&&(l=t.call(o,o.__data__,f,s))&&("__data__"in o&&(l.__data__=o.__data__),c[f]=l);return new ft(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=l(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new ft(r,i)},filter:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],c=0;c<l;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new ft(r,this._parents)},data:function(t,e){if(!t)return _=new Array(this.size()),c=-1,this.each((function(t){_[++c]=t})),_;var n,r=e?h:f,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var p=i[c],d=a[c],g=d.length,_=t.call(p,p&&p.__data__,c,i),y=_.length,v=s[c]=new Array(y),m=l[c]=new Array(y);r(p,d,v,m,u[c]=new Array(g),_,e);for(var x,b,S=0,w=0;S<y;++S)if(x=v[S]){for(S>=w&&(w=S+1);!(b=m[w])&&++w<y;);x._next=b||null}}return(l=new ft(l,i))._enter=s,l._exit=u,l},enter:function(){return new ft(this._enter||this._groups.map(u),this._parents)},exit:function(){return new ft(this._exit||this._groups.map(u),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var s,u=e[l],c=n[l],f=u.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)o[l]=e[l];return new ft(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=p);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],s=l.length,u=i[a]=new Array(s),c=0;c<s;++c)(o=l[c])&&(u[c]=o);u.sort(e)}return new ft(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?v:y:"function"==typeof e?n.local?S:b:n.local?x:m)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?T:"function"==typeof e?z:k)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?A:"function"==typeof e?C:M)(t,e)):this.node()[t]},classed:function(t,e){var n=L(t+"");if(arguments.length<2){for(var r=E(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?I:e?P:R)(n,e))},text:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?H:j)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?U:("function"==typeof t?G:B)(t)):this.node().innerHTML},raise:function(){return this.each(q)},lower:function(){return this.each(V)},append:function(t){var e="function"==typeof t?t:K(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:K(t),r=null==e?J:"function"==typeof e?e:a(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Z)},clone:function(t){return this.select(t?Q:$)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=it(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?ot:at,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?ut:st)(t,e))}};var pt=ht;function dt(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],ct)}function gt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t,yt,vt=(1===(_t=gt).length&&(yt=_t,_t=function(t,e){return gt(yt(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;_t(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;_t(t[i],e)>0?r=i:n=i+1}return n}}),mt=vt.right;function xt(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var bt=Array.prototype,St=(bt.slice,bt.map,Math.sqrt(50)),wt=Math.sqrt(10),Tt=Math.sqrt(2);function kt(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=St?10:a>=wt?5:a>=Tt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=St?10:a>=wt?5:a>=Tt?2:1)}function zt(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function Ft(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function At(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function Mt(t){return null===t?NaN:+t}function Ct(t,e,n){if(null==n&&(n=Mt),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function Lt(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var Et="$";function Nt(){}function Dt(t,e){var n=new Nt;if(t instanceof Nt)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Nt.prototype=Dt.prototype={constructor:Nt,has:function(t){return Et+t in this},get:function(t){return this[Et+t]},set:function(t,e){return this[Et+t]=e,this},remove:function(t){var e=Et+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Et&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Et&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Et&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Et&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Et&&++t;return t},empty:function(){for(var t in this)if(t[0]===Et)return!1;return!0},each:function(t){for(var e in this)e[0]===Et&&t(this[e],e.slice(1),this)}};var Ot=Dt;function Pt(){}var Rt=Ot.prototype;Pt.prototype=function(t,e){var n=new Pt;if(t instanceof Pt)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Pt,has:Rt.has,add:function(t){return this[Et+(t+="")]=t,this},remove:Rt.remove,clear:Rt.clear,values:Rt.keys,size:Rt.size,empty:Rt.empty,each:Rt.each};var It=Array.prototype,Wt=It.map,jt=It.slice;function Ht(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ut={name:"implicit"};function Bt(){var t=Ot(),e=[],n=[],r=Ut;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Ut)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ot();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=jt.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Bt(e,n).unknown(r)},Ht.apply(i,arguments),i}function Gt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function qt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Vt(){}var Yt=.7,Xt=1/Yt,Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$t=/^#([0-9a-f]{3,8})$/,Qt=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),te=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),ee=new RegExp("^rgba\\("+[Kt,Kt,Kt,Jt]+"\\)$"),ne=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),re=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),ie=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),ae={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function oe(){return this.rgb().formatHex()}function le(){return this.rgb().formatRgb()}function se(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$t.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ue(e):3===n?new pe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ce(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ce(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Qt.exec(t))?new pe(e[1],e[2],e[3],1):(e=te.exec(t))?new pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ee.exec(t))?ce(e[1],e[2],e[3],e[4]):(e=ne.exec(t))?ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=re.exec(t))?ye(e[1],e[2]/100,e[3]/100,1):(e=ie.exec(t))?ye(e[1],e[2]/100,e[3]/100,e[4]):ae.hasOwnProperty(t)?ue(ae[t]):"transparent"===t?new pe(NaN,NaN,NaN,0):null}function ue(t){return new pe(t>>16&255,t>>8&255,255&t,1)}function ce(t,e,n,r){return r<=0&&(t=e=n=NaN),new pe(t,e,n,r)}function fe(t){return t instanceof Vt||(t=se(t)),t?new pe((t=t.rgb()).r,t.g,t.b,t.opacity):new pe}function he(t,e,n,r){return 1===arguments.length?fe(t):new pe(t,e,n,null==r?1:r)}function pe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function de(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)}function ge(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function _e(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ye(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new me(t,e,n,r)}function ve(t){if(t instanceof me)return new me(t.h,t.s,t.l,t.opacity);if(t instanceof Vt||(t=se(t)),!t)return new me;if(t instanceof me)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,s=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=s<.5?a+i:2-a-i,o*=60):l=s>0&&s<1?0:o,new me(o,l,s,t.opacity)}function me(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function xe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function be(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Se(t){return function(){return t}}function we(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Se(isNaN(t)?e:t)}Gt(Vt,se,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:oe,formatHex:oe,formatHsl:function(){return ve(this).formatHsl()},formatRgb:le,toString:le}),Gt(pe,he,qt(Vt,{brighter:function(t){return t=null==t?Xt:Math.pow(Xt,t),new pe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Yt:Math.pow(Yt,t),new pe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:de,formatHex:de,formatRgb:ge,toString:ge})),Gt(me,(function(t,e,n,r){return 1===arguments.length?ve(t):new me(t,e,n,null==r?1:r)}),qt(Vt,{brighter:function(t){return t=null==t?Xt:Math.pow(Xt,t),new me(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Yt:Math.pow(Yt,t),new me(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new pe(xe(t>=240?t-240:t+120,i,r),xe(t,i,r),xe(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Te=function t(e){var n=function(t){return 1==(t=+t)?we:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Se(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=he(t)).r,(e=he(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=we(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ke(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=he(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}var ze=ke((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return be((n-r/e)*e,o,i,a,l)}}));function Fe(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Oe(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Ae(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ce(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Oe(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}ke((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return be((n-r/e)*e,i,a,o,l)}}));var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ee=new RegExp(Le.source,"g");function Ne(t,e){var n,r,i,a=Le.lastIndex=Ee.lastIndex=0,o=-1,l=[],s=[];for(t+="",e+="";(n=Le.exec(t))&&(r=Ee.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,s.push({i:o,x:Me(n,r)})),a=Ee.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)l[(n=s[r]).i]=n.x(t);return l.join("")})}function De(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Oe(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Se(e):("number"===i?Me:"string"===i?(n=se(e))?(e=n,Te):Ne:e instanceof se?Te:e instanceof Date?Ae:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Fe:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ce:Me:De))(t,e)}function Pe(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Re(t){return+t}var Ie=[0,1];function We(t){return t}function je(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function He(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ue(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=je(i,r),a=n(o,a)):(r=je(r,i),a=n(a,o)),function(t){return a(r(t))}}function Be(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=je(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=mt(t,e,1,r)-1;return a[n](i[n](e))}}function Ge(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function qe(){var t,e,n,r,i,a,o=Ie,l=Ie,s=Oe,u=We;function c(){return r=Math.min(o.length,l.length)>2?Be:Ue,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,s)))(t(u(e)))}return f.invert=function(n){return u(e((a||(a=r(l,o.map(t),Me)))(n)))},f.domain=function(t){return arguments.length?(o=Wt.call(t,Re),u===We||(u=He(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=jt.call(t),c()):l.slice()},f.rangeRound=function(t){return l=jt.call(t),s=Pe,c()},f.clamp=function(t){return arguments.length?(u=t?He(o):We,f):u!==We},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Ve(t,e){return qe()(t,e)}var Ye,Xe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ke(t){if(!(e=Xe.exec(t)))throw new Error("invalid format: "+t);var e;return new Je({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Je(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ze(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function $e(t){return(t=Ze(Math.abs(t)))?t[1]:NaN}function Qe(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ke.prototype=Je.prototype,Je.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var tn={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qe(100*t,e)},r:Qe,s:function(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Ye=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ze(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function en(t){return t}var nn,rn,an,on=Array.prototype.map,ln=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sn(t){return nn=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?en:(e=on.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?en:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(on.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Ke(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,_=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):tn[v]||(void 0===_&&(_=12),y=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?a:/[%p]/.test(v)?s:"",b=tn[v],S=/[defgprs%]/.test(v);function w(t){var i,a,s,h=m,w=x;if("c"===v)w=b(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),_),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),h=(T?"("===f?f:u:"-"===f||"("===f?"":f)+h,w=("s"===v?ln[8+Ye/3]:"")+w+(T&&"("===f?")":""),S)for(i=-1,a=t.length;++i<a;)if(48>(s=t.charCodeAt(i))||s>57){w=(46===s?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var k=h.length+t.length+w.length,z=k<d?new Array(d-k+1).join(e):"";switch(g&&p&&(t=r(z+t,z.length?d-w.length:1/0),z=""),n){case"<":t=h+t+w+z;break;case"=":t=h+z+t+w;break;case"^":t=z.slice(0,k=z.length>>1)+h+t+w+z.slice(k);break;default:t=z+h+t+w}return l(t)}return _=void 0===_?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),w.toString=function(){return t+""},w}return{format:f,formatPrefix:function(t,e){var n=f(((t=Ke(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($e(e)/3))),i=Math.pow(10,-r),a=ln[8+r/3];return function(t){return n(i*t)+a}}}}(t),rn=nn.format,an=nn.formatPrefix,nn}function un(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=kt(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=St?i*=10:a>=wt?i*=5:a>=Tt&&(i*=2),e<t?-i:i}(t,e,n);switch((r=Ke(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($e(e)/3)))-$e(Math.abs(t)))}(a,o))||(r.precision=i),an(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$e(e)-$e(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-$e(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return rn(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],s=i[o];return s<l&&(r=l,l=s,s=r,r=a,a=o,o=r),(r=kt(l,s,n))>0?r=kt(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=kt(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(s/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(s*r)/r,e(i)),t},t}function cn(){var t=Ve(We,We);return t.copy=function(){return Ge(t,cn())},Ht.apply(t,arguments),un(t)}function fn(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function hn(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function pn(t){return t<0?-t*t:t*t}function dn(t){var e=t(We,We),n=1;function r(){return 1===n?t(We,We):.5===n?t(hn,pn):t(fn(n),fn(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},un(e)}function gn(){var t=dn(qe());return t.copy=function(){return Ge(t,gn()).exponent(t.exponent())},Ht.apply(t,arguments),t}function _n(){return gn.apply(null,arguments).exponent(.5)}function yn(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Ct(e,t/i);return a}function a(e){return isNaN(e=+e)?t:n[mt(r,e)]}return a.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,a=t.length;r<a;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(gt),i()},a.range=function(t){return arguments.length?(n=jt.call(t),i()):n.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return r.slice()},a.copy=function(){return yn().domain(e).range(n).unknown(t)},Ht.apply(a,arguments)}function vn(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[mt(i,e,0,r)]:t}function l(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],l()):[e,n]},o.range=function(t){return arguments.length?(r=(a=jt.call(t)).length-1,l()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return vn().domain([e,n]).range(a).unknown(t)},Ht.apply(un(o),arguments)}function mn(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[mt(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=jt.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=jt.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return mn().domain(e).range(n).unknown(t)},Ht.apply(i,arguments)}function xn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}function bn(t){return ze(t[t.length-1])}sn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var Sn=bn(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(xn)),wn={b:"break in time series",c:"confidential",d:"definition differs, see metadata",e:"estimated",f:"forecast",n:"not significant",p:"provisional",r:"revised",s:"Eurostat estimate",u:"low reliability",z:"not applicable"};function Tn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function zn(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Fn(t,e){return fetch(t,e).then(zn)}var An={value:function(){}};function Mn(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Cn(r)}function Cn(t){this._=t}function Ln(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function En(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Nn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=An,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cn.prototype=Mn.prototype={constructor:Cn,on:function(t,e){var n,r=this._,i=Ln(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Nn(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Nn(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=En(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Cn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Dn=Mn;function On(){et.preventDefault(),et.stopImmediatePropagation()}function Pn(t){var e=t.document.documentElement,n=dt(t).on("dragstart.drag",On,!0);"onselectstart"in e?n.on("selectstart.drag",On,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Rn(t,e){var n=t.document.documentElement,r=dt(t).on("dragstart.drag",null);e&&(r.on("click.drag",On,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var In=Math.SQRT2;function Wn(t){return((t=Math.exp(t))+1/t)/2}function jn(t,e){var n,r,i=t[0],a=t[1],o=t[2],l=e[0],s=e[1],u=e[2],c=l-i,f=s-a,h=c*c+f*f;if(h<1e-12)r=Math.log(u/o)/In,n=function(t){return[i+t*c,a+t*f,o*Math.exp(In*t*r)]};else{var p=Math.sqrt(h),d=(u*u-o*o+4*h)/(2*o*2*p),g=(u*u-o*o-4*h)/(2*u*2*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-_)/In,n=function(t){var e,n=t*r,l=Wn(_),s=o/(2*p)*(l*(e=In*n+_,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[i+s*c,a+s*f,o*l/Wn(In*n+_)]}}return n.duration=1e3*r,n}function Hn(){for(var t,e=et;t=e.sourceEvent;)e=t;return e}function Un(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Bn(t){var e=Hn();return e.changedTouches&&(e=e.changedTouches[0]),Un(t,e)}function Gn(t,e,n){arguments.length<3&&(n=e,e=Hn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Un(t,r);return null}var qn,Vn,Yn=0,Xn=0,Kn=0,Jn=0,Zn=0,$n=0,Qn="object"==typeof performance&&performance.now?performance:Date,tr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function er(){return Zn||(tr(nr),Zn=Qn.now()+$n)}function nr(){Zn=0}function rr(){this._call=this._time=this._next=null}function ir(t,e,n){var r=new rr;return r.restart(t,e,n),r}function ar(){Zn=(Jn=Qn.now())+$n,Yn=Xn=0;try{!function(){er(),++Yn;for(var t,e=qn;e;)(t=Zn-e._time)>=0&&e._call.call(null,t),e=e._next;--Yn}()}finally{Yn=0,function(){for(var t,e,n=qn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:qn=e);Vn=t,lr(r)}(),Zn=0}}function or(){var t=Qn.now(),e=t-Jn;e>1e3&&($n-=e,Jn=t)}function lr(t){Yn||(Xn&&(Xn=clearTimeout(Xn)),t-Zn>24?(t<1/0&&(Xn=setTimeout(ar,t-Qn.now()-$n)),Kn&&(Kn=clearInterval(Kn))):(Kn||(Jn=Qn.now(),Kn=setInterval(or,1e3)),Yn=1,tr(ar)))}function sr(t,e,n){var r=new rr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}rr.prototype=ir.prototype={constructor:rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?er():+n)+(null==e?0:+e),this._next||Vn===this||(Vn?Vn._next=this:qn=this,Vn=this),this._call=t,this._time=n,lr()},stop:function(){this._call&&(this._call=null,this._time=1/0,lr())}};var ur=Dn("start","end","cancel","interrupt"),cr=[];function fr(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(s){var u,c,f,h;if(1!==n.state)return l();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return sr(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(sr((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(s))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),u=0,c=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ir((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ur,tween:cr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function hr(t,e){var n=dr(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function pr(t,e){var n=dr(t,e);if(n.state>3)throw new Error("too late; already running");return n}function dr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gr(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var _r,yr,vr,mr,xr=180/Math.PI,br={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Sr(t,e,n,r,i,a){var o,l,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*xr,skewX:Math.atan(s)*xr,scaleX:o,scaleY:l}}function wr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],s=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var s=o.push("translate(",null,e,null,n);l.push({i:s-4,x:Me(t,i)},{i:s-2,x:Me(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,s),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Me(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Me(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:Me(t,n)},{i:l-2,x:Me(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,s),a=o=null,function(t){for(var e,n=-1,r=s.length;++n<r;)l[(e=s[n]).i]=e.x(t);return l.join("")}}}var Tr=wr((function(t){return"none"===t?br:(_r||(_r=document.createElement("DIV"),yr=document.documentElement,vr=document.defaultView),_r.style.transform=t,t=vr.getComputedStyle(yr.appendChild(_r),null).getPropertyValue("transform"),yr.removeChild(_r),Sr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),kr=wr((function(t){return null==t?br:(mr||(mr=document.createElementNS("http://www.w3.org/2000/svg","g")),mr.setAttribute("transform",t),(t=mr.transform.baseVal.consolidate())?Sr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):br)}),", ",")",")");function zr(t,e){var n,r;return function(){var i=pr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Fr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=pr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=l;break}s===u&&i.push(l)}a.tween=i}}function Ar(t,e,n){var r=t._id;return t.each((function(){var t=pr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return dr(t,r).value[e]}}function Mr(t,e){var n;return("number"==typeof e?Me:e instanceof se?Te:(n=se(e))?(e=n,Te):Ne)(t,e)}function Cr(t){return function(){this.removeAttribute(t)}}function Lr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Er(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Nr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Dr(t,e,n){var r,i,a;return function(){var o,l,s=n(this);if(null!=s)return(o=this.getAttribute(t))===(l=s+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,s));this.removeAttribute(t)}}function Or(t,e,n){var r,i,a;return function(){var o,l,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(l=s+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,s));this.removeAttributeNS(t.space,t.local)}}function Pr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Rr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ir(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Rr(t,i)),n}return i._value=e,i}function Wr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Pr(t,i)),n}return i._value=e,i}function jr(t,e){return function(){hr(this,t).delay=+e.apply(this,arguments)}}function Hr(t,e){return e=+e,function(){hr(this,t).delay=e}}function Ur(t,e){return function(){pr(this,t).duration=+e.apply(this,arguments)}}function Br(t,e){return e=+e,function(){pr(this,t).duration=e}}function Gr(t,e){if("function"!=typeof e)throw new Error;return function(){pr(this,t).ease=e}}function qr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?hr:pr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Vr=pt.prototype.constructor;function Yr(t){return function(){this.style.removeProperty(t)}}function Xr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Kr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Xr(t,a,n)),r}return a._value=e,a}function Jr(t){return function(e){this.textContent=t.call(this,e)}}function Zr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Jr(r)),e}return r._value=t,r}var $r=0;function Qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ti(){return++$r}var ei=pt.prototype;Qr.prototype=function(t){return pt().transition(t)}.prototype={constructor:Qr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=a(t));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var s,u,c=r[l],f=c.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=c[p])&&(u=t.call(s,s.__data__,p,c))&&("__data__"in s&&(u.__data__=s.__data__),h[p]=u,fr(h[p],e,n,p,h,dr(s,n)));return new Qr(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=l(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],f=c.length,h=0;h<f;++h)if(u=c[h]){for(var p,d=t.call(u,u.__data__,h,c),g=dr(u,n),_=0,y=d.length;_<y;++_)(p=d[_])&&fr(p,e,n,_,d,g);a.push(d),o.push(u)}return new Qr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],c=0;c<l;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Qr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var s,u=e[l],c=n[l],f=u.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)o[l]=e[l];return new Qr(o,this._parents,this._name,this._id)},selection:function(){return new Vr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ti(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],s=l.length,u=0;u<s;++u)if(o=l[u]){var c=dr(o,e);fr(o,t,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Qr(r,this._parents,t,n)},call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:function(t,e){var n=this._id;return arguments.length<2?dr(this.node(),n).on.on(t):this.each(qr(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?kr:Mr;return this.attrTween(t,"function"==typeof e?(n.local?Or:Dr)(n,r,Ar(this,"attr."+t,e)):null==e?(n.local?Lr:Cr)(n):(n.local?Nr:Er)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?Ir:Wr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Tr:Mr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=F(this,t),o=(this.style.removeProperty(t),F(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Yr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=F(this,t),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(t),s=l=F(this,t)),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,l))}}(t,r,Ar(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var s=pr(this,t),u=s.on,c=null==s.value[o]?a||(a=Yr(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(l,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=F(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Kr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Zr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=dr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?zr:Fr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jr:Hr)(e,t)):dr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ur:Br)(e,t)):dr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Gr(e,t)):dr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},s={value:function(){0==--i&&a()}};n.each((function(){var n=pr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(s)),n.on=e}))}))}};var ni={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function ri(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ni.time=er(),ni;return n}function ii(t){return function(){return t}}function ai(t,e,n){this.target=t,this.type=e,this.transform=n}function oi(t,e,n){this.k=t,this.x=e,this.y=n}pt.prototype.interrupt=function(t){return this.each((function(){gr(this,t)}))},pt.prototype.transition=function(t){var e,n;t instanceof Qr?(e=t._id,t=t._name):(e=ti(),(n=ni).time=er(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],s=l.length,u=0;u<s;++u)(o=l[u])&&fr(o,t,e,u,l,n||ri(o,e));return new Qr(r,this._parents,t,e)},oi.prototype={constructor:oi,scale:function(t){return 1===t?this:new oi(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new oi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var li=new oi(1,0,0);function si(t){for(;!t.__zoom;)if(!(t=t.parentNode))return li;return t.__zoom}function ui(){et.stopImmediatePropagation()}function ci(){et.preventDefault(),et.stopImmediatePropagation()}function fi(){return!et.ctrlKey&&!et.button}function hi(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function pi(){return this.__zoom||li}function di(){return-et.deltaY*(1===et.deltaMode?.05:et.deltaMode?1:.002)}function gi(){return navigator.maxTouchPoints||"ontouchstart"in this}function _i(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function yi(t){return"string"==typeof t?new ft([document.querySelectorAll(t)],[document.documentElement]):new ft([null==t?[]:t],ct)}si.prototype=oi.prototype;var vi=1e-6,mi=Math.PI,xi=mi/2,bi=mi/4,Si=2*mi,wi=180/mi,Ti=mi/180,ki=Math.abs,zi=Math.atan,Fi=Math.atan2,Ai=Math.cos,Mi=Math.ceil,Ci=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Li=Math.sign||function(t){return t>0?1:t<0?-1:0},Ei=Math.sqrt;function Ni(t){return t>1?xi:t<-1?-xi:Math.asin(t)}function Di(){}function Oi(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Di,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Pi(t,e){return ki(t[0]-e[0])<vi&&ki(t[1]-e[1])<vi}function Ri(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 Ii(t,e,n,r,i){var a,o,l=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Pi(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}l.push(n=new Ri(r,t,null,!0)),s.push(n.o=new Ri(r,null,n,!1)),l.push(n=new Ri(o,t,null,!1)),s.push(n.o=new Ri(o,null,n,!0))}})),l.length){for(s.sort(e),Wi(l),Wi(s),a=0,o=s.length;a<o;++a)s[a].e=n=!n;for(var u,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=u.length;a<o;++a)i.point((c=u[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,a=u.length-1;a>=0;--a)i.point((c=u[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function Wi(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}Math.tan;var ji=1e9,Hi=-ji;function Ui(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,l,u){var c=0,f=0;if(null==i||(c=o(i,l))!==(f=o(a,l))||s(i,a)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+l+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return ki(r[0]-t)<vi?i>0?0:3:ki(r[0]-n)<vi?i>0?2:1:ki(r[1]-e)<vi?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var s,u,c,f,h,p,d,g,_,y,v,m=o,x=Oi(),b={point:S,lineStart:function(){b.point=w,u&&u.push(c=[]),y=!0,_=!1,d=g=NaN},lineEnd:function(){s&&(w(f,h),p&&_&&x.rejoin(),s.push(x.result())),b.point=S,_&&m.lineEnd()},polygonStart:function(){m=x,s=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,l=u[n],s=1,c=l.length,f=l[0],h=f[0],p=f[1];s<c;++s)a=h,o=p,h=(f=l[s])[0],p=f[1],o<=r?p>r&&(h-a)*(r-o)>(p-o)*(t-a)&&++e:p<=r&&(h-a)*(r-o)<(p-o)*(t-a)&&--e;return e}(),n=v&&e,i=(s=Ft(s)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Ii(s,l,e,a,o),o.polygonEnd()),m=o,s=u=c=null}};function S(t,e){i(t,e)&&m.point(t,e)}function w(a,o){var l=i(a,o);if(u&&c.push([a,o]),y)f=a,h=o,p=l,y=!1,l&&(m.lineStart(),m.point(a,o));else if(l&&_)m.point(a,o);else{var s=[d=Math.max(Hi,Math.min(ji,d)),g=Math.max(Hi,Math.min(ji,g))],x=[a=Math.max(Hi,Math.min(ji,a)),o=Math.max(Hi,Math.min(ji,o))];!function(t,e,n,r,i,a){var o,l=t[0],s=t[1],u=0,c=1,f=e[0]-l,h=e[1]-s;if(o=n-l,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>u&&(u=o)}if(o=i-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<c&&(c=o)}if(o=r-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<c&&(c=o)}else if(h>0){if(o>c)return;o>u&&(u=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<c&&(c=o)}return u>0&&(t[0]=l+u*f,t[1]=s+u*h),c<1&&(e[0]=l+c*f,e[1]=s+c*h),!0}}}}}(s,x,t,e,n,r)?l&&(m.lineStart(),m.point(a,o),v=!1):(_||(m.lineStart(),m.point(s[0],s[1])),m.point(x[0],x[1]),l||m.lineEnd(),v=!1)}d=a,g=o,_=l}return b}}function Bi(t){return t}function Gi(t){return function(e){var n=new qi;for(var r in t)n[r]=t[r];return n.stream=e,n}}function qi(){}function Vi(t,e){t&&Xi.hasOwnProperty(t.type)&&Xi[t.type](t,e)}qi.prototype={constructor:qi,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()}};var Yi={Feature:function(t,e){Vi(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Vi(n[r].geometry,e)}},Xi={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,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ki(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ki(n[r],e,0)},Polygon:function(t,e){Ji(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ji(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Vi(n[r],e)}};function Ki(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ji(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ki(t[n],e,1);e.polygonEnd()}function Zi(t,e){t&&Yi.hasOwnProperty(t.type)?Yi[t.type](t,e):Vi(t,e)}var $i=1/0,Qi=$i,ta=-$i,ea=ta,na={point:function(t,e){t<$i&&($i=t),t>ta&&(ta=t),e<Qi&&(Qi=e),e>ea&&(ea=e)},lineStart:Di,lineEnd:Di,polygonStart:Di,polygonEnd:Di,result:function(){var t=[[$i,Qi],[ta,ea]];return ta=ea=-(Qi=$i=1/0),t}},ra=na;function ia(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Zi(n,t.stream(ra)),e(ra.result()),null!=r&&t.clipExtent(r),t}function aa(t,e,n){return ia(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,l])}),n)}function oa(t,e,n){return aa(t,[[0,0],e],n)}function la(t,e,n){return ia(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function sa(t,e,n){return ia(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}function ua(){return new ca}function ca(){this.reset()}ca.prototype={constructor:ca,reset:function(){this.s=this.t=0},add:function(t){ha(fa,t,this.t),ha(this,fa.s,this.s),this.s?this.t+=fa.t:this.s=fa.t},valueOf:function(){return this.s}};var fa=new ca;function ha(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var pa,da,ga,_a,ya=ua(),va=ua(),ma={point:Di,lineStart:Di,lineEnd:Di,polygonStart:function(){ma.lineStart=xa,ma.lineEnd=wa},polygonEnd:function(){ma.lineStart=ma.lineEnd=ma.point=Di,ya.add(ki(va)),va.reset()},result:function(){var t=ya/2;return ya.reset(),t}};function xa(){ma.point=ba}function ba(t,e){ma.point=Sa,pa=ga=t,da=_a=e}function Sa(t,e){va.add(_a*t-ga*e),ga=t,_a=e}function wa(){Sa(pa,da)}var Ta,ka,za,Fa,Aa=ma,Ma=0,Ca=0,La=0,Ea=0,Na=0,Da=0,Oa=0,Pa=0,Ra=0,Ia={point:Wa,lineStart:ja,lineEnd:Ba,polygonStart:function(){Ia.lineStart=Ga,Ia.lineEnd=qa},polygonEnd:function(){Ia.point=Wa,Ia.lineStart=ja,Ia.lineEnd=Ba},result:function(){var t=Ra?[Oa/Ra,Pa/Ra]:Da?[Ea/Da,Na/Da]:La?[Ma/La,Ca/La]:[NaN,NaN];return Ma=Ca=La=Ea=Na=Da=Oa=Pa=Ra=0,t}};function Wa(t,e){Ma+=t,Ca+=e,++La}function ja(){Ia.point=Ha}function Ha(t,e){Ia.point=Ua,Wa(za=t,Fa=e)}function Ua(t,e){var n=t-za,r=e-Fa,i=Ei(n*n+r*r);Ea+=i*(za+t)/2,Na+=i*(Fa+e)/2,Da+=i,Wa(za=t,Fa=e)}function Ba(){Ia.point=Wa}function Ga(){Ia.point=Va}function qa(){Ya(Ta,ka)}function Va(t,e){Ia.point=Ya,Wa(Ta=za=t,ka=Fa=e)}function Ya(t,e){var n=t-za,r=e-Fa,i=Ei(n*n+r*r);Ea+=i*(za+t)/2,Na+=i*(Fa+e)/2,Da+=i,Oa+=(i=Fa*t-za*e)*(za+t),Pa+=i*(Fa+e),Ra+=3*i,Wa(za=t,Fa=e)}var Xa=Ia;function Ka(t){this._context=t}Ka.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Si)}},result:Di};var Ja,Za,$a,Qa,to,eo=ua(),no={point:Di,lineStart:function(){no.point=ro},lineEnd:function(){Ja&&io(Za,$a),no.point=Di},polygonStart:function(){Ja=!0},polygonEnd:function(){Ja=null},result:function(){var t=+eo;return eo.reset(),t}};function ro(t,e){no.point=io,Za=Qa=t,$a=to=e}function io(t,e){Qa-=t,to-=e,eo.add(Ei(Qa*Qa+to*to)),Qa=t,to=e}var ao,oo,lo,so,uo,co,fo,ho,po,go,_o,yo,vo,mo,xo,bo,So=no;function wo(){this._string=[]}function To(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ko(t,e,n){var r=Lt(t,e-vi,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function zo(t,e,n){var r=Lt(t,e-vi,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Fo(){var t,e,n,r,i,a,o,l,s,u,c,f,h=10,p=h,d=90,g=360,_=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return Lt(Mi(r/d)*d,n,d).map(c).concat(Lt(Mi(l/g)*g,o,g).map(f)).concat(Lt(Mi(e/h)*h,t,h).filter((function(t){return ki(t%d)>vi})).map(s)).concat(Lt(Mi(a/p)*p,i,p).filter((function(t){return ki(t%g)>vi})).map(u))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(o).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),l>o&&(t=l,l=o,o=t),y.precision(_)):[[r,l],[n,o]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(_)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],y):[d,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(_=+h,s=ko(a,i,90),u=zo(e,t,_),c=ko(l,o,90),f=zo(r,n,_),y):_},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}wo.prototype={_radius:4.5,_circle:To(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=To(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Ao={sphere:Di,point:Mo,lineStart:Lo,lineEnd:Do,polygonStart:function(){Ao.lineStart=Oo,Ao.lineEnd=Po},polygonEnd:function(){Ao.lineStart=Lo,Ao.lineEnd=Do}};function Mo(t,e){t*=Ti;var n=Ai(e*=Ti);Co(n*Ai(t),n*Ci(t),Ci(e))}function Co(t,e,n){++ao,lo+=(t-lo)/ao,so+=(e-so)/ao,uo+=(n-uo)/ao}function Lo(){Ao.point=Eo}function Eo(t,e){t*=Ti;var n=Ai(e*=Ti);mo=n*Ai(t),xo=n*Ci(t),bo=Ci(e),Ao.point=No,Co(mo,xo,bo)}function No(t,e){t*=Ti;var n=Ai(e*=Ti),r=n*Ai(t),i=n*Ci(t),a=Ci(e),o=Fi(Ei((o=xo*a-bo*i)*o+(o=bo*r-mo*a)*o+(o=mo*i-xo*r)*o),mo*r+xo*i+bo*a);oo+=o,co+=o*(mo+(mo=r)),fo+=o*(xo+(xo=i)),ho+=o*(bo+(bo=a)),Co(mo,xo,bo)}function Do(){Ao.point=Mo}function Oo(){Ao.point=Ro}function Po(){Io(yo,vo),Ao.point=Mo}function Ro(t,e){yo=t,vo=e,t*=Ti,e*=Ti,Ao.point=Io;var n=Ai(e);mo=n*Ai(t),xo=n*Ci(t),bo=Ci(e),Co(mo,xo,bo)}function Io(t,e){t*=Ti;var n=Ai(e*=Ti),r=n*Ai(t),i=n*Ci(t),a=Ci(e),o=xo*a-bo*i,l=bo*r-mo*a,s=mo*i-xo*r,u=Ei(o*o+l*l+s*s),c=Ni(u),f=u&&-c/u;po+=f*o,go+=f*l,_o+=f*s,oo+=c,co+=c*(mo+(mo=r)),fo+=c*(xo+(xo=i)),ho+=c*(bo+(bo=a)),Co(mo,xo,bo)}function Wo(t){ao=oo=lo=so=uo=co=fo=ho=po=go=_o=0,Zi(t,Ao);var e=po,n=go,r=_o,i=e*e+n*n+r*r;return i<1e-12&&(e=co,n=fo,r=ho,oo<vi&&(e=lo,n=so,r=uo),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[Fi(n,e)*wi,Ni(r/Ei(i))*wi]}function jo(t){return[Fi(t[1],t[0]),Ni(t[2])]}function Ho(t){var e=t[0],n=t[1],r=Ai(n);return[r*Ai(e),r*Ci(e),Ci(n)]}function Uo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Bo(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 Go(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function qo(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Vo(t){var e=Ei(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Yo=ua();function Xo(t){return ki(t[0])<=mi?t[0]:Li(t[0])*((ki(t[0])+mi)%Si-mi)}function Ko(t,e,n,r){return function(i){var a,o,l,s=e(i),u=Oi(),c=e(u),f=!1,h={point:p,lineStart:g,lineEnd:_,polygonStart:function(){h.point=y,h.lineStart=v,h.lineEnd=m,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=_,o=Ft(o);var t=function(t,e){var n=Xo(e),r=e[1],i=Ci(r),a=[Ci(n),-Ai(n),0],o=0,l=0;Yo.reset(),1===i?r=xi+vi:-1===i&&(r=-xi-vi);for(var s=0,u=t.length;s<u;++s)if(f=(c=t[s]).length)for(var c,f,h=c[f-1],p=Xo(h),d=h[1]/2+bi,g=Ci(d),_=Ai(d),y=0;y<f;++y,p=m,g=b,_=S,h=v){var v=c[y],m=Xo(v),x=v[1]/2+bi,b=Ci(x),S=Ai(x),w=m-p,T=w>=0?1:-1,k=T*w,z=k>mi,F=g*b;if(Yo.add(Fi(F*T*Ci(k),_*S+F*Ai(k))),o+=z?w+T*Si:w,z^p>=n^m>=n){var A=Bo(Ho(h),Ho(v));Vo(A);var M=Bo(a,A);Vo(M);var C=(z^w>=0?-1:1)*Ni(M[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=z^w>=0?1:-1)}}return(o<-1e-6||o<vi&&Yo<-1e-6)^1&l}(a,r);o.length?(f||(i.polygonStart(),f=!0),Ii(o,Zo,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function g(){h.point=d,s.lineStart()}function _(){h.point=p,s.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function m(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),h=u.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&s){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&s&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Jo))}return h}}function Jo(t){return t.length>1}function Zo(t,e){return((t=t.x)[0]<0?t[1]-xi-vi:xi-t[1])-((e=e.x)[0]<0?e[1]-xi-vi:xi-e[1])}var $o=Ko((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?mi:-mi,s=ki(a-n);ki(s-mi)<vi?(t.point(n,r=(r+o)/2>0?xi:-xi),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&s>=mi&&(ki(n-i)<vi&&(n-=i*vi),ki(a-l)<vi&&(a-=l*vi),r=function(t,e,n,r){var i,a,o=Ci(t-n);return ki(o)>vi?zi((Ci(e)*(a=Ai(r))*Ci(n)-Ci(r)*(i=Ai(e))*Ci(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*xi,r.point(-mi,i),r.point(0,i),r.point(mi,i),r.point(mi,0),r.point(mi,-i),r.point(0,-i),r.point(-mi,-i),r.point(-mi,0),r.point(-mi,i);else if(ki(t[0]-e[0])>vi){var a=t[0]<e[0]?mi:-mi;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-mi,-xi]);function Qo(t,e){(e=Ho(e))[0]-=t,Vo(e);var n,r=(n=-e[1])>1?0:n<-1?mi:Math.acos(n);return((-e[2]<0?-r:r)+Si-vi)%Si}function tl(t){var e=Ai(t),n=6*Ti,r=e>0,i=ki(e)>vi;function a(t,n){return Ai(t)*Ai(n)>e}function o(t,n,r){var i=[1,0,0],a=Bo(Ho(t),Ho(n)),o=Uo(a,a),l=a[0],s=o-l*l;if(!s)return!r&&t;var u=e*o/s,c=-e*l/s,f=Bo(i,a),h=qo(i,u);Go(h,qo(a,c));var p=f,d=Uo(h,p),g=Uo(p,p),_=d*d-g*(Uo(h,h)-1);if(!(_<0)){var y=Ei(_),v=qo(p,(-d-y)/g);if(Go(v,h),v=jo(v),!r)return v;var m,x=t[0],b=n[0],S=t[1],w=n[1];b<x&&(m=x,x=b,b=m);var T=b-x,k=ki(T-mi)<vi;if(!k&&w<S&&(m=S,S=w,w=m),k||T<vi?k?S+w>0^v[1]<(ki(v[0]-x)<vi?S:w):S<=v[1]&&v[1]<=w:T>mi^(x<=v[0]&&v[0]<=b)){var z=qo(p,(-d+y)/g);return Go(z,h),[v,jo(z)]}}}function l(e,n){var i=r?t:mi-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Ko(a,(function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,h){var p,d=[f,h],g=a(f,h),_=r?g?0:l(f,h):g?l(f+(f<0?mi:-mi),h):0;if(!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(p=o(e,d))||Pi(e,p)||Pi(d,p))&&(d[2]=1),g!==s)c=0,g?(t.lineStart(),p=o(d,e),t.point(p[0],p[1])):(p=o(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var y;_&n||!(y=o(d,e,!0))||(c=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&Pi(e,d)||t.point(d[0],d[1]),e=d,s=g,n=_},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}}),(function(e,r,i,a){!function(t,e,n,r,i,a){if(n){var o=Ai(e),l=Ci(e),s=r*n;null==i?(i=e+r*Si,a=e-s/2):(i=Qo(o,i),a=Qo(o,a),(r>0?i<a:i>a)&&(i+=r*Si));for(var u,c=i;r>0?c>a:c<a;c-=s)u=jo([o,-l*Ai(c),-l*Ci(c)]),t.point(u[0],u[1])}}(a,t,n,i,e,r)}),r?[0,-t]:[-mi,t-mi])}function el(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function nl(t,e){return[ki(t)>mi?t+Math.round(-t/Si)*Si:t,e]}function rl(t){return function(e,n){return[(e+=t)>mi?e-Si:e<-mi?e+Si:e,n]}}function il(t){var e=rl(t);return e.invert=rl(-t),e}function al(t,e){var n=Ai(t),r=Ci(t),i=Ai(e),a=Ci(e);function o(t,e){var o=Ai(e),l=Ai(t)*o,s=Ci(t)*o,u=Ci(e),c=u*n+l*r;return[Fi(s*i-c*a,l*n-u*r),Ni(c*i+s*a)]}return o.invert=function(t,e){var o=Ai(e),l=Ai(t)*o,s=Ci(t)*o,u=Ci(e),c=u*i-s*a;return[Fi(s*i+u*a,l*n+c*r),Ni(c*n-l*r)]},o}nl.invert=nl;var ol=Ai(30*Ti);function ll(t,e){return+e?function(t,e){function n(r,i,a,o,l,s,u,c,f,h,p,d,g,_){var y=u-r,v=c-i,m=y*y+v*v;if(m>4*e&&g--){var x=o+h,b=l+p,S=s+d,w=Ei(x*x+b*b+S*S),T=Ni(S/=w),k=ki(ki(S)-1)<vi||ki(a-f)<vi?(a+f)/2:Fi(b,x),z=t(k,T),F=z[0],A=z[1],M=F-r,C=A-i,L=v*M-y*C;(L*L/m>e||ki((y*M+v*C)/m-.5)>.3||o*h+l*p+s*d<ol)&&(n(r,i,a,o,l,s,F,A,k,x/=w,b/=w,S,g,_),_.point(F,A),n(F,A,k,x,b,S,u,c,f,h,p,d,g,_))}}return function(e){var r,i,a,o,l,s,u,c,f,h,p,d,g={point:_,lineStart:y,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function _(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){c=NaN,g.point=v,e.lineStart()}function v(r,i){var a=Ho([r,i]),o=t(r,i);n(c,f,u,h,p,d,c=o[0],f=o[1],u=r,h=a[0],p=a[1],d=a[2],16,e),e.point(c,f)}function m(){g.point=_,e.lineEnd()}function x(){y(),g.point=b,g.lineEnd=S}function b(t,e){v(r=t,e),i=c,a=f,o=h,l=p,s=d,g.point=v}function S(){n(c,f,u,h,p,d,i,a,r,o,l,s,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return Gi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var sl=Gi({point:function(t,e){this.stream.point(t*Ti,e*Ti)}});function ul(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function cl(t,e,n,r,i,a){var o=Ai(a),l=Ci(a),s=o*t,u=l*t,c=o/t,f=l/t,h=(l*n-o*e)/t,p=(l*e+o*n)/t;function d(t,a){return[s*(t*=r)-u*(a*=i)+e,n-u*t-s*a]}return d.invert=function(t,e){return[r*(c*t-f*e+h),i*(p-f*t-c*e)]},d}function fl(t){return function(t){var e,n,r,i,a,o,l,s,u,c,f=150,h=480,p=250,d=0,g=0,_=0,y=0,v=0,m=0,x=1,b=1,S=null,w=$o,T=null,k=Bi,z=.5;function F(t){return s(t[0]*Ti,t[1]*Ti)}function A(t){return(t=s.invert(t[0],t[1]))&&[t[0]*wi,t[1]*wi]}function M(){var t=cl(f,0,0,x,b,m).apply(null,e(d,g)),r=(m?cl:ul)(f,h-t[0],p-t[1],x,b,m);return n=function(t,e,n){return(t%=Si)?e||n?el(il(t),al(e,n)):il(t):e||n?al(e,n):nl}(_,y,v),l=el(e,r),s=el(n,l),o=ll(l,z),C()}function C(){return u=c=null,F}return F.stream=function(t){return u&&c===t?u:u=sl(function(t){return Gi({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(o(k(c=t)))))},F.preclip=function(t){return arguments.length?(w=t,S=void 0,C()):w},F.postclip=function(t){return arguments.length?(k=t,T=r=i=a=null,C()):k},F.clipAngle=function(t){return arguments.length?(w=+t?tl(S=t*Ti):(S=null,$o),C()):S*wi},F.clipExtent=function(t){return arguments.length?(k=null==t?(T=r=i=a=null,Bi):Ui(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),C()):null==T?null:[[T,r],[i,a]]},F.scale=function(t){return arguments.length?(f=+t,M()):f},F.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],M()):[h,p]},F.center=function(t){return arguments.length?(d=t[0]%360*Ti,g=t[1]%360*Ti,M()):[d*wi,g*wi]},F.rotate=function(t){return arguments.length?(_=t[0]%360*Ti,y=t[1]%360*Ti,v=t.length>2?t[2]%360*Ti:0,M()):[_*wi,y*wi,v*wi]},F.angle=function(t){return arguments.length?(m=t%360*Ti,M()):m*wi},F.reflectX=function(t){return arguments.length?(x=t?-1:1,M()):x<0},F.reflectY=function(t){return arguments.length?(b=t?-1:1,M()):b<0},F.precision=function(t){return arguments.length?(o=ll(l,z=t*t),C()):Ei(z)},F.fitExtent=function(t,e){return aa(F,t,e)},F.fitSize=function(t,e){return oa(F,t,e)},F.fitWidth=function(t,e){return la(F,t,e)},F.fitHeight=function(t,e){return sa(F,t,e)},function(){return e=t.apply(this,arguments),F.invert=e.invert&&A,M()}}((function(){return t}))()}var hl=Math.abs,pl=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),dl=(Math.log,Math.max),gl=Math.min,_l=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),yl=_l/2,vl=(Math.SQRT1_2,xl(2),xl(_l),180/_l),ml=_l/180;function xl(t){return t>0?Math.sqrt(t):0}var bl=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function Sl(t,e){var n,r=gl(18,36*hl(e)/_l),i=pl(r),a=r-i,o=(n=bl[i])[0],l=n[1],s=(n=bl[++i])[0],u=n[1],c=(n=bl[gl(19,++i)])[0],f=n[1];return[t*(s+a*(c-o)/2+a*a*(c-2*s+o)/2),(e>0?yl:-yl)*(u+a*(f-l)/2+a*a*(f-2*u+l)/2)]}function wl(t){return t}function Tl(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return kl(t,e)}))}:kl(t,e)}function kl(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,a=function(t,e){var n=function(t){if(null==t)return wl;var e,n,r=t.scale[0],i=t.scale[1],a=t.translate[0],o=t.translate[1];return function(t,l){l||(e=n=0);var s=2,u=t.length,c=new Array(u);for(c[0]=(e+=t[0])*r+a,c[1]=(n+=t[1])*i+o;s<u;)c[s]=t[s],++s;return c}}(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],a=0,o=i.length;a<o;++a)e.push(n(i[a],a));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,o)}function a(t){return n(t)}function o(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=o(t);e.length<4;)e.push(e[0]);return e}function s(t){return t.map(l)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=a(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(a);break;case"LineString":n=o(e.arcs);break;case"MultiLineString":n=e.arcs.map(o);break;case"Polygon":n=s(e.arcs);break;case"MultiPolygon":n=e.arcs.map(s);break;default:return null}return{type:r,coordinates:n}}(e)}(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}bl.forEach((function(t){t[1]*=1.0144})),Sl.invert=function(t,e){var n=e/yl,r=90*n,i=gl(18,hl(r/5)),a=dl(0,pl(i));do{var o=bl[a][1],l=bl[a+1][1],s=bl[gl(19,a+2)][1],u=s-o,c=s-2*l+o,f=2*(hl(n)-l)/u,h=c/u,p=f*(1-h*f*(1-2*h*f));if(p>=0||1===a){r=(e>=0?5:-5)*(p+i);var d,g=50;do{p=(i=gl(18,hl(r)/5))-(a=pl(i)),o=bl[a][1],l=bl[a+1][1],s=bl[gl(19,a+2)][1],r-=(d=(e>=0?yl:-yl)*(l+p*(s-o)/2+p*p*(s-2*l+o)/2)-e)*vl}while(hl(d)>1e-12&&--g>0);break}}while(--a>=0);var _=bl[a][0],y=bl[a+1][0],v=bl[gl(19,a+2)][0];return[t/(y+p*(v-_)/2+p*p*(v-2*y+_)/2),r*ml]};var zl=function(t){return{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[t[0],t[1]],[t[2],t[3]]]}}},Fl=function(t){return t.toLocaleString("en").replace(/,/gi," ")},Al=function(t){var e;function n(){(e=dt("#"+t.div)).empty()&&(e=dt("body").append("div").attr("id",t.div)),e.style("max-width",t.maxWidth),e.style("overflow","hidden"),e.style("font-size",t.fontSize),e.style("background",t.background),e.style("padding",t.padding),e.style("border",t.border),e.style("border-radius",t["border-radius"]),e.style("box-shadow",t["box-shadow"]),e.style("position","absolute"),e.style("font-family",t["font-family"]),e.style("pointer-events","none"),e.style("opacity","0")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"5px",t.border=t.border||"0px",t["border-radius"]=t["border-radius"]||"5px",t["box-shadow"]=t["box-shadow"]||"5px 5px 5px grey",t["font-family"]=t["font-family"]||"Helvetica, Arial, sans-serif",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){t&&e.html(t);var r=et.pageX,i=et.pageY;n.ensureTooltipOnScreen(r,i)},n.mousemove=function(){var t=et.pageX,e=et.pageY;this.ensureTooltipOnScreen(t,e)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,r){return 1==arguments.length?e.style(t):(e.style(t,r),n)},n.attr=function(t,r){return 1==arguments.length?e.attr(t):(e.attr(t,r),n)},n.ensureTooltipOnScreen=function(n,r){e.style("opacity",1);var i=e.node();i.style.left=n+t.xOffset+"px",i.style.top=r-t.yOffset+"px";var a=document.getElementById(t.containerId).getBoundingClientRect(),o=a.width,l=a.height;if(i.offsetLeft>a.left+o-i.clientWidth){var s=n-i.clientWidth-t.xOffset;if(i.style.left=s+"px",i.offsetLeft+i.clientWidth>n){var u=n-(i.clientWidth+t.xOffset);i.style.left=u+"px"}}i.offsetTop+i.clientHeight>a.top+l&&(i.style.top=i.offsetTop-i.clientHeight+"px")},n(),n},Ml={EUR_3035:{cc:[{text:"AL",x:51e5,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:2629e3,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:22e5,class:"cc",size:22},{text:"HR",x:4876e3,y:2455e3,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:2885e3,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:28e5,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:23e5,class:"cc",size:10},{text:"SK",x:504e4,y:2835e3,class:"cc",size:12},{text:"SI",x:4655e3,y:248e4,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:42e5,y:2564e3,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},Cl={"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}};function Ll(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var El=function t(e,n){var i={svgId_:"map",svg_:void 0};i.width_=Math.min(800,window.innerWidth),i.height_=0,i.containerId_=void 0,i.nutsLvl_=3,i.nutsYear_=2016,i.geo_="EUR",i.proj_="3035",i.projectionFunction_=void 0,i.scale_="20M",i.geoCenter_=void 0,i.pixSize_=void 0,i.zoomExtent_=void 0,i.fontFamily_="Helvetica, Arial, sans-serif",i.title_="",i.titleFontSize_=20,i.titleFill_="black",i.titlePosition_=void 0,i.titleFontWeight_="bold",i.titleStroke_="none",i.titleStrokeWidth_="none",i.subtitle_="",i.subtitleFontSize_=12,i.subtitleFill_="grey",i.subtitlePosition_=void 0,i.subtitleFontWeight_="bold",i.subtitleStroke_="none",i.subtitleStrokeWidth_="none",i.frameStroke_="none",i.frameStrokeWidth_=.5,i.showScalebar_=!1,i.scalebarPosition_=[],i.scalebarFontSize_=9,i.scalebarUnits_=" km",i.scalebarTextOffset_=[0,12],i.scalebarMaxWidth_=150,i.scalebarHeight_=90,i.scalebarStrokeWidth_=1,i.scalebarSegmentHeight_=6,i.scalebarTickHeight_=8,i.tooltip_={maxWidth:"200px",fontSize:"14px",background:"white",padding:"5px",border:"0px",borderRadius:"5px",boxShadow:"5px 5px 5px grey",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1},i.tooltipText_=function(t){return t.properties.na},i.tooltipShowFlags_=!1,i.bordersToShow_=["eu","efta","cc","oth","co"],i.countriesToShow_=["AL","AT","BE","BG","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","HR","HU","IE","IS","IT","LI","LT","LU","LV","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","TR","UK"],i.nutsrgFillStyle_="white",i.nutsrgSelFillSty_="#e0bcdf",i.nutsbnStroke_={0:"black",1:"grey",2:"grey",3:"grey",oth:"grey",co:"black"},i.nutsbnStrokeWidth_={0:1,1:.4,2:.4,3:.4,oth:0,co:.4},i.cntrgFillStyle_="#E6E6E6",i.cntbnStroke_={eu:"black",efta:"black",cc:"black",oth:"#ffffff",co:"#7f7f7f"},i.cntbnStrokeWidth_={eu:.8,efta:.8,cc:.8,oth:.8,co:.5},i.worldFillStyle_="#E6E6E6",i.worldStroke_="black",i.worldStrokeWidth_=1,i.worldCoastStroke_="none",i.worldCoastStrokeWidth_=.3,i.seaFillStyle_="white",i.drawCoastalMargin_=!1,i.coastalMarginColor_="#c2daed",i.coastalMarginWidth_=5,i.coastalMarginStdDev_=2,i.drawGraticule_=!1,i.graticuleStroke_="lightgray",i.graticuleStrokeWidth_=1,i.labelling_=!1,i.labelsConfig_=Ml,i.labelsToShow_=["countries","seas"],i.labelFill_={seas:"#003399",countries:"black",cc:"black",values:"black"},i.labelStroke_={seas:"#003399",countries:"black",cc:"black",values:"black"},i.labelStrokeWidth_={seas:.5,countries:.5,cc:.5,values:.5},i.labelOpacity_={seas:1,countries:.8,cc:.8,values:.9},i.labelValuesFontSize_=10,i.labelShadow_=!1,i.labelShadowWidth_={seas:3,countries:1,cc:1,values:1},i.labelShadowColor_={seas:"white",countries:"white",cc:"white",values:"white"},i.showSourceLink_=!0,i.bottomText_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",i.botTxtFontSize_=10,i.botTxtFill_="black",i.botTxtPadding_=10,i.botTxtTooltipTxt_="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence.",i.nuts2jsonBaseURL_="https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/",i.insets_=[],i.insetTemplates_={},i.insetBoxPosition_=void 0,i.insetBoxPadding_=5,i.insetBoxWidth_=210,i.insetZoomExtent_=null,i.insetScale_="03M",i._geom={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0,path:void 0};var a=function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}};for(var o in i)a(o);["tooltip_","nuts2jsonBaseURL_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return i[t];if("object"===kn(e)&&null!==e)for(var n in e)i[t][n]=e[n];else i[t]=e;return l(t,e),i}}));var l=function(t,e){if(i.insetTemplates_)for(var n in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[n]))for(var r=0;r<i.insetTemplates_[n].length;r++)if(Array.isArray(i.insetTemplates_[n][r]))for(var a=0;a<i.insetTemplates_[n][r].length;a++)i.insetTemplates_[n][r][a][t](e);else i.insetTemplates_[n][r][t](e);else i.insetTemplates_[n][t](e)};i.tooltipText=function(t){return console.log("map.tooltipText() is now deprecated. Please use map.tooltip(config.textFunction) instead. See API reference for details."),i.tooltip_.textFunction=t,i},i.title=function(t){return arguments.length?(i.title_=t,i.svg()&&i.svg().select("#title"+i.geo()).text(t),i):i.title_},i.subtitle=function(t){return arguments.length?(i.subtitle_=t,i.svg()&&i.svg().select("#subtitle"+i.geo()).text(t),i):i.subtitle_},i.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?i.insets_="default":1==arguments.length&&Array.isArray(arguments[0])?i.insets_=arguments[0]:i.insets_=arguments,i):i.insets_},i.drawGraticule=function(t){if(!arguments.length)return i.drawGraticule_;i.drawGraticule_=t;var e=dt("#g_gra"),n=i.svg_?i.svg_.select("#zoomgroup"+i.svgId_):null;return e._groups[0][0]&&0==t?e.remove():i._geom.gra&&i._geom.path&&n&&1==t&&(e.remove(),n.append("g").attr("id","g_gra").style("fill","none").style("stroke",i.graticuleStroke()).style("stroke-width",i.graticuleStrokeWidth()).selectAll("path").data(i._geom.gra).enter().append("path").attr("d",i._geom.path).attr("class","gra"),dt("#g_gra").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))),i},i.seaFillStyle=function(t){if(!arguments.length)return i.seaFillStyle_;if(i.seaFillStyle_=t,"WORLD"==i.geo_){var e=dt("#sphere");e&&e.style("fill",i.seaFillStyle_)}else{var n=yi("#sea");n&&n.style("fill",i.seaFillStyle_)}for(var r in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[r]))for(var a=0;a<i.insetTemplates_[r].length;a++)if(Array.isArray(i.insetTemplates_[r][a]))for(var o=0;o<i.insetTemplates_[r][a].length;o++){var l=i.insetTemplates_[r][a][o];l.seaFillStyle_=i.seaFillStyle_}else{var s=i.insetTemplates_[r][a];s.seaFillStyle_=i.seaFillStyle_}else{var u=i.insetTemplates_[r];u.seaFillStyle_=i.seaFillStyle_}return i},i.cntrgFillStyle=function(t){if(!arguments.length)return i.cntrgFillStyle_;if(i.cntrgFillStyle_=t,"WORLD"==i.geo_){var e=yi(".worldrg");e&&e.attr("fill",(function(t,e,n){var r=dt(n[e]);return r.attr("ecl")?r.attr("fill"):i.cntrgFillStyle_}))}else{var n=yi(".cntrg");n&&n.style("fill",i.cntrgFillStyle_)}for(var r in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[r]))for(var a=0;a<i.insetTemplates_[r].length;a++)if(Array.isArray(i.insetTemplates_[r][a]))for(var o=0;o<i.insetTemplates_[r][a].length;o++){var l=i.insetTemplates_[r][a][o];l.cntrgFillStyle_=i.cntrgFillStyle_}else{var s=i.insetTemplates_[r][a];s.cntrgFillStyle_=i.cntrgFillStyle_}else{var u=i.insetTemplates_[r];u.cntrgFillStyle_=i.cntrgFillStyle_}return i},i.nutsrgFillStyle=function(t){if(!arguments.length)return i.nutsrgFillStyle_;for(var e in i.nutsrgFillStyle_=t,i.svg_&&i.updateStyle(),i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.nutsrgFillStyle_=i.nutsrgFillStyle_}else{var o=i.insetTemplates_[e][n];o.nutsrgFillStyle_=i.nutsrgFillStyle_}else{var l=i.insetTemplates_[e];l.nutsrgFillStyle_=i.nutsrgFillStyle_}return i},i.drawCoastalMargin=function(t){if(!arguments.length)return i.drawCoastalMargin_;i.drawCoastalMargin_=t;var e=yi("#g_coast_margin"),n=dt("#coastal_blur"),r=i.svg_?i.svg_.select("#zoomgroup"+i.svgId_):null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&i._geom.path&&r){e.remove(),n.remove(),i.svg_.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var a=function(t){var e=i.svg().select("#zoomgroup"+t.svgId_).append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",t.coastalMarginWidth_).style("stroke",t.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");t._geom.cntbn&&e.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.nutsbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.worldbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._geom.path)};for(var o in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[o]))for(var l=0;l<i.insetTemplates_[o].length;l++)if(Array.isArray(i.insetTemplates_[o][l]))for(var s=0;s<i.insetTemplates_[o][l].length;s++){var u=i.insetTemplates_[o][l][s];u.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+u.svgId_),i.drawCoastalMargin_&&a(u)}else{var c=i.insetTemplates_[o][l];c.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+c.svgId_),i.drawCoastalMargin_&&a(c)}else{var f=i.insetTemplates_[o];f.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+f.svgId_),i.drawCoastalMargin_&&a(f)}i.drawCoastalMargin_&&a(i),yi("#g_coast_margin").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}return i},i.coastalMarginWidth=function(t){if(!arguments.length)return i.coastalMarginWidth_;for(var e in i.coastalMarginWidth_=t,i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.coastalMarginWidth_=i.coastalMarginWidth_,a.drawCoastalMargin(!0)}else{var o=i.insetTemplates_[e][n];o.coastalMarginWidth_=i.coastalMarginWidth_,o.drawCoastalMargin(!0)}else{var l=i.insetTemplates_[e];l.coastalMarginWidth_=i.coastalMarginWidth_,l.drawCoastalMargin(!0)}return i.drawCoastalMargin(!0),i},i.coastalMarginColor=function(t){if(!arguments.length)return i.coastalMarginColor_;for(var e in i.coastalMarginColor_=t,i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.coastalMarginColor_=i.coastalMarginColor_,a.drawCoastalMargin(!0)}else{var o=i.insetTemplates_[e][n];o.coastalMarginColor_=i.coastalMarginColor_,o.drawCoastalMargin(!0)}else{var l=i.insetTemplates_[e];l.coastalMarginColor_=i.coastalMarginColor_,l.drawCoastalMargin(!0)}return i.drawCoastalMargin(!0),i};var s=void 0,u=void 0,c=void 0;function f(t,e){var n=t.labelsConfig_,r=t.lg_,i=[],a=e.append("g").attr("class","labels-container");if((t.labelsToShow_.includes("countries")||t.labelsToShow_.includes("seas"))&&(i=n[t.geo_+"_"+t.proj_][r]?n[t.geo_+"_"+t.proj_][r]:n[t.geo_+"_"+t.proj_].en),t.labelsToShow_.includes("cc")&&(i=i.concat(n[t.geo_+"_"+t.proj_].cc)),t.labelsToShow_.includes("values")&&t._geom.nutsrg){var o,l=a.append("g").attr("class","g_stat_label_shadows").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelShadowColor_.values})).attr("stroke",(function(e){return t.labelShadowColor_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values+t.labelShadowWidth_.values})).style("font-family",t.fontFamily_),s=a.append("g").attr("class","g_stat_labels").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelFill_.values})).attr("stroke",(function(e){return t.labelStroke_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values})).style("font-family",t.fontFamily_);"mixed"==t.nutsLvl_?(t._geom.mixed.rg0=t._geom.nutsrg,t._geom.mixed.rg1=Tl(u[1],u[1].objects.nutsrg).features,t._geom.mixed.rg2=Tl(u[2],u[2].objects.nutsrg).features,t._geom.mixed.rg3=Tl(u[3],u[3].objects.nutsrg).features,o=t._geom.mixed.rg0.concat(t._geom.mixed.rg1,t._geom.mixed.rg2,t._geom.mixed.rg3)):o=t._geom.nutsrg,s.selectAll("g").data(o).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).style("pointer-events","none").attr("class","stat-label"),t.labelShadow_&&l.selectAll("g").data(o).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).style("pointer-events","none").attr("class","stat-label-shadow")}if(i){var c=i.filter((function(e){return"countries"==e.class&&t.labelsToShow_.includes("countries")||"seas"==e.class&&t.labelsToShow_.includes("seas")||"cc"==e.class&&t.labelsToShow_.includes("cc")?e:void 0})),f=a.append("g").attr("class","g_labelShadows").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle"),h=a.append("g").attr("class","g_geolabels").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle");t.labelShadow_&&f.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"labelShadow_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]+t.labelShadowWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).text((function(t){return t.text})),h.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"geolabel_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelFill_[e.class]})).attr("stroke",(function(e){return t.labelStroke_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}}function h(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3}i.isGeoReady=function(){if(!s)return!1;for(var t in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[t])){for(var e=0;e<i.insetTemplates_[t].length;e++)if(Array.isArray(i.insetTemplates_[t][e])){for(var n=0;n<i.insetTemplates_[t][e].length;n++)if(!i.insetTemplates_[t][e][n].isGeoReady())return!1}else if(!i.insetTemplates_[t][e].isGeoReady())return!1}else if(!i.insetTemplates_[t].isGeoReady())return!1;return!0},i.getGeoDataPromise=function(){var t=this;if("mixed"==i.nutsLvl_&&"WORLD"!==i.geo_){var e=[];return[0,1,2,3].forEach((function(n){var r=[];r.push(i.nuts2jsonBaseURL_),r.push(i.nutsYear_),"EUR"!=i.geo_&&r.push("/"+t.geo_),r.push("/"),r.push(i.proj_),r.push("/"),r.push(i.scale_),r.push("/"),r.push(n),r.push(".json"),e.push(Fn(r.join("")))})),n&&[0,1,2,3].forEach((function(n){var r=[];r.push(i.nuts2jsonBaseURL_),r.push(i.nutsYear_),"EUR"!=i.geo_&&r.push("/"+t.geo_),r.push("/"),r.push(i.proj_),r.push("/nutspt_"),r.push(n),r.push(".json"),e.push(Fn(r.join("")))})),e}if("WORLD"==i.geo_)return[Fn("https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/src/assets/topojson/WORLD_4326.json")];var r=[],a=[];if(a.push(i.nuts2jsonBaseURL_),a.push(i.nutsYear_),"EUR"!=i.geo_&&a.push("/"+this.geo_),a.push("/"),a.push(i.proj_),a.push("/"),a.push(i.scale_),a.push("/"),a.push(i.nutsLvl_),a.push(".json"),r.push(Fn(a.join(""))),n){var o=[];o.push(i.nuts2jsonBaseURL_),o.push(i.nutsYear_),"EUR"!=i.geo_&&o.push("/"+this.geo_),o.push("/"),o.push(i.proj_),o.push("/nutspt_"),o.push(i.nutsLvl_),o.push(".json"),r.push(Fn(o.join("")))}return r},i.updateGeoMT=function(t){if(s=null,u=null,c=null,"mixed"==i.nutsLvl_&&"WORLD"!==i.geo_){var e=i.getGeoDataPromise();Promise.all(e).then((function(e){u=e,s=e[0],n&&(c=[e[4],e[5],e[6],e[7]]),i.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}else{var r=i.getGeoDataPromise();Promise.all(r).then((function(e){s=e[0],n&&(c=e[1]),i.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}for(var a in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[a]))for(var o=0;o<i.insetTemplates_[a].length;o++)if(Array.isArray(i.insetTemplates_[a][o]))for(var l=0;l<i.insetTemplates_[a][o].length;l++)i.insetTemplates_[a][o][l].updateGeoMT(t);else i.insetTemplates_[a][o].updateGeoMT(t);else i.insetTemplates_[a].updateGeoMT(t);return i},i.buildMapTemplateBase=function(){i.insetTemplates_={};var t=dt("#"+i.svgId());0==t.size()&&(t=dt("body").append("svg").attr("id",i.svgId())),i.svg(t),i.containerId_||(i.containerId_=i.svgId_),i.tooltip_.containerId||(i.tooltip_.containerId=i.containerId_),yi("#"+i.svgId()+" > *").remove(),"WORLD"==i.geo_.toUpperCase()&&(i.height()||i.height(.55*i.width()),t.attr("width",i.width()).attr("height",i.height()),i.proj_=54030),i.height()||i.height(.85*i.width()),t.attr("width",i.width()).attr("height",i.height()),t.append("defs").append("clipPath").attr("id",i.svgId_+"_clipP").append("path").attr("d",function(t,e,n,r){return t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),r=parseFloat(r,10),t<0||e<0||n<0||r<0?"":"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+r)+" "+t+","+(e+r)+"z"}(0,0,i.width_,i.height_)),i.drawCoastalMargin_&&t.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var e=t.insert("g",":first-child").attr("id","drawing"+i.svgId_).attr("clip-path","url(#"+i.svgId_+"_clipP)"),n=e.append("g").attr("id","zoomgroup"+i.svgId_);i.insetBoxPosition_||(i.insetBoxPosition_=[i.width()-i.insetBoxWidth()-2*i.insetBoxPadding(),2*i.insetBoxPadding()]);var r=e.append("g").attr("id","insetsgroup").attr("transform","translate("+i.insetBoxPosition()[0]+","+i.insetBoxPosition()[1]+")");"default"===i.insets_&&(i.insets_=Dl(i.insetBoxWidth(),i.insetBoxPadding()));for(var a=0;a<i.insets_.length;a++){var o=i.insets_[a];if(o.svgId=o.svgId||"inset"+o.geo+Math.random().toString(36).substring(7),0==dt("#"+o.svgId).size()){var l=null==o.x?i.insetBoxPadding_:o.x,s=null==o.y?i.insetBoxPadding_+a*(i.insetBoxPadding_+i.insetBoxWidth_):o.y;r.append("g").attr("id","insetzg"+o.svgId).attr("transform","translate("+l+","+s+")").append("svg").attr("id",o.svgId)}if(i.insetTemplates_[o.geo]){var u=p(o,i);u.buildMapTemplateBase(),i.insetTemplates_[o.geo]=[i.insetTemplates_[o.geo],u]}else i.insetTemplates_[o.geo]=p(o,i).buildMapTemplateBase()}if(e.append("rect").attr("id","frame"+i.geo_).attr("x",0).attr("y",0).attr("width",i.width_).attr("height",i.height_).style("stroke-width",i.frameStrokeWidth_).style("stroke",i.frameStroke_).style("fill","none"),i.zoomExtent()){var c=function(){var t,e,n=fi,r=hi,i=_i,a=di,o=gi,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=jn,f=Dn("start","zoom","end"),h=500,p=0;function d(t){t.property("__zoom",pi).on("wheel.zoom",b).on("mousedown.zoom",S).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new oi(e,t.x,t.y)}function _(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new oi(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),l=null==n?y(o):"function"==typeof n?n.apply(t,i):n,s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=c(u.invert(l).concat(s/u.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=s/e[2];t=new oi(n,l[0]-e[0]*n,l[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new x(t,e)}function x(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function b(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(l[0],Math.min(l[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Bn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],gr(this),t.start()}ci(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(_(g(e,r),t.mouse[0],t.mouse[1]),t.extent,s))}function u(){t.wheel=null,t.end()}}function S(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=dt(et.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),a=Bn(this),o=et.clientX,l=et.clientY;Pn(et.view),ui(),t.mouse=[a,this.__zoom.invert(a)],gr(this),t.start()}function u(){if(ci(),!t.moved){var e=et.clientX-o,n=et.clientY-l;t.moved=e*e+n*n>p}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Bn(t.that),t.mouse[1]),t.extent,s))}function c(){r.on("mousemove.zoom mouseup.zoom",null),Rn(et.view,t.moved),ci(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=Bn(this),a=t.invert(e),o=t.k*(et.shiftKey?.5:2),l=i(_(g(t,o),e,a),r.apply(this,arguments),s);ci(),u>0?dt(this).transition().duration(u).call(v,l,e):dt(this).call(d.transform,l)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=et.touches,l=o.length,s=m(this,arguments,et.changedTouches.length===l);for(ui(),r=0;r<l;++r)a=[a=Gn(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],s.touch0?s.touch1||s.touch0[2]===a[2]||(s.touch1=a,s.taps=0):(s.touch0=a,e=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(s.taps<2&&(t=setTimeout((function(){t=null}),h)),gr(this),s.start())}}function k(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),l=et.changedTouches,u=l.length;for(ci(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)r=Gn(this,l,(n=l[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var c=o.touch0[0],f=o.touch0[1],h=o.touch1[0],p=o.touch1[1],d=(d=h[0]-c[0])*d+(d=h[1]-c[1])*d,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;n=g(n,Math.sqrt(d/y)),r=[(c[0]+h[0])/2,(c[1]+h[1])/2],a=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(_(n,r,a),o.extent,s))}}function z(){if(this.__zooming){var t,n,r=m(this,arguments),i=et.changedTouches,a=i.length;for(ui(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),h),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=dt(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",pi),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,l=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(_(g(a,u),o,l),t,s)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),s)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,l=null==a?y(t):"function"==typeof a?a.apply(this,arguments):a;return i(li.translate(l[0],l[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,s)}),a)},x.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){!function(t,e,n,r){var i=et;t.sourceEvent=et,et=t;try{e.apply(n,r)}finally{et=i}}(new ai(d,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:ii(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:ii(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:ii(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:ii([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],d):[l[0],l[1]]},d.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],d):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(c=t,d):c},d.on=function(){var t=f.on.apply(f,arguments);return t===f?d:t},d.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,d):Math.sqrt(p)},d}().scaleExtent(i.zoomExtent()).on("zoom",(function(){for(var t=et.transform.k,e=["gra","bn_0","bn_co","cntbn","symbol"],r=0;r<e.length;r++)i.svg().selectAll("."+e[r]).style("stroke-width",(function(e){return 1/t+"px"}));n.attr("transform",et.transform)})).on("end",(function(){var e=si(t.node()),n=(Bn(this),e.invert([i.width_/2,i.height_/2]));i._projection.invert(n)}));t.call(c)}return i},i.buildMapTemplate=function(){i.tooltip_?i._tooltip=Al(i.tooltip_):i._tooltip=Al();var t=Nl[i.geo()+"_"+i.proj()];i.geoCenter()||(t?i.geoCenter(t.geoCenter):i.geoCenter([.5*(s.bbox[0]+s.bbox[2]),.5*(s.bbox[1]+s.bbox[3])])),i.pixSize()||(t?i.pixSize(800*t.pixSize/i.width()):i.pixSize(Math.min((s.bbox[2]-s.bbox[0])/i.width_,(s.bbox[3]-s.bbox[1])/i.height_)));var e=[i.geoCenter_[0]-.5*i.pixSize_*i.width_,i.geoCenter_[1]-.5*i.pixSize_*i.height_,i.geoCenter_[0]+.5*i.pixSize_*i.width_,i.geoCenter_[1]+.5*i.pixSize_*i.height_];"WORLD"==i.geo_?i._projection=i.projectionFunction_?i.projectionFunction_:fl(Sl).scale(152.63).translate([i.width_/2,i.height_/2]).scale((i.width_-20)/2/Math.PI):i._projection=i.projectionFunction_?i.projectionFunction_.fitSize([i.width_,i.height_],zl(e)):function(){var t,e,n,r,i,a,o,l=1,s=0,u=0,c=1,f=1,h=0,p=null,d=1,g=1,_=Gi({point:function(t,e){var n=m([t,e]);this.stream.point(n[0],n[1])}}),y=Bi;function v(){return d=l*c,g=l*f,a=o=null,m}function m(n){var r=n[0]*d,i=n[1]*g;if(h){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+s,i+u]}return m.invert=function(n){var r=n[0]-s,i=n[1]-u;if(h){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/d,i/g]},m.stream=function(t){return a&&o===t?a:a=_(y(o=t))},m.postclip=function(t){return arguments.length?(y=t,p=n=r=i=null,v()):y},m.clipExtent=function(t){return arguments.length?(y=null==t?(p=n=r=i=null,Bi):Ui(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},m.scale=function(t){return arguments.length?(l=+t,v()):l},m.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],v()):[s,u]},m.angle=function(n){return arguments.length?(e=Ci(h=n%360*Ti),t=Ai(h),v()):h*wi},m.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},m.reflectY=function(t){return arguments.length?(f=t?-1:1,v()):f<0},m.fitExtent=function(t,e){return aa(m,t,e)},m.fitSize=function(t,e){return oa(m,t,e)},m.fitWidth=function(t,e){return la(m,t,e)},m.fitHeight=function(t,e){return sa(m,t,e)},m}().reflectY(!0).fitSize([i.width_,i.height_],zl(e)),i._geom.path=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Zi(t,n(r))),r.result()}return a.area=function(t){return Zi(t,n(Aa)),Aa.result()},a.measure=function(t){return Zi(t,n(So)),So.result()},a.bounds=function(t){return Zi(t,n(ra)),ra.result()},a.centroid=function(t){return Zi(t,n(Xa)),Xa.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Bi):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new wo):new Ka(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}().projection(i._projection),"WORLD"==i.geo_?(i._geom.worldrg=Tl(s,s.objects.CNTR_RG_20M_2020_4326).features,i._geom.worldbn=Tl(s,s.objects.CNTR_BN_20M_2020_4326).features,i._geom.kosovo=Tl(s,s.objects.NUTS_BN_20M_2021_RS_XK_border).features,i._geom.gra=[Fo().step([30,30])()]):(i._geom.gra=Tl(s,s.objects.gra).features,i._geom.nutsrg=Tl(s,s.objects.nutsrg).features,i._geom.nutsbn=Tl(s,s.objects.nutsbn).features,i._geom.cntrg=Tl(s,s.objects.cntrg).features,i._geom.cntbn=Tl(s,s.objects.cntbn).features);var a,o=i.svg().select("#zoomgroup"+i.svgId_);if(o.selectAll("*").remove(),o.append("rect").attr("id","sea").attr("x",-5*i.width_).attr("y",-5*i.height_).attr("width",11*i.width_).attr("height",11*i.height_).style("fill",(function(){return"WORLD"==i.geo_?"white":i.seaFillStyle_})),"WORLD"==i.geo_&&o.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",i._geom.path).attr("stroke",i.graticuleStroke()).attr("stroke-width",i.graticuleStrokeWidth()).attr("fill",i.seaFillStyle_),i.drawCoastalMargin_){var l=o.append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",i.coastalMarginWidth_).style("stroke",i.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");i._geom.cntbn&&l.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(i._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._geom.path),i._geom.nutsbn&&l.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(i._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._geom.path),i._geom.worldbn&&l.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(i._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",i._geom.path)}if(i._geom.gra&&i.drawGraticule_&&o.append("g").attr("id","g_gra").style("fill","none").style("stroke",i.graticuleStroke()).style("stroke-width",i.graticuleStrokeWidth()).selectAll("path").data(i._geom.gra).enter().append("path").attr("d",i._geom.path).attr("class","gra"),i._geom.cntrg&&o.append("g").attr("id","g_cntrg").selectAll("path").data(i._geom.cntrg).enter().append("path").attr("d",i._geom.path).attr("class","cntrg").style("fill",i.cntrgFillStyle()),i._geom.worldrg&&o.append("g").attr("id","g_worldrg").selectAll("path").data(i._geom.worldrg).enter().append("path").attr("d",i._geom.path).attr("class","worldrg").attr("fill",i.worldFillStyle_),i._geom.nutsrg)if("mixed"==i.nutsLvl_){if(i._geom.mixed.rg0=i._geom.nutsrg,i._geom.mixed.rg1=Tl(u[1],u[1].objects.nutsrg).features,i._geom.mixed.rg2=Tl(u[2],u[2].objects.nutsrg).features,i._geom.mixed.rg3=Tl(u[3],u[3].objects.nutsrg).features,[i._geom.mixed.rg0,i._geom.mixed.rg1,i._geom.mixed.rg2,i._geom.mixed.rg3].forEach((function(t,e){o.append("g").attr("id","g_nutsrg").selectAll("path").data(t).enter().append("path").attr("d",i._geom.path).attr("class","nutsrg").attr("lvl",e).attr("fill",i.nutsrgFillStyle_)})),"EUR"==i.geo_){var p=Tl(Cl[i.scale_],"nutsbn_1").features;i.bordersToShow_.includes("cc")&&o.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(p).enter().append("path").attr("d",i._geom.path).style("stroke","grey").style("stroke-width",.3)}}else o.append("g").attr("id","g_nutsrg").selectAll("path").data(i._geom.nutsrg).enter().append("path").attr("d",i._geom.path).attr("class","nutsrg").attr("fill",i.nutsrgFillStyle_);if(i._geom.cntbn&&o.append("g").attr("id","g_cntbn").style("fill","none").selectAll("path").data(i._geom.cntbn).enter().append("path").filter((function(t){return i.bordersToShow_.includes("eu")&&"T"==t.properties.eu||i.bordersToShow_.includes("efta")&&"T"==t.properties.efta||i.bordersToShow_.includes("cc")&&"T"==t.properties.cc||i.bordersToShow_.includes("oth")&&"T"==t.properties.oth||i.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).attr("d",i._geom.path).attr("class",(function(t){return"T"===t.properties.co?"bn_co":"cntbn"})).style("stroke",(function(t){return"T"===t.properties.co?i.cntbnStroke_.co:"T"===t.properties.eu?i.cntbnStroke_.eu:"T"===t.properties.efta?i.cntbnStroke_.efta:"T"===t.properties.cc?i.cntbnStroke_.cc:"T"===t.properties.oth?i.cntbnStroke_.oth:void 0})).style("stroke-width",(function(t){return"T"===t.properties.co?i.cntbnStrokeWidth_.co+"px":"T"===t.properties.eu?i.cntbnStrokeWidth_.eu+"px":"T"===t.properties.efta?i.cntbnStrokeWidth_.efta+"px":"T"===t.properties.cc?i.cntbnStrokeWidth_.cc+"px":"T"===t.properties.oth?i.cntbnStrokeWidth_.oth+"px":void 0})),i._geom.nutsbn&&(i._geom.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),o.append("g").attr("id","g_nutsbn").style("fill","none").selectAll("path").data(i._geom.nutsbn).enter().filter((function(t){return i.bordersToShow_.includes("eu")&&"T"==t.properties.eu||i.bordersToShow_.includes("efta")&&"T"==t.properties.efta||i.bordersToShow_.includes("cc")&&"T"==t.properties.cc||i.bordersToShow_.includes("oth")&&"T"==t.properties.oth||i.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).append("path").attr("d",i._geom.path).attr("class",(function(t){return"T"===(t=t.properties).co?"bn_co":["bn_"+t.lvl].join(" ")})).style("stroke",(function(t){return"T"===(t=t.properties).co?i.nutsbnStroke_.co||"#1f78b4":t.id>1e5?"#4f4f4f":i.nutsbnStroke_[t.lvl]||"#777"})).style("stroke-width",(function(t){return"T"===(t=t.properties).co?i.nutsbnStrokeWidth_.co:t.id>1e5?.2:t.lvl>0?i.nutsbnStrokeWidth_[t.lvl]:i.nutsbnStrokeWidth_[t.lvl]||.2})),"EUR"==i.geo_)){var d=Tl(Cl[i.scale_],"nutsbn_1").features;i.bordersToShow_.includes("cc")&&o.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(d).enter().append("path").attr("d",i._geom.path).style("stroke","grey").style("stroke-width",.3)}if(i._geom.worldbn&&o.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(i._geom.worldbn).enter().append("path").attr("d",i._geom.path).style("stroke",(function(t){return t.properties.POL_STAT>0?"#b2b2b2":"F"==t.properties.COAS_FLAG?i.worldStroke_:"T"==t.properties.COAS_FLAG?i.worldCoastStroke_:void 0})).style("stroke-width",(function(t){return"F"==t.properties.COAS_FLAG?i.worldStrokeWidth_:"T"==t.properties.COAS_FLAG?i.worldCoastStrokeWidth_:void 0})),i._geom.kosovo&&o.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(i._geom.kosovo).enter().append("path").attr("d",i._geom.path).style("stroke","#4f4f4f").style("stroke-width",(function(t){return"0.3px"})),n&&(c?a="mixed"==i.nutsLvl_?[].concat(r(c[0].features),r(c[1].features),r(c[2].features),r(c[3].features)):c.features:"WORLD"==i.geo_&&(a=[],i._geom.worldrg.forEach((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ll(Object(n),!0).forEach((function(e){Tn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);e.geometry={coordinates:Wo(t),type:"Point"},a.push(e)}))),o.append("g").attr("id","g_ps").selectAll("g").data(a).enter().append("g").attr("transform",(function(t){return"translate("+i._projection(t.geometry.coordinates)+")"})).attr("class","symbol").style("fill","gray").attr("id",(function(t){return"ps"+t.properties.id})).on("mouseover",(function(t){if(i.countriesToShow_){if(i.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var e=dt(this.childNodes[0]);e.attr("fill___",e.style("fill")),e.style("fill",i.nutsrgSelFillSty_),i._tooltip&&i._tooltip.mouseover(i.tooltip_.textFunction(t,i))}}else{var n=dt(this.childNodes[0]);n.attr("fill___",n.style("fill")),n.style("fill",i.nutsrgSelFillSty_),i._tooltip&&i._tooltip.mouseover(i.tooltip_.textFunction(t,i))}})).on("mousemove",(function(t){i.countriesToShow_?i.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&i._tooltip&&i._tooltip.mousemove():i._tooltip&&i._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this.childNodes[0]);t.style("fill",t.attr("fill___")),i._tooltip&&i._tooltip.mouseout()}))),i.labelling_&&f(i,o),i.title()&&(i.titlePosition()||i.titlePosition([10,5+i.titleFontSize()]),i.svg().append("text").attr("id","title"+i.geo_).attr("class","eurostat-map-title").style("pointer-events","none").attr("x",i.titlePosition()[0]).attr("y",i.titlePosition()[1]).text(i.title()).style("font-family",i.fontFamily_).style("font-size",i.titleFontSize()+"px").style("font-weight",i.titleFontWeight()).style("fill",i.titleFill()).style("stroke",i.titleStroke()).style("stroke-width",i.titleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),i.subtitle()&&(i.subtitlePosition()||i.subtitlePosition([10,8+i.titleFontSize()+5+i.subtitleFontSize()]),i.svg().append("text").attr("id","subtitle"+i.geo_).attr("class","eurostat-map-subtitle").style("pointer-events","none").attr("x",i.subtitlePosition()[0]).attr("y",i.subtitlePosition()[1]).text(i.subtitle()).style("font-family",i.fontFamily_).style("font-size",i.subtitleFontSize()+"px").style("font-weight",i.subtitleFontWeight()).style("fill",i.subtitleFill()).style("stroke",i.subtitleStroke()).style("stroke-width",i.subtitleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),i.bottomText()&&i.svg().append("text").attr("id","bottomtext").attr("x",i.botTxtPadding_).attr("y",i.height_-i.botTxtPadding_).text(i.bottomText()).style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("fill",i.botTxtFill_).on("mouseover",(function(){i._tooltip.mw___=i._tooltip.style("max-width"),i._tooltip.style("max-width","400px"),i._tooltip.style("font-size",i.botTxtFontSize_),i.botTxtTooltipTxt_&&i._tooltip.mouseover(i.botTxtTooltipTxt_)})).on("mousemove",(function(){i.botTxtTooltipTxt_&&i._tooltip.mousemove()})).on("mouseout",(function(){i.botTxtTooltipTxt_&&i._tooltip.mouseout(),i._tooltip.style("max-width",i._tooltip.mw___)})),i.showSourceLink_&&i.stat()&&i.stat().eurostatDatasetCode){var g=i.stat().eurostatDatasetCode,_="https://ec.europa.eu/eurostat/databrowser/view/".concat(g,"/default/table?lang=en"),y=i.svg().append("a").attr("href",_).attr("target","_blank").append("text").attr("id","source-dataset-link").attr("x",i.width_-i.botTxtPadding_).attr("y",i.height_-i.botTxtPadding_).text("EUROSTAT").style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("font-weight","bold").attr("text-anchor","end").on("mouseover",(function(){var t=dt(this);t.attr("fill","lightblue"),t.style("cursor","pointer"),t.style("text-decoration","underline")})).on("mouseout",(function(){var t=dt(this);t.attr("fill","black"),t.style("cursor","default"),t.style("text-decoration","none")})).node().getComputedTextLength();i.svg().append("text").attr("x",i.width_-i.botTxtPadding_-y-2).attr("y",i.height_-i.botTxtPadding_).text("Source:").style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("stroke-width","0.3px").attr("text-anchor","end")}return i.showScalebar_&&(2!==i.scalebarPosition_.length&&(i.scalebarPosition_[0]=15,i.scalebarPosition_[1]=i.height_-50),function(){var t,e,n=i.svg().append("svg").attr("id","scalebar").attr("x",i.scalebarPosition_[0]).attr("y",i.scalebarPosition_[1]),r=(i.scalebarSegmentHeight_,5),a=i.scalebarMaxWidth_,o=i.scalebarTextOffset_[0],l=i.scalebarTextOffset_[1],s=i.pixSize_,u=(t=a*s,5*(e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))))<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]),c=u[0]/s,f=u[1],p=i.svg().append("svg").attr("id","scalebar").attr("x",i.scalebarPosition_[0]).attr("y",i.scalebarPosition_[1]).attr("width",a+20).attr("height",i.scalebarHeight_);p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",1).attr("x2",c+r).attr("y2",1).style("stroke","#000").style("stroke-width","0.8px"),p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",i.scalebarSegmentHeight_).attr("x2",c+r).attr("y2",i.scalebarSegmentHeight_).style("stroke","#000").style("stroke-width","0.8px"),p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",1).attr("x2",r).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px"),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",r+o).attr("y",i.scalebarTickHeight_+l).text("0").style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_).attr("text-anchor","middle");var d={1:4,2:2,5:5}[f],g=c/d;if(g>=15){for(var _=1;_<d;_++)p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_/2+_*g).attr("y1",1).attr("x2",r+i.scalebarStrokeWidth_/2+_*g).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width","0.8px").style("stroke","black").style("stroke-width",i.scalebarStrokeWidth_),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",r+o+_*g).attr("y",i.scalebarTickHeight_+l).text(h(u[0]/d*_)).style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_).attr("text-anchor","middle");for(var y=-1;y<d;y+=2)if(1==y)n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_-1).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+y*g).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px");else{var v=r+i.scalebarStrokeWidth_/2+(y-1)*g;v>0&&n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",v).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+y*g).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width","0.8px")}}else n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_-1).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+g*d).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px");p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",c+r).attr("y1",1).attr("x2",c+r).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px"),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",c+r+o).attr("y",i.scalebarTickHeight_+l).text(h(u[0])+i.scalebarUnits_).style("text-anchor","middle").style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_)}()),i},i.updateLabels=function(){var t=i.svg_.selectAll("g.labels-container > *");if(t&&t.remove(),i.labelling_){var e=i.svg_.select("#zoomgroup"+i.svgId_);f(i,e),i.labelsToShow_.includes("values")&&i.updateValuesLabels()}};var p=function(e,r){var a=t(0,n);for(var o in(e=e||{}).proj=e.proj||Ol[e.geo],e.scale=e.scale||i.insetScale_,e.bottomText=e.bottomText||"",e.showSourceLink=e.showSourceLink||!1,e.botTxtTooltipTxt=e.botTxtTooltipTxt||"",e.zoomExtent=e.zoomExtent||i.insetZoomExtent_,e.width=e.width||i.insetBoxWidth_,e.height=e.height||i.insetBoxWidth_,e.insets=e.insets||[],e.insetTemplates=e.insetTemplates||{},e.callback=e.callback||void 0,["nutsLvl_","nutsYear_","nutsrgFillStyle_","nutsrgSelFillSty_","nutsbnStroke_","nutsbnStrokeWidth_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","labelling_","labelFill_","labelValuesFontSize_","labelOpacity_","labelStroke_","labelStrokeWidth_","labelShadowWidth_","labelShadow_","labelShadowColor_","labelsToShow_","fontFamily_","lg_","projectionFunction_"].forEach((function(t){a[t]=i[t]})),["stat","statData","legend","legendObj","noDataText","lg","transitionDuration","tooltip_","classToText_"].forEach((function(t){a[t]=i[t]})),e)a[o+"_"]=e[o];return a};return i},Nl={EUR_3035:{geoCenter:[497e4,335e4],pixSize:6800},IC_32628:{geoCenter:[443468,3145647],pixSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixSize:130},MQ_32620:{geoCenter:[716521,1621322],pixSize:130},GF_32622:{geoCenter:[266852,444074],pixSize:500},RE_32740:{geoCenter:[348011,7661627],pixSize:130},YT_32738:{geoCenter:[516549,8583920],pixSize:70},MT_3035:{geoCenter:[4719755,1441701],pixSize:70},PT20_32626:{geoCenter:[397418,4271471],pixSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixSize:40},IS_3035:{geoCenter:[3011804,496e4],pixSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixSize:500},WORLD_54030:{geoCenter:[14,17],pixSize:9e3}},Dl=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],r=0;r<n.length;r++)n[r].drawGraticule=!1;return n},Ol={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"},Pl={},Rl={};function Il(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Wl(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function jl(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Hl(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,s=a<=0,u=!1;function c(){if(s)return Rl;if(u)return u=!1,Pl;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?s=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=c())!==Rl;){for(var f=[];r!==Pl&&r!==Rl;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+jl(-e,6):e>9999?"+"+jl(e,6):jl(e,4))+"-"+jl(t.getUTCMonth()+1,2)+"-"+jl(t.getUTCDate(),2)+(a?"T"+jl(n,2)+":"+jl(r,2)+":"+jl(i,2)+"."+jl(a,3)+"Z":i?"T"+jl(n,2)+":"+jl(r,2)+":"+jl(i,2)+"Z":r||n?"T"+jl(n,2)+":"+jl(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Il(t);return function(r,i){return e(n(r),i,t)}}(t,e):Il(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Wl(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Wl(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Ul=Hl(","),Bl=Ul.parse,Gl=(Ul.parseRows,Ul.format,Ul.formatBody,Ul.formatRows,Ul.formatRow,Ul.formatValue,Hl("\t")),ql=Gl.parse;function Vl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Yl(t,e){return fetch(t,e).then(Vl)}function Xl(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Yl(e,n).then((function(e){return t(e,r)}))}}Gl.parseRows,Gl.format,Gl.formatBody,Gl.formatRows,Gl.formatRow,Gl.formatValue;var Kl=Xl(Bl);function Jl(t){var e,n,r,i,a=function(t,e){var n,r=[];if("string"==typeof t&&(t=[t]),Array.isArray(t)){if(t.length===e)return t;if(1===t.length){for(n=0;n<e;n++)r.push(t[0]);return r}}for(n=0;n<e;n++){var i=void 0===t[n]?null:t[n];r.push(i)}return r};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var o=[],l=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new Jl(t);for(n in t)l++,o.push(n);this.__tree__=t,this.length=l,this.id=o;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=e=t.__tree__:this.__tree__=e=t,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.updated=e.updated||null,this.source=e.source||null,this.extension=e.extension||null;var s,u=0,c=e.size||e.dimension&&e.dimension.size;if(this.size=c,this.value=e.hasOwnProperty("value")&&null!==e.value&&0!==e.value.length?e.value:{},Array.isArray(this.value))u=this.value.length;else{var f=1;for(s=c.length;s--;)f*=c[s];u=f}if(this.value=a(this.value,u),this.status=e.hasOwnProperty("status")?a(e.status,u):null,e.hasOwnProperty("dimension")){var h=e.dimension,p=e.role||!e.version&&h.role||null,d=e.id||h.id,g=c.length,_=function(t){p.hasOwnProperty(t)||(p[t]=null)};if(!Array.isArray(d)||!Array.isArray(c)||d.length!=g)return;if(this.length=g,this.id=d,p&&(_("time"),_("geo"),_("metric"),_("classification")),p&&null===p.classification){var y=[],v=["time","geo","metric"],m=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(s=0;s<3;s++){var x=p[v[s]];null!==x&&(y=y.concat(x))}for(p.classification=[],s=0;s<g;s++)m(d[s],y)||p.classification.push(d[s]);0===p.classification.length&&(p.classification=null)}this.role=p,this.n=u;for(var b=0,S=this.length;b<S;b++)if(h[d[b]].category.hasOwnProperty("index")){if(Array.isArray(h[d[b]].category.index)){var w={},T=h[d[b]].category.index;for(r=T.length,i=0;i<r;i++)w[T[i]]=i;h[d[b]].category.index=w}}else{var k=0;for(n in h[d[b]].category.index={},h[d[b]].category.label)h[d[b]].category.index[n]=k++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new Jl({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var z=[],F=(e=t.__tree__).category;if(!e.hasOwnProperty("category"))return;if(!F.hasOwnProperty("label"))for(n in F.label={},F.index)F.label[n]=n;for(n in F.index)z[F.index[n]]=n;this.__tree__=e,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.id=z,this.length=z.length,this.role=t.role,this.hierarchy=F.hasOwnProperty("child"),this.extension=e.extension||null;break;case"category":var A=t.child;this.id=A,this.length=null===A?0:A.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var M=t.link.item;if(this.length=Array.isArray(M)?M.length:0,this.length)for(i=0;i<this.length;i++)this.id[i]=M[i].href}}}function Zl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}Xl(ql),Jl.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,r){var i=t.link.item[e];r.class===i.class&&i.id&&i.size&&i.dimension&&n.push(i)}:function(t,e,r){var i=t.link.item[e];r.class!==i.class||i.id&&i.size&&i.dimension||n.push(i)}:function(t,e,r){r.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var r=0;r<this.length;r++)e(this,r,t);return n},Jl.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],r=0;if("collection"===this.class){var i=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=i.length;r<e;r++)n.push(new Jl(i[r]));return n}if("number"==typeof t&&t>=0&&t<i.length)return new Jl(i[t]);if("string"==typeof t)for(e=i.length;r<e;r++)if(i[r].href===t)return new Jl(i[r]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;r<e;r++)n.push(this.Dataset(this.id[r]));return n}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dataset(a):null}var o=this.__tree__[t];return void 0===o?null:new Jl({class:"dataset",__tree__:o})},Jl.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,r=[],i=this.id.length,a=function(t,e){if(null!==t)for(var n in t)for(var r=null!==t[n]?t[n].length:0;r--;)if(t[n][r]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<i;n++)r.push(this.Dimension(this.id[n]));return r}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dimension(o,e):null}var l=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<i;n++){var s=this.id[n];a(l,s)===t.role&&r.push(this.Dimension(s,e))}return void 0===r[0]?null:r}return null}var u=this.__tree__.dimension;if(void 0===u)return null;var c=u[t];return void 0===c?null:e?new Jl({class:"dimension",__tree__:c,role:a(l,t)}):function(t,e){var n=[];for(var r in t)n[t[r]]=e[r];return n}(c.category.index,c.category.label)},Jl.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,r=this.id.length;n<r;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var i=this.id[t];return void 0!==i?this.Category(i):null}var a=this.__tree__.category;if(void 0===a)return null;var o=a.index[t];if(void 0===o)return null;var l=a.unit&&a.unit[t]||null,s=a.coordinates&&a.coordinates[t]||null,u=a.child&&a.child[t]||null,c=a.note&&a.note[t]||null;return new Jl({class:"category",index:o,label:a.label[t],note:c,child:u,unit:l,coord:s})},Jl.prototype.Dice=function(t,e,n){var r,i,a,o,l=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(r=!0),"boolean"==typeof n&&!0===n||(n=!1)):(r=l(e,"clone"),n=l(e,"drop"),i=l(e,"stringify"),a=l(e,"ovalue"),o=l(e,"ostatus"));var s,u=r?new Jl(JSON.parse(JSON.stringify(this))):this,c=u.status,f=[],h=[],p=function(t,e){var n,r,i,a=(n=t,r=e,i={},"[object Array]"===Object.prototype.toString.call(n[r])?(n[r].forEach((function(t,e){null!==t&&(i[String(e)]=t)})),i):n[r]);delete t[e],t[e]=a};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var d=Object.keys(t);return d.length>0&&(d.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach((n=>e[n]=u.Dimension(n).id.filter((e=>-1===t[n].indexOf(e))))),e}(t)),u.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var r=[];d.forEach((function(n){var i=t[n],a=[];i.forEach((function(t){a.push(e[n]===t)})),r.push(-1!==a.indexOf(!0))})),-1===r.indexOf(!1)&&(f.push(e.value),h.push(e.status))})),d.forEach((function(e){var n=u.Dimension(e).id,r=0,i={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(i[n]=r,r++)})),u.__tree__.dimension[e].category.index=i})),u.n=f.length,u.value=u.__tree__.value=f,u.status=u.__tree__.status=null!==c?h:null),i?((s=u.__tree__).hasOwnProperty("id")||(s.version="2.0",s.hasOwnProperty("class")||(s.class="dataset"),s.id=s.dimension.id,s.size=s.dimension.size,delete s.dimension.id,delete s.dimension.size,s.dimension.hasOwnProperty("role")&&(s.role=s.dimension.role,delete s.dimension.role)),s.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(s.status))&&delete s.status,s.hasOwnProperty("role")&&(delete s.role.classification,["geo","time","metric"].forEach((function(t){null===s.role[t]&&delete s.role[t]}))),a&&p(s,"value"),o&&s.hasOwnProperty("status")&&p(s,"status"),JSON.stringify(s)):u},Jl.prototype.Slice=function(t){if(null===this||"dataset"!==this.class)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},Jl.prototype.Data=function(t,e){var n,r,i=[],a=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(r=this.value.length,n=0;n<r;n++)i.push(this.Data(n));return i}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var o=this.value[t];return void 0===o?null:e?{value:o,status:this.status?this.status[t]:null}:o}var l="object",s=this.__tree__,u=s.size||s.dimension&&s.dimension.size,c=u.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var f=1,h=0,p=[],d=[];for(n=0;n<c;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=u[n])return null;h+=(f*=n>0?u[c-n]:1)*t[c-n-1]}else p.push(n),d.push(u[n]);if(p.length>1)return null;if(1===p.length){for(var g=0,_=d[0];g<_;g++){var y=[];for(n=0;n<c;n++)n!==p[0]?y.push(t[n]):y.push(g);i.push(this.Data(y,e))}return i}return e?{value:this.value[h],status:this.status?this.status[h]:null}:this.value[h]}l="array"}var v=function(t,e,n){var r,i=[],o={},l=t.dimension,s=t.id||l.id,u=t.size||l&&l.size;if("array"===n){for(r=e.length;r--;)o[e[r][0]]=e[r][1];e=o}for(var c=0,f=s.length;c<f;c++){var h=s[c],p=e[h];i.push("string"==typeof p?p:1===u[c]?a(l[h].category.index):null)}return i}(s,t,l),m=[],x=s.dimension,b=s.id||x.id;for(n=0,r=v.length;n<r;n++)m.push(x[b[n]].category.index[v[n]]);return this.Data(m,e)},Jl.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"===(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&void 0===t.field&&(t.field="id");var n,r,i,a,o,l=this.__tree__,s=!0===t.status;if("function"==typeof e){n=this.toTable(t);var u=[],c="array"!==t.type?0:1;for(o=(L="object"!==t.type?n.slice(c):n.rows.slice(0)).length,r=0;r<o;r++){var f=e.call(this,L[r],r);void 0!==f&&u.push(f)}return"object"===t.type?{cols:n.cols,rows:u}:("array"===t.type&&u.unshift(n[0]),u)}if("arrobj"===t.type){var h=[],p=l.role&&l.role.metric,d=function(){},g={},_=this,y=_.id,v=t.by&&-1!==y.indexOf(t.by)?t.by:null,m=!0===t.meta,x=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],b=!0===t.comma,S=!0===t.bylabel,w=function(e){if(m){var n={};return y.forEach((function(t){var e=_.Dimension(t);n[t]={label:e.label,role:e.role,categories:{id:e.id,label:_.Dimension(t,!1)}}})),{meta:{label:_.label,source:_.source,updated:_.updated,id:y,status:s,unit:t.unit,by:v,bylabel:S,drop:null!==v&&x.length>0?x:null,prefix:null!==v?N||"":null,comma:b,dimensions:n},data:e}}return e};v&&(t.field="id");var T=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:s})).shift();if(null===v&&t.unit&&p){if("id"!==t.content)for(var k=p.length;k--;){var z=this.Dimension(p[k]);g[p[k]]={};for(var F=z.length;F--;)g[p[k]][z.Category(F).label]=z.id[F]}d=function(e,n){if(-1!==p.indexOf(e)){var r=l.dimension[e].category;r.unit?A.unit=r.unit["id"!==t.content?g[e][n]:n]:A.unit=null}},t.unit=!0}else t.unit=!1;for(o=n.length,r=0;r<o;r++){var A={};for(i=n[r].length;i--;)A[T[i]]=n[r][i],d(T[i],n[r][i]);h.push(A)}if(b&&h.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==v){var M,C={},L=[],E={},N=void 0!==t.prefix?t.prefix:"";x.forEach((function(t,e){(!_.Dimension(t)||_.Dimension(t).length>1)&&(x[e]="")}));var D=y.filter((function(t){return t!==v&&-1===x.indexOf(t)})),O=_.Dimension(v),P=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")},R=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n};for(var I in"id"!==t.content?S?M=function(t,e,n){t[e][N+n[v]]=n.value}:(O.Category().forEach((function(t,e){E[t.label]=O.id[e]})),M=function(t,e,n){t[e][N+E[n[v]]]=n.value}):M=function(t,e,n){t[e][N+n[v]]=n.value},h.forEach((function(t){var e=P(t,D);void 0===C[e]&&(C[e]=R(t,D)),M(C,e,t,v)})),C)L.push(C[I]);return s=!1,w(L)}return w(h)}var W,j,H,U,B="id"===t.field;if("object"===t.type){var G="number"==typeof this.value[0]||null===this.value[0]?"number":"string";W=function(t,e){var n=B&&t||e||t;et.push({id:t,label:n,type:"string"})},j=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push({id:"status",label:i,type:"string"}),et.push({id:"value",label:r,type:G})},H=function(t){dt.push({v:t})},U=function(t){dt.push({v:t}),nt.push({c:dt})}}else W=function(t,e){var n=B&&t||e||t;et.push(n)},j=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push(i),et.push(r),tt.push(et)},H=function(t){dt.push(t)},U=function(t){dt.push(t),tt.push(dt)};var q=l.dimension,V=l.id||q.id,Y=l.size||q.size,X=V.length;if(X!=Y.length)return!1;var K=[],J=1,Z=(k=1,[]),$=[],Q=[],tt=[],et=[],nt=[];for(r=0;r<X;r++){var rt=V[r],it=q[rt].label;W(rt,it),J*=Y[r],k*=Y[r];var at=[];for(i=0;i<Y[r];i++)for(var ot in q[V[r]].category.index)if(q[V[r]].category.index[ot]===i){var lt="id"!==t.content&&q[V[r]].category.label?q[V[r]].category.label[ot]:ot;at.push(lt)}K.push(at),Z.push(k)}for(j(t.vlabel,t.slabel,s),o=K.length,r=0;r<o;r++){for(var st=[],ut=0,ct=K[r].length;ut<ct;ut++)for(var ft=0;ft<J/Z[r];ft++)st.push(K[r][ut]);$.push(st)}for(o=$.length,r=0;r<o;r++){var ht=[],pt=0;for(a=0;a<J;a++)ht.push($[r][pt]),++pt===$[r].length&&(pt=0);Q.push(ht)}for(a=0;a<J;a++){var dt=[];o=$.length;for(var gt=0;gt<o;gt++)H(Q[gt][a]);s&&H(this.status?this.status[a]:null),U(this.value[a])}return"object"===t.type?{cols:et,rows:nt}:tt},Jl.prototype.node=function(){return this.__tree__},Jl.prototype.toString=function(){return this.class};var $l=function(t){var e={__data:void 0},n=void 0;e.get=function(t){return t?n?n[t]:void 0:n},e.getValue=function(t){var n=e.get(t);return n?n.value:void 0},e.set=function(t,r){var i=(n=n||{})[t];return i?r.value?(i.value=r.value,i.status=r.status):i.value=isNaN(+r)?r:+r:n[t]=r.value?r:{value:isNaN(+r)?r:+r},e},e.setData=function(t){return e.__data=t,n={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},e.getArray=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},e.getUniqueValues=function(){return Object.values(n).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},e.getMin=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}),0)},e.getMax=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}),0)},e.isReady=function(){return null!=n},e.metadata=void 0,e.unitText_=void 0,e.retrieveFromRemote=function(t,n,a){return e.eurostatDatasetCode_?r(t,n,a):e.csvURL_&&i(a),e},e.eurostatDatasetCode_=void 0,e.filters_={lastTimePeriod:1},e.precision_=2;var r=function(t,r,i){n=null,function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Fn(function(t,e,n,r){n=n||"en",r=r||"json";var i=[];if(i.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",r,"&lang=",n),e)for(var a in e){var o=e[a];if(Array.isArray(o))for(var l=0;l<o.length;l++)i.push("&",a,"=",o[l]);else i.push("&",a,"=",o)}return i.join("")}(e.eurostatDatasetCode_,e.filters_,n))}(t,r).then((function(t){var r,a="object"==typeof(r=t)?new Jl(r):"version"===r?"1.3.1":fetch?fetch(r,undefined).then(Zl).then((function(t){return new Jl(t)})):void 0;e.metadata={label:a.label,href:a.href,source:a.source,updated:a.updated,extension:a.extension},e.metadata.time=a.Dimension("time").id[0],n=function(t){for(var e={},n=t.Dimension("geo").id,r=0;r<n.length;r++)e[n[r]]=t.Data(r);return e}(a),i&&i()}))};e.getTime=function(){return e.filters_.time||(n?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var i=function(t){n=null,Kl(e.csvURL_).then((function(r){n=function(t,e,n){for(var r={},i=0;i<t.length;i++){var a=t[i],o=a[n];r[a[e]]=o?{value:isNaN(+o)?o:+o,status:""}:{value:":",status:""}}return r}(r,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e},Ql=function(t){var e={};return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxMargin=10,e.boxPadding=7,e.boxCornerRad=7,e.boxFill="white",e.boxOpacity=.7,e.fontFill="black",e.title="",e.titleFontSize=15,e.titleFontWeight="normal",e.build=function(){e.svg=dt("#"+e.svgId),e.svg.selectAll("#g_"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","g_"+e.svgId)},e.update=function(){return console.log("Legend update function not implemented"),e},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("rx",e.boxCornerRad).attr("ry",e.boxCornerRad).style("fill",e.boxFill).style("opacity",e.boxOpacity)},e.setBoxDimension=function(){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)},e},ts=Array.prototype.slice;function es(t){return t}var ns=1e-6;function rs(t){return"translate("+(t+.5)+",0)"}function is(t){return"translate(0,"+(t+.5)+")"}function as(t){return function(e){return+t(e)}}function os(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ls(){return!this.__axis}function ss(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,s=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",c=1===t||3===t?rs:is;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):es:i,d=Math.max(a,0)+l,g=e.range(),_=+g[0]+.5,y=+g[g.length-1]+.5,v=(e.bandwidth?os:as)(e.copy()),m=f.selection?f.selection():f,x=m.selectAll(".domain").data([null]),b=m.selectAll(".tick").data(h,e).order(),S=b.exit(),w=b.enter().append("g").attr("class","tick"),T=b.select("line"),k=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(w),T=T.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",s*a)),k=k.merge(w.append("text").attr("fill","currentColor").attr(u,s*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==m&&(x=x.transition(f),b=b.transition(f),T=T.transition(f),k=k.transition(f),S=S.transition(f).attr("opacity",ns).attr("transform",(function(t){return isFinite(t=v(t))?c(t):this.getAttribute("transform")})),w.attr("opacity",ns).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:v(t))}))),S.remove(),x.attr("d",4===t||2==t?o?"M"+s*o+","+_+"H0.5V"+y+"H"+s*o:"M0.5,"+_+"V"+y:o?"M"+_+","+s*o+"V0.5H"+y+"V"+s*o:"M"+_+",0.5H"+y),b.attr("opacity",1).attr("transform",(function(t){return c(v(t))})),T.attr(u+"2",s*a),k.attr(u,s*d).text(p),m.filter(ls).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=ts.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:ts.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:ts.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function us(t){return{type:t}}function cs(){return Math.random()}["w","e"].map(us),["n","s"].map(us),["n","w","e","s","nw","ne","sw","se"].map(us),Math.cos,Math.sin,Math.PI,Math.max,Array.prototype.slice,Array.prototype.slice,Math.PI,Math.sqrt(5),function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(cs);var fs=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(cs),hs=(function t(e){function n(){var t=fs.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(cs),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(cs)),ps=(function t(e){function n(t){var n=hs.source(e)(t);return function(){return n()/t}}return n.source=t,n}(cs),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(cs),Math.PI),ds=2*ps,gs=1e-6,_s=ds-gs;function ys(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function vs(){return new ys}ys.prototype=vs.prototype={constructor:ys,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,s=r-e,u=a-t,c=o-e,f=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>gs)if(Math.abs(c*l-s*u)>gs&&i){var h=n-a,p=r-o,d=l*l+s*s,g=h*h+p*p,_=Math.sqrt(d),y=Math.sqrt(f),v=i*Math.tan((ps-Math.acos((d+f-g)/(2*_*y)))/2),m=v/y,x=v/_;Math.abs(m-1)>gs&&(this._+="L"+(t+m*u)+","+(e+m*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>u*p)+","+(this._x1=t+x*l)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),s=t+o,u=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>gs||Math.abs(this._y1-u)>gs)&&(this._+="L"+s+","+u),n&&(f<0&&(f=f%ds+ds),f>_s?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):f>gs&&(this._+="A"+n+","+n+",0,"+ +(f>=ps)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ms=vs;function xs(t){return function(){return t}}var bs=Math.abs,Ss=Math.atan2,ws=Math.cos,Ts=Math.max,ks=Math.min,zs=Math.sin,Fs=Math.sqrt,As=1e-12,Ms=Math.PI,Cs=Ms/2,Ls=2*Ms;function Es(t){return t>1?0:t<-1?Ms:Math.acos(t)}function Ns(t){return t>=1?Cs:t<=-1?-Cs:Math.asin(t)}function Ds(t){return t.innerRadius}function Os(t){return t.outerRadius}function Ps(t){return t.startAngle}function Rs(t){return t.endAngle}function Is(t){return t&&t.padAngle}function Ws(t,e,n,r,i,a,o,l){var s=n-t,u=r-e,c=o-i,f=l-a,h=f*s-c*u;if(!(h*h<As))return[t+(h=(c*(e-a)-f*(t-i))/h)*s,e+h*u]}function js(t,e,n,r,i,a,o){var l=t-n,s=e-r,u=(o?a:-a)/Fs(l*l+s*s),c=u*s,f=-u*l,h=t+c,p=e+f,d=n+c,g=r+f,_=(h+d)/2,y=(p+g)/2,v=d-h,m=g-p,x=v*v+m*m,b=i-a,S=h*g-d*p,w=(m<0?-1:1)*Fs(Ts(0,b*b*x-S*S)),T=(S*m-v*w)/x,k=(-S*v-m*w)/x,z=(S*m+v*w)/x,F=(-S*v+m*w)/x,A=T-_,M=k-y,C=z-_,L=F-y;return A*A+M*M>C*C+L*L&&(T=z,k=F),{cx:T,cy:k,x01:-c,y01:-f,x11:T*(i/b-1),y11:k*(i/b-1)}}function Hs(){var t=Ds,e=Os,n=xs(0),r=null,i=Ps,a=Rs,o=Is,l=null;function s(){var s,u,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-Cs,p=a.apply(this,arguments)-Cs,d=bs(p-h),g=p>h;if(l||(l=s=ms()),f<c&&(u=f,f=c,c=u),f>As)if(d>Ls-As)l.moveTo(f*ws(h),f*zs(h)),l.arc(0,0,f,h,p,!g),c>As&&(l.moveTo(c*ws(p),c*zs(p)),l.arc(0,0,c,p,h,g));else{var _,y,v=h,m=p,x=h,b=p,S=d,w=d,T=o.apply(this,arguments)/2,k=T>As&&(r?+r.apply(this,arguments):Fs(c*c+f*f)),z=ks(bs(f-c)/2,+n.apply(this,arguments)),F=z,A=z;if(k>As){var M=Ns(k/c*zs(T)),C=Ns(k/f*zs(T));(S-=2*M)>As?(x+=M*=g?1:-1,b-=M):(S=0,x=b=(h+p)/2),(w-=2*C)>As?(v+=C*=g?1:-1,m-=C):(w=0,v=m=(h+p)/2)}var L=f*ws(v),E=f*zs(v),N=c*ws(b),D=c*zs(b);if(z>As){var O,P=f*ws(m),R=f*zs(m),I=c*ws(x),W=c*zs(x);if(d<Ms&&(O=Ws(L,E,I,W,P,R,N,D))){var j=L-O[0],H=E-O[1],U=P-O[0],B=R-O[1],G=1/zs(Es((j*U+H*B)/(Fs(j*j+H*H)*Fs(U*U+B*B)))/2),q=Fs(O[0]*O[0]+O[1]*O[1]);F=ks(z,(c-q)/(G-1)),A=ks(z,(f-q)/(G+1))}}w>As?A>As?(_=js(I,W,L,E,f,A,g),y=js(P,R,N,D,f,A,g),l.moveTo(_.cx+_.x01,_.cy+_.y01),A<z?l.arc(_.cx,_.cy,A,Ss(_.y01,_.x01),Ss(y.y01,y.x01),!g):(l.arc(_.cx,_.cy,A,Ss(_.y01,_.x01),Ss(_.y11,_.x11),!g),l.arc(0,0,f,Ss(_.cy+_.y11,_.cx+_.x11),Ss(y.cy+y.y11,y.cx+y.x11),!g),l.arc(y.cx,y.cy,A,Ss(y.y11,y.x11),Ss(y.y01,y.x01),!g))):(l.moveTo(L,E),l.arc(0,0,f,v,m,!g)):l.moveTo(L,E),c>As&&S>As?F>As?(_=js(N,D,P,R,c,-F,g),y=js(L,E,I,W,c,-F,g),l.lineTo(_.cx+_.x01,_.cy+_.y01),F<z?l.arc(_.cx,_.cy,F,Ss(_.y01,_.x01),Ss(y.y01,y.x01),!g):(l.arc(_.cx,_.cy,F,Ss(_.y01,_.x01),Ss(_.y11,_.x11),!g),l.arc(0,0,c,Ss(_.cy+_.y11,_.cx+_.x11),Ss(y.cy+y.y11,y.cx+y.x11),g),l.arc(y.cx,y.cy,F,Ss(y.y11,y.x11),Ss(y.y01,y.x01),!g))):l.arc(0,0,c,b,x,g):l.lineTo(N,D)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Ms/2;return[ws(r)*n,zs(r)*n]},s.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),s):e},s.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),s):n},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xs(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:xs(+t),s):i},s.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:xs(+t),s):a},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:xs(+t),s):o},s.context=function(t){return arguments.length?(l=null==t?null:t,s):l},s}function Us(t){this._context=t}function Bs(t){return new Us(t)}function Gs(t){return t[0]}function qs(t){return t[1]}function Vs(){var t=Gs,e=qs,n=xs(!0),r=null,i=Bs,a=null;function o(o){var l,s,u,c=o.length,f=!1;for(null==r&&(a=i(u=ms())),l=0;l<=c;++l)!(l<c&&n(s=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(s,l,o),+e(s,l,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:xs(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function Ys(){var t=Gs,e=null,n=xs(0),r=qs,i=xs(!0),a=null,o=Bs,l=null;function s(s){var u,c,f,h,p,d=s.length,g=!1,_=new Array(d),y=new Array(d);for(null==a&&(l=o(p=ms())),u=0;u<=d;++u){if(!(u<d&&i(h=s[u],u,s))===g)if(g=!g)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=u-1;f>=c;--f)l.point(_[f],y[f]);l.lineEnd(),l.areaEnd()}g&&(_[u]=+t(h,u,s),y[u]=+n(h,u,s),l.point(e?+e(h,u,s):_[u],r?+r(h,u,s):y[u]))}if(p)return l=null,p+""||null}function u(){return Vs().defined(i).curve(o).context(a)}return s.x=function(n){return arguments.length?(t="function"==typeof n?n:xs(+n),e=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:xs(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),r=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),s):n},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xs(+t),s):r},s.lineX0=s.lineY0=function(){return u().x(t).y(n)},s.lineY1=function(){return u().x(t).y(r)},s.lineX1=function(){return u().x(e).y(n)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:xs(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=a&&(l=o(a)),s):o},s.context=function(t){return arguments.length?(null==t?a=l=null:l=o(a=t),s):a},s}function Xs(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ks(t){return t}function Js(){var t=Ks,e=Xs,n=null,r=xs(0),i=xs(Ls),a=xs(0);function o(o){var l,s,u,c,f,h=o.length,p=0,d=new Array(h),g=new Array(h),_=+r.apply(this,arguments),y=Math.min(Ls,Math.max(-Ls,i.apply(this,arguments)-_)),v=Math.min(Math.abs(y)/h,a.apply(this,arguments)),m=v*(y<0?-1:1);for(l=0;l<h;++l)(f=g[d[l]=l]=+t(o[l],l,o))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(o[t],o[e])})),l=0,u=p?(y-h*m)/p:0;l<h;++l,_=c)s=d[l],c=_+((f=g[s])>0?f*u:0)+m,g[s]={data:o[s],index:l,value:f,startAngle:_,endAngle:c,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:xs(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:xs(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:xs(+t),o):a},o}function Zs(){this._=null}function $s(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Qs(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function tu(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function eu(t){for(;t.L;)t=t.L;return t}Us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Zs.prototype={constructor:Zs,insert:function(t,e){var n,r,i;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=eu(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;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Qs(this,n),n=(t=n).U),n.C=!1,r.C=!0,tu(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(tu(this,n),n=(t=n).U),n.C=!1,r.C=!0,Qs(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,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?eu(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Qs(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,tu(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Qs(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,tu(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Qs(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,tu(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var nu=Zs;function ru(t,e,n,r){var i=[null,null],a=Fu.push(i)-1;return i.left=t,i.right=e,n&&au(i,t,e,n),r&&au(i,e,t,r),ku[t.index].halfedges.push(a),ku[e.index].halfedges.push(a),i}function iu(t,e,n){var r=[e,n];return r.left=t,r}function au(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function ou(t,e,n,r,i){var a,o=t[0],l=t[1],s=o[0],u=o[1],c=0,f=1,h=l[0]-s,p=l[1]-u;if(a=e-s,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-u,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-u,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[s+c*h,u+c*p]),f<1&&(t[1]=[s+f*h,u+f*p]),!0)}}}}}function lu(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,s=t[0],u=t.left,c=t.right,f=u[0],h=u[1],p=c[0],d=c[1],g=(f+p)/2,_=(h+d)/2;if(d===h){if(g<e||g>=r)return;if(f>p){if(s){if(s[1]>=i)return}else s=[g,n];a=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];a=[g,n]}}else if(l=_-(o=(f-p)/(d-h))*g,o<-1||o>1)if(f>p){if(s){if(s[1]>=i)return}else s=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(s){if(s[1]<n)return}else s=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(s){if(s[0]>=r)return}else s=[e,o*e+l];a=[r,o*r+l]}else{if(s){if(s[0]<e)return}else s=[r,o*r+l];a=[e,o*e+l]}return t[0]=s,t[1]=a,!0}function su(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function uu(t,e){return e[+(e.left!==t.site)]}function cu(t,e){return e[+(e.left===t.site)]}var fu,hu=[];function pu(){$s(this),this.x=this.y=this.arc=this.site=this.cy=null}function du(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],s=r[0]-o,u=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(s*f-u*c);if(!(h>=-Mu)){var p=s*s+u*u,d=c*c+f*f,g=(f*p-u*d)/h,_=(s*d-c*p)/h,y=hu.pop()||new pu;y.arc=t,y.site=i,y.x=g+o,y.y=(y.cy=_+l)+Math.sqrt(g*g+_*_),t.circle=y;for(var v=null,m=zu._;m;)if(y.y<m.y||y.y===m.y&&y.x<=m.x){if(!m.L){v=m.P;break}m=m.L}else{if(!m.R){v=m;break}m=m.R}zu.insert(v,y),v||(fu=y)}}}}function gu(t){var e=t.circle;e&&(e.P||(fu=e.N),zu.remove(e),hu.push(e),$s(e),t.circle=null)}var _u=[];function yu(){$s(this),this.edge=this.site=this.circle=null}function vu(t){var e=_u.pop()||new yu;return e.site=t,e}function mu(t){gu(t),Tu.remove(t),_u.push(t),$s(t)}function xu(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];mu(t);for(var s=a;s.circle&&Math.abs(n-s.circle.x)<Au&&Math.abs(r-s.circle.cy)<Au;)a=s.P,l.unshift(s),mu(s),s=a;l.unshift(s),gu(s);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Au&&Math.abs(r-u.circle.cy)<Au;)o=u.N,l.push(u),mu(u),u=o;l.push(u),gu(u);var c,f=l.length;for(c=1;c<f;++c)u=l[c],s=l[c-1],au(u.edge,s.site,u.site,i);s=l[0],(u=l[f-1]).edge=ru(s.site,u.site,null,i),du(s),du(u)}function bu(t){for(var e,n,r,i,a=t[0],o=t[1],l=Tu._;l;)if((r=Su(l,o)-a)>Au)l=l.L;else{if(!((i=a-wu(l,o))>Au)){r>-Au?(e=l.P,n=l):i>-Au?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){ku[t.index]={site:t,halfedges:[]}}(t);var s=vu(t);if(Tu.insert(e,s),e||n){if(e===n)return gu(e),n=vu(e.site),Tu.insert(s,n),s.edge=n.edge=ru(e.site,s.site),du(e),void du(n);if(n){gu(e),gu(n);var u=e.site,c=u[0],f=u[1],h=t[0]-c,p=t[1]-f,d=n.site,g=d[0]-c,_=d[1]-f,y=2*(h*_-p*g),v=h*h+p*p,m=g*g+_*_,x=[(_*v-p*m)/y+c,(h*m-g*v)/y+f];au(n.edge,u,d,x),s.edge=ru(u,t,null,x),n.edge=ru(t,d,null,x),du(e),du(n)}else s.edge=ru(e.site,s.site)}}function Su(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],s=n[1],u=s-e;if(!u)return l;var c=l-r,f=1/a-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-s+u/2+i-a/2)))/f+r:(r+l)/2}function wu(t,e){var n=t.N;if(n)return Su(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Tu,ku,zu,Fu,Au=1e-6,Mu=1e-12;function Cu(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Lu(t,e){return e[1]-t[1]||e[0]-t[0]}function Eu(t,e){var n,r,i,a=t.sort(Lu).pop();for(Fu=[],ku=new Array(t.length),Tu=new nu,zu=new nu;;)if(i=fu,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(bu(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;xu(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ku.length;i<a;++i)if((t=ku[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=su(t,Fu[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],s=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=Fu.length;a--;)lu(i=Fu[a],t,e,n,r)&&ou(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Au||Math.abs(i[0][1]-i[1][1])>Au)||delete Fu[a]}(o,l,s,u),function(t,e,n,r){var i,a,o,l,s,u,c,f,h,p,d,g,_=ku.length,y=!0;for(i=0;i<_;++i)if(a=ku[i]){for(o=a.site,l=(s=a.halfedges).length;l--;)Fu[s[l]]||s.splice(l,1);for(l=0,u=s.length;l<u;)d=(p=cu(a,Fu[s[l]]))[0],g=p[1],f=(c=uu(a,Fu[s[++l%u]]))[0],h=c[1],(Math.abs(d-f)>Au||Math.abs(g-h)>Au)&&(s.splice(l,0,Fu.push(iu(o,p,Math.abs(d-t)<Au&&r-g>Au?[t,Math.abs(f-t)<Au?h:r]:Math.abs(g-r)<Au&&n-d>Au?[Math.abs(h-r)<Au?f:n,r]:Math.abs(d-n)<Au&&g-e>Au?[n,Math.abs(f-n)<Au?h:e]:Math.abs(g-e)<Au&&d-t>Au?[Math.abs(h-e)<Au?f:t,e]:null))-1),++u);u&&(y=!1)}if(y){var v,m,x,b=1/0;for(i=0,y=null;i<_;++i)(a=ku[i])&&(x=(v=(o=a.site)[0]-t)*v+(m=o[1]-e)*m)<b&&(b=x,y=a);if(y){var S=[t,e],w=[t,r],T=[n,r],k=[n,e];y.halfedges.push(Fu.push(iu(o=y.site,S,w))-1,Fu.push(iu(o,w,T))-1,Fu.push(iu(o,T,k))-1,Fu.push(iu(o,k,S))-1)}}for(i=0;i<_;++i)(a=ku[i])&&(a.halfedges.length||delete ku[i])}(o,l,s,u)}this.edges=Fu,this.cells=ku,Tu=zu=Fu=ku=null}function Nu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Du(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Du(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function Du(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Eu.prototype={constructor:Eu,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return uu(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l=n.site,s=-1,u=e[i[a-1]],c=u.left===l?u.right:u.left;++s<a;)o=c,c=(u=e[i[s]]).left===l?u.right:u.left,o&&c&&r<o.index&&r<c.index&&Cu(l,o,c)<0&&t.push([l.data,o.data,c.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var s=t-i.site[0],u=e-i.site[1],c=s*s+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var s=t-l[0],u=e-l[1],f=s*s+u*u;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};var Ou=function(t,e){var n=El(0,e);if(n.stat_={default:void 0},n.stat=function(t,e){return arguments.length?2==arguments.length?(n.stat_[t]=e,n):"string"==typeof t||t instanceof String?n.stat_[t]:(n.stat_=t.default?t:{default:t},n):n.stat_.default},n.statData_={default:$l(),color:$l(),size:$l(),v1:$l(),v2:$l()},n.statData=function(t,e){return arguments.length?1==arguments.length?n.statData_[t]:(n.statData_[t]=e,n):n.statData_.default},n.noDataText_="No data available",n.lg_="en",n.transitionDuration_=500,n.tooltip_.textFunction=Ru,n.filtersDefinitionFun_=void 0,n.callback_=void 0,n.legend_=void 0,n.legendObj_=void 0,["legend_","legendObj_","noDataText_","lg_","transitionDuration_","tooltipText_","filtersDefinitionFun_","callback_"].forEach((function(t){n[t.substring(0,t.length-1)]=function(e){return arguments.length?(n[t]=e,n):n[t]}})),t)for(var r in t)n[r]&&null!=t[r]&&n[r](t[r]);n.legend=function(t){return arguments.length?(n.legend_=t,n.legendObj_&&n.legendObj().update(),n):n.legend_},n.build=function(){if(n.projectionFunction_&&n.proj("4326"),n.buildMapTemplateBase(),n.filtersDefinitionFun_&&n.filtersDefinitionFun_(n.svg(),n.clnb_),n.legend()){n.legendObj(n.getLegendConstructor()(n,n.legend()));var t=n.legendObj();if(0==dt("#"+t.svgId).size()){var e=null==t.x?n.width()-100-t.boxPadding:t.x,r=null==t.y?t.boxPadding:t.y;n.svg().append("g").attr("class","legend").attr("transform","translate("+e+","+r+")").append("svg").attr("id",t.svgId)}t.build()}return n.updateGeoData(),n.updateStatData(),n};var i=function(){for(var t in n.stat_)if(!n.statData(t).isReady())return!1;return!0};return n.updateGeoData=function(){return n.updateGeoMT((function(){i()&&(n.updateStatValues(),n.callback()&&n.callback()())})),n},n.updateStatData=function(){for(var t in n.stat_){if(!n.stat(t)&&n.statData(t).get())return;"default"!=t||n.stat(t)||n.stat(t,{eurostatDatasetCode:"demo_r_d3dens",unitText:"inhab./km²"});var e=$l(n.stat(t));n.statData(t,e);var r=n.nutsLvl_;"mixed"==n.nutsLvl_&&(r=0),e.retrieveFromRemote(r,n.lg(),(function(){n.isGeoReady()&&i()&&(n.updateStatValues(),n.callback()&&n.callback()())}))}return n},n.updateStatValues=function(){return n.updateClassification(),n.updateStyle(),n.legendObj()&&n.legendObj().update(),n},n.updateClassification=function(){return console.log("Map updateClassification function not implemented"),n},n.updateStyle=function(){return console.log("Map updateStyle function not implemented"),n},n.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),Ql},n.getTime=function(){return n.statData("default").getTime()},n.setFromURL=function(){var t=Iu();return t.w&&n.width(t.w),t.h&&n.height(t.h),t.x&&t.y&&n.geoCenter([t.x,t.y]),t.z&&n.pixSize(t.z),t.s&&n.scale(t.s),t.lvl&&n.nutsLvl(t.lvl),t.time&&(n.filters_.time=t.time,delete n.filters_.lastTimePeriod),t.proj&&n.proj(t.proj),t.geo&&n.geo(t.geo),t.ny&&n.nutsYear(t.ny),t.lg&&n.lg(t.lg),t.clnb&&n.clnb(+t.clnb),n},n.exportMapToSVG=function(){var t=Pu(n.svg_.node()),e=URL.createObjectURL(t),r=document.createElement("a");return r.href=e,r.download="eurostatmap.svg",document.body.appendChild(r),r.click(),document.body.removeChild(r),n},n.exportMapToPNG=function(){var t,e,r,i,a;return(t=n.svg_.node(),i=new Promise((function(t,n){return e=t,r=n})),(a=new Image).onerror=r,a.onload=function(){var n=t.getBoundingClientRect(),r=document.createElement("canvas");r.width=n.width,r.height=n.height;var i=r.getContext("2d");i.drawImage(a,0,0,n.width,n.height),i.canvas.toBlob(e)},a.src=URL.createObjectURL(Pu(t)),i).then((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostatmap.png",document.body.appendChild(n),n.click(),document.body.removeChild(n)})),n},n};function Pu(t){var e="http://www.w3.org/2000/xmlns/";t=t.cloneNode(!0);for(var n=window.location.href+"#",r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null,!1);r.nextNode();){var i,a=Nu(r.currentNode.attributes);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.value.includes(n)&&(o.value=o.value.replace(n,"#"))}}catch(t){a.e(t)}finally{a.f()}}t.setAttributeNS(e,"xmlns","http://www.w3.org/2000/svg"),t.setAttributeNS(e,"xmlns:xlink","http://www.w3.org/1999/xlink");var l=(new window.XMLSerializer).serializeToString(t);return new Blob([l],{type:"image/svg+xml"})}var Ru=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!==r.value&&!r.value)return n.push(e.noDataText_),n.join("");n.push(Fl(r.value));var i=e.statData("default").unitText();i&&n.push(" "+i);var a=r.status;if(a&&e.tooltip_.showFlags)if("short"===e.tooltip_.showFlags)n.push(" "+a);else{var o=wn[a];n.push(o?" ("+o+")":" "+a)}return n.join("")},Iu=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","lg","sl","clnb"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t},Wu=function(t,e){var n=Ql(t);if(n.ascending=!0,n.shapeWidth=13,n.shapeHeight=15,n.sepLineLength=17,n.sepLineStroke="black",n.sepLineStrokeWidth=1,n.labelFontSize=12,n.labelDecNb=2,n.labelOffset=3,n.labelFormatter=null,n.labels=null,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];function i(t,e){var r=t.selectAll("#g_nutsrg").selectAll("[ecl='"+e+"']");r.style("fill",n.map.nutsrgSelFillSty()),r.attr("fill___",(function(){dt(this).attr("fill")}))}function a(t,e){t.selectAll("#g_nutsrg").selectAll("[ecl='"+e+"']").style("fill",(function(){dt(this).attr("fill___")}))}return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;if(t.legend_)for(var o in t.legend_)n[o]=t.legend_[o];r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.labelFormatter?n.labelFormatter:rn("."+n.labelDecNb+"f"),s=function(o){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*n.shapeHeight,u=n.ascending?t.clnb()-o-1:o;r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()(u,t.clnb())).on("mouseover",(function(){if(dt(this).style("fill",t.nutsrgSelFillSty()),i(e,u),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var a in r)if(Array.isArray(r[a]))for(var o=0;o<r[a].length;o++)if(Array.isArray(r[a][o]))for(var l=0;l<r[a][o].length;l++)r[a][o][l].svgId_!==n.svgId_&&i(r[a][o][l].svg(),u);else r[a][o].svgId_!==n.svgId_&&i(r[a][o].svg(),u);else r[a].svgId_!==n.svgId_&&i(r[a].svg(),u)}})).on("mouseout",(function(){if(dt(this).style("fill",t.classToFillStyle()(u,t.clnb())),a(e,u),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var i in r)if(Array.isArray(r[i]))for(var o=0;o<r[i].length;o++)if(Array.isArray(r[i][o]))for(var l=0;l<r[i][o].length;l++)r[i][o][l].svgId_!==n.svgId_&&a(r[i][o][l].svg(),u);else r[i][o].svgId_!==n.svgId_&&a(r[i][o].svg(),u);else r[i].svgId_!==n.svgId_&&a(r[i].svg(),u)}})),o>0&&r.append("line").attr("class","eurostatmap-legend-line").attr("x1",n.boxPadding).attr("y1",s).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",s).attr("stroke",n.sepLineStroke).attr("stroke-width",n.sepLineStrokeWidth),o<t.clnb()-1&&r.append("text").attr("class","eurostatmap-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength)+n.labelOffset).attr("y",s+n.shapeHeight).attr("alignment-baseline","middle").text(n.labels?n.labels[o]:l(t.classifier().invertExtent(u)[n.ascending?0:1])).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<t.clnb();u++)s(u);if(n.noData){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+t.clnb()*n.shapeHeight+n.boxPadding;r.append("rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){if(dt(this).style("fill",t.nutsrgSelFillSty()),i(e,"nd"),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var a in r)if(Array.isArray(r[a]))for(var o=0;o<r[a].length;o++)if(Array.isArray(r[a][o]))for(var l=0;l<r[a][o].length;l++)r[a][o][l].svgId_!==n.svgId_&&i(r[a][o][l].svg(),"nd");else r[a][o].svgId_!==n.svgId_&&i(r[a][o].svg(),"nd");else r[a].svgId_!==n.svgId_&&i(r[a].svg(),"nd")}})).on("mouseout",(function(){if(dt(this).style("fill",t.noDataFillStyle()),a(e,"nd"),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var i in r)if(Array.isArray(r[i]))for(var o=0;o<r[i].length;o++)if(Array.isArray(r[i][o]))for(var l=0;l<r[i][o].length;l++)r[i][o][l].svgId_!==n.svgId_&&a(r[i][o][l].svg(),"nd");else r[i][o].svgId_!==n.svgId_&&a(r[i][o].svg(),"nd");else r[i].svgId_!==n.svgId_&&a(r[i].svg(),"nd")}})),r.append("text").attr("class","eurostatmap-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",c+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},ju=function(t,e){return t=t||interpolateOrRd,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Hu=bn(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(xn)),Uu={draw:function(t,e){var n=Math.sqrt(e/Ms);t.moveTo(n,0),t.arc(0,0,n,0,Ls)}},Bu={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Gu=Math.sqrt(1/3),qu=2*Gu,Vu={draw:function(t,e){var n=Math.sqrt(e/qu),r=n*Gu;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Yu=Math.sin(Ms/10)/Math.sin(7*Ms/10),Xu=Math.sin(Ls/10)*Yu,Ku=-Math.cos(Ls/10)*Yu,Ju={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Xu*n,i=Ku*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=Ls*a/5,l=Math.cos(o),s=Math.sin(o);t.lineTo(s*n,-l*n),t.lineTo(l*r-s*i,s*r+l*i)}t.closePath()}},Zu={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},$u=Math.sqrt(3),Qu={draw:function(t,e){var n=-Math.sqrt(e/(3*$u));t.moveTo(0,2*n),t.lineTo(-$u*n,-n),t.lineTo($u*n,-n),t.closePath()}},tc=-.5,ec=Math.sqrt(3)/2,nc=1/Math.sqrt(12),rc=3*(nc/2+1),ic={draw:function(t,e){var n=Math.sqrt(e/rc),r=n/2,i=n*nc,a=r,o=n*nc+n,l=-a,s=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(l,s),t.lineTo(tc*r-ec*i,ec*r+tc*i),t.lineTo(tc*a-ec*o,ec*a+tc*o),t.lineTo(tc*l-ec*s,ec*l+tc*s),t.lineTo(tc*r+ec*i,tc*i-ec*r),t.lineTo(tc*a+ec*o,tc*o-ec*a),t.lineTo(tc*l+ec*s,tc*s-ec*l),t.closePath()}};function ac(){var t=xs(Uu),e=xs(64),n=null;function r(){var r;if(n||(n=r=ms()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:xs(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var oc=function(t,e){var n=Ql(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:4,shapePadding:10,shapeOffset:{x:0,y:0},shapeFill:"white",labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,shapeWidth:13,shapeHeight:15,shapePadding:1,labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0,noData:!0,noDataText:"No data",sepLineLength:17,sepLineStroke:"black",sepLineStrokeWidth:1},e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;if(t.legend_)for(var r in t.legend_)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])t.legend_[r][i]&&(n[r][i]=t.legend_[r][i]);else n[r]=t.legend_[r];e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),t.classifierSize_&&function(t,e,r){var i=r.labelFormatter||Fl;r.title&&e.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var a,o,l,s=function(){var t;if(n.map.psCustomSVG_)t=n.map.psCustomSVG_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=ac().type({draw:function(t,e){var r=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,r),t.lineTo(n.map.psBarWidth_,r),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=sc[n.map.psShape_]||sc.circle;t=ac().type(e)}return t}(),u=t.classifierSize_.domain()[1];n._sizeLegendHeight=0,r.values&&(r.cellNb=r.values.length);for(var c=0,f=function(f){var h=n.ascending?r.cellNb-f+1:f,p=r.values?r.values[h-1]:u/h,d=t.classifierSize_(p),g=void 0,_=void 0;if("bar"==n.map.psShape_)g=n.boxPadding+10,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;else if("custom"==n.map.psShape_){if(n._xOffset=t.classifierSize_(u),g=n.boxPadding+n._xOffset,a||(_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,l=_,o=d,n._sizeLegendHeight=n._sizeLegendHeight+_),a){var y=a.node().getBBox();c+=y.height*o,_=l+c+r.shapePadding*(f-1),n._sizeLegendHeight=n._sizeLegendHeight+y.height+r.shapePadding,o=d}}else n._xOffset=t.classifierSize_(u)/1.5,g=n.boxPadding+n._xOffset,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight+d/2+r.shapePadding,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;if(n.map.psCustomSVG_)a=e.append("g").attr("transform","translate(".concat(g,",").concat(_,")")).attr("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(n.map.psCustomSVG_).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}));else{var v=s.size(d*d)();a=e.append("g").attr("transform","translate(".concat(g,",").concat(_,")")).style("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",v).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}))}var m=g+r.labelOffset.x,x=_+r.labelOffset.y;"bar"==n.map.psShape_?x+=d/2:"custom"==n.map.psShape_&&(x+=10*d),e.append("text").attr("x",m).attr("y",x).attr("alignment-baseline","middle").attr("class","eurostatmap-legend-label").text(i(p)).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},h=1;h<r.cellNb+1;h++)f(h)}(t,e,n.sizeLegend),t.classifierColor_&&function(t,e,r){var i=r.labelFormatter||Fl,a=t.svg();r.title&&e.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.boxPadding+n.titleFontSize+n.legendSpacing+r.titlePadding).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);for(var o=n.boxPadding,l=t.psClasses_,s=function(s){var u=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+2*r.titlePadding:0)+s*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding,c=n.ascending?s:l-s-1;e.append("g").attr("transform","translate(".concat(o,",").concat(u,")")).attr("fill",t.psClassToFillStyle()(c,l)).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",1).attr("stroke","black").attr("stroke-width",.5).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=a.select("#g_ps").selectAll("[ecl='"+c+"']"),n=dt(this.parentNode).attr("fill");dt(this).attr("fill___",n),e.each((function(e,n){dt(this.childNodes[0]).style("fill",t.nutsrgSelFillSty())})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=a.select("#g_ps").selectAll("[ecl='"+c+"']"),n=dt(this).attr("fill___");e.each((function(t,e){dt(this.childNodes[0]).style("fill",n)})),dt(this).style("fill",t.psClassToFillStyle()(c,l))}));var f=(n.map.psShape_,u);s>0&&e.append("line").attr("x1",o).attr("y1",f).attr("x2",o+r.sepLineLength).attr("y2",f).attr("stroke",r.sepLineStroke).attr("stroke-width",r.sepLineStrokeWidth);var h=u+r.labelOffset.y+1.2*n.labelFontSize;s<l-1&&e.append("text").attr("class","eurostatmap-legend-label").attr("x",o+r.labelOffset.x).attr("y",h).attr("alignment-baseline","middle").text((function(e){return i(t.classifierColor_.invertExtent(n.ascending?c+1:c-1)[n.ascending?0:1])})).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<l;u++)s(u);if(r.noData){var c=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+2*r.titlePadding:0)+t.psClasses_*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding;e.append("g").attr("transform","translate(".concat(o,",").concat(c,")")).attr("fill",t.noDataFillStyle()).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).attr("stroke-width",1).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=a.select("#g_ps").selectAll("[ecl='nd']"),n=dt(this.parentNode).attr("fill");dt(this).attr("fill___",n),e.each((function(e,n){dt(this.childNodes[0]).style("fill",t.noDataFillStyle())})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=a.select("#g_ps").selectAll("[ecl='nd']"),n=dt(this).attr("fill___");e.each((function(t,e){dt(this.childNodes[0]).style("fill",n)})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",o+r.labelOffset.x).attr("y",c+n.boxPadding).attr("alignment-baseline","middle").attr("class","eurostatmap-legend-label").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}}(t,e,n.colorLegend),n.setBoxDimension()},n},lc=function(t,e){return t=t||Hu,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},sc={cross:Bu,square:Zu,diamond:Vu,triangle:Qu,star:Ju,wye:ic,circle:Uu},uc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("size").getArray()?e.statData("size"):e.statData(),i=r.get(t.properties.id);if(!i||0!=i.value&&!i.value)n.push(e.noDataText_);else{n.push(Fl(i.value));var a=r.unitText();a&&n.push(" "+a)}if(n.push("<br>"),e.statData("color").getArray()){var o=e.statData("color").get(t.properties.id);if(!o||0!=o.value&&!o.value)n.push(e.noDataText_);else{n.push(Fl(o.value));var l=e.statData("color").unitText();l&&n.push(" "+l)}}return n.join("")},cc=xn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),fc=function(t,e){var n=Ql(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg,r=t.svg();e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&e.append("text").attr("class","eurostat-map-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);for(var i=t.classifier().domain(),a=function(a){var o=i[a],l=t.classifier()(o),s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+a*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()[o]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=dt(this);e.attr("fill___",(function(t){n.attr("fill")})),n.style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),n=dt(this);e.style("fill",(function(t){n.attr("fill___")})),n.style("fill",t.classToFillStyle()[l])})),e.append("text").attr("class","eurostat-map-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.classToText()?t.classToText()[o]:o).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=dt(this);e.attr("fill___",(function(t){n.attr("fill")}))})).on("mouseout",(function(){var t=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),e=dt(this);t.style("fill",(function(t){e.attr("fill___")}))}))},o=0;o<i.length;o++)a(o);if(n.noData){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='nd']");e.style("fill",t.nutsrgSelFillSty()),e.attr("fill___",(function(t){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){r.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){dt(this).attr("fill___")})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("class","eurostat-map-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},hc=function(t){var e=Ou(t);return e.classToFillStyle_=void 0,e.classToText_=void 0,e.noDataFillStyle_="lightgray",e.tooltip_.textFunction=pc,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=e.statData().getUniqueValues(),n=r(Array(t.length).keys());return e.classifier(Bt().domain(t).range(n)),e.svg().selectAll("path.nutsrg").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier()(isNaN(r)?r:+r):"nd"})),e},e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=cc[r%12];e.classToFillStyle(t)}var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",a=e.svg().selectAll(i);return a.transition().duration(e.transitionDuration()).attr("fill",(function(){var t=dt(this).attr("ecl");return t&&"nd"!==t?e.classToFillStyle_[e.classifier().domain()[t]]||e.noDataFillStyle_||"gray":e.noDataFillStyle_||"gray"})).end().then((function(){a.on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),e},e.getLegendConstructor=function(){return fc},e},pc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!=r.value&&!r.value)return n.push(e.noDataText_),n.join("");var i=r.value;if(e.classToText_){var a=e.classToText_[i];return n.push(a||i),n.join("")}return n.push(i),n.join("")},dc=function(t,e){var n=Ql(t);if(n.squareSize=50,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.labelFontSize=12,n.breaks1=void 0,n.breaks2=void 0,n.noData=!0,n.noDataShapeSize=15,n.noDataText="No data",n.boxPadding=n.labelFontSize,n.noDataYOffset=0,n.arrowHeight=15,n.arrowWidth=14,e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg,i=t.clnb(),a=n.squareSize/i,o=0===n.rotation?0:.7071*n.squareSize+n.boxPadding;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("class","eurostat-map-legend-title").attr("x",o).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("text-anchor","middle").style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),s=r.append("g").attr("transform","translate("+(n.boxPadding+(0==n.rotation?n.arrowWidth/2+n.labelFontSize/2:0))+","+(o+l)+") rotate("+n.rotation+") translate("+n.boxPadding+",0)"),u=0;u<i;u++)for(var c=function(r){var o=i-u-1,l=i-r-1,c=t.classToFillStyle()(o,l);s.append("rect").attr("x",(i-1-u)*a).attr("y",r*a).attr("width",a).attr("height",a).attr("fill",c).on("mouseover",(function(){var r=("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[ecl1='"+o+"']").filter("[ecl2='"+l+"']");r.style("fill",t.nutsrgSelFillSty()),r.attr("fill___",(function(){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[ecl1='"+o+"']").filter("[ecl2='"+l+"']").style("fill",(function(){dt(this).attr("fill___")})),dt(this).style("fill",c)}))},f=0;f<i;f++)c(f);if(n.breaks1)for(var h=0;h<n.breaks1.length;h++)s.append("text").attr("x",a*(h+1)).attr("y",n.squareSize+n.labelFontSize).text(n.breaks1[h]).attr("text-anchor","middle").style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill);if(n.breaks2)for(var p=0;p<n.breaks2.length;p++)console.log("legend.breaks2 not yet implemented");s.append("text").attr("x",0).attr("y",n.squareSize+n.labelFontSize+n.arrowHeight/1.5+(n.breaks1?n.labelFontSize+2:0)).text(n.label1).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("text").attr("x",0==n.rotation?-n.squareSize:-n.labelFontSize+n.arrowWidth/2).attr("y",0==n.rotation?-n.arrowWidth/1.5:n.labelFontSize+n.arrowHeight/2).attr("transform",0==n.rotation?"rotate(-90) translate(0,"+-n.labelFontSize/2+")":"rotate(90) translate("+n.labelFontSize/2+",0)").text(n.label2).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("rect").attr("x",0).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("fill","none").style("stroke","black").attr("stroke-width",.7),s.append("defs").append("marker").attr("viewBox","0 0 ".concat(n.arrowWidth," ").concat(n.arrowHeight)).attr("id","arrowhead").attr("refX",0).attr("refY",5).attr("markerWidth",n.arrowWidth).attr("markerHeight",n.arrowHeight).attr("orient","auto").append("path").attr("d","M 0 0 L 5 5 L 0 10").attr("marker-units","strokeWidth"),s.append("path").attr("d",Vs()([[0,n.squareSize+n.arrowHeight/2],[n.squareSize,n.squareSize+n.arrowHeight/2]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),s.append("path").attr("d",Vs()([[-n.arrowWidth/2,n.squareSize],[-n.arrowWidth/2,0]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.noData&&(n.noDataYOffset=0==n.rotation?n.noDataYOffset+n.squareSize/n.map.clnb_+n.arrowHeight/2:n.noDataYOffset,l=0==n.rotation?l+n.squareSize+n.noDataYOffset:l+1.4142*n.squareSize+2*n.boxPadding+n.noDataYOffset,r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.noDataShapeSize).attr("height",n.noDataShapeSize).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.7).on("mouseover",(function(){var r=("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[nd='nd']");r.style("fill",t.nutsrgSelFillSty()),r.attr("fill___",(function(t){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[nd='nd']").style("fill",(function(t){dt(this).attr("fill___")})),dt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.noDataShapeSize+n.boxPadding).attr("y",l+.5*n.noDataShapeSize).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)),n.setBoxDimension()},n},gc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("v1").get(t.properties.id);if(!r||0!=r.value&&!r.value)n.push(e.noDataText_);else{n.push(r.value);var i=e.statData("v1").unitText();i&&n.push(" "+i)}n.push("<br>");var a=e.statData("v2").get(t.properties.id);if(!a||0!=a.value&&!a.value)n.push(e.noDataText_);else{n.push(a.value);var o=e.statData("v2").unitText();o&&n.push(" "+o)}return n.join("")},_c=xn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),yc=function(t,e){var n=Ql(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);var i=0,a=t.catColors(),o=function(o){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding),s=t.catColors()[o]||"lightgray";r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",a[o]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",s),dt(this).style("fill",s)})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[o]||o).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var n=t.catColors()[o]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",n)})),i++};for(var l in a)o(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding);r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()})),dt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n},vc=function(t,e){var n=Ql(t);if(n.legendSpacing=15,n.labelFontSize=12,n.titleFontSize=12,n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:13,shapeHeight:15,shapePadding:5,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),function(t,e,r){var i=t.sizeClassifier_.domain();r.values||(r.values=[Math.floor(i[1]),Math.floor(i[0])]),!r.title&&n.title&&(r.title=n.title),r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var a=t.sizeClassifier_(zt(r.values)),o=n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+r.titlePadding:0)+2*a,l=e.append("g").attr("fill","black").attr("transform","translate(".concat(a+n.boxPadding,",").concat(o,")")).attr("text-anchor","right").selectAll("g").data(r.values).join("g");l.append("circle").attr("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").style("font-size",n.labelFontSize+"px").attr("y",(function(e,r){return-1-2*t.sizeClassifier_(e)-n.labelFontSize})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.sizeClassifier_(e)})).attr("xml:space","preserve").attr("x2",30).attr("y2",(function(e,n){return-1-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=o}(t,e,n.sizeLegend),function(t,e,r){var i=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);var a=0,o=t.catColors(),l=function(l){var s=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+a*(r.shapeHeight+r.shapePadding),u=t.catColors()[l]||"lightgray";e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",o[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",u),dt(this).style("fill",u)})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",s+.5*r.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[l]||l).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=t.catColors()[l]||"lightgray";i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",e)})),a++};for(var s in o)l(s);if(r.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+a*(r.shapeHeight+r.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",u).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",u+.5*r.shapeHeight).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}}(t,e,n.colorLegend),n.setBoxDimension()},n},mc=function(t,e){return"ch"==t?function(t){var e=Ou(t);function n(t){var n=function(t){return r(Array(t).keys())};if("quantile"===e.classifMethod_){var i=e.statData().getArray(),a=n(e.clnb());e.classifier(yn().domain(i).range(a))}else if("equinter"===e.classifMethod_){var o=e.statData().getArray(),l=n(e.clnb());e.classifier(vn().domain([At(o),zt(o)]).range(l)),e.makeClassifNice_&&e.classifier().nice()}else if("threshold"===e.classifMethod_){e.clnb(e.threshold().length+1);var s=n(e.clnb());e.classifier(mn().domain(e.threshold()).range(s))}var u="WORLD"==t.geo_?"path.worldrg":"path.nutsrg";t.svg_&&(t.svg().selectAll(u).attr("ecl",(function(t,n,r,i,a){var o=e.statData().get(t.properties.id);if(o){var l=o.value;if(0==l||l)return":"==l?"nd":+e.classifier()(+l)}})),"mixed"==t.nutsLvl_&&t.svg().selectAll("path.nutsrg0").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;if(0==r||r)return":"==r?"nd":+e.classifier()(+r)}})))}function i(t){if(e.filtersDefinitionFun_?e.classToFillStyle((function(t){return"url(#pattern_"+t+")"})):e.classToFillStyle(ju(e.colorFun(),e.colors_)),t.svg_){var n="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).attr("fill",(function(n){if("WORLD"==t.geo_){var r=dt(this).attr("ecl");return r?"nd"===r?e.noDataFillStyle()||"gray":(0,e.classToFillStyle_)(r,e.clnb_)||e.cntrgFillStyle_:e.cntrgFillStyle_}if(e.countriesToShow_.includes(n.properties.id[0]+n.properties.id[1])){var i=dt(this).attr("ecl");return i?"nd"===i?e.noDataFillStyle()||"gray":e.classToFillStyle()(i,e.clnb_):e.nutsrgFillStyle_}return e.nutsrgFillStyle_})).end().then((function(){r.on("mouseover",(function(n){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(n.properties.id[0]+n.properties.id[1])){var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",t.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))}}else{var i=dt(this);i.attr("fill___",i.attr("fill")),i.attr("fill",t.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove(e.tooltip_.textFunction(t,e)):e._tooltip&&e._tooltip.mousemove(e.tooltip_.textFunction(t,e))})).on("mouseout",(function(){var e=dt(this);e.attr("fill"),e.attr("fill___")&&(e.attr("fill",e.attr("fill___")),t._tooltip&&t._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLvl_&&t.svg().selectAll("path.nutsrg").style("display",(function(t){var n=dt(this).attr("ecl"),r=dt(this).attr("lvl");return n&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==r?"block":"none"})).style("stroke",(function(e){var n=dt(this).attr("lvl");if(dt(this).attr("ecl")&&"0"!==n)return t.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(e){var n=dt(this).attr("lvl");if(dt(this).attr("ecl")&&"0"!==n)return t.nutsbnStrokeWidth_[parseInt(n)]||.2})),e.labelsToShow_.includes("values")&&e.updateValuesLabels()}}return e.clnb_=7,e.classifMethod_="quantile",e.threshold_=[0],e.colors_=null,e.makeClassifNice_=!0,e.colorFun_=Sn,e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier_=void 0,["clnb_","classifMethod_","threshold_","makeClassifNice_","colorFun_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFun=function(t){return arguments.length?(e.colorFun_=t,e.filtersDefinitionFun_?e.classToFillStyle((function(t){return"url(#pattern_"+t+")"})):e.classToFillStyle(ju(e.colorFun(),e.colors_)),e):e.colorFun_},e.threshold=function(t){return arguments.length?(e.threshold_=t,e.clnb(t.length+1),e):e.threshold_},e.filtersDefinitionFun=function(t){return arguments.length?(e.filtersDefinitionFun_=t,e.svg()&&e.filtersDefinitionFun_(e.svg(),e.clnb_),e):e.filtersDefinitionFun_},t&&["clnb","classifMethod","threshold","makeClassifNice","colorFun","classToFillStyle","noDataFillStyle","colors_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){if(e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var r=0;r<e.insetTemplates_[t].length;r++)if(Array.isArray(e.insetTemplates_[t][r]))for(var i=0;i<e.insetTemplates_[t][r].length;i++)e.insetTemplates_[t][r][i].svgId_!==e.svgId_&&n(e.insetTemplates_[t][r][i]);else e.insetTemplates_[t][r].svgId_!==e.svgId_&&n(e.insetTemplates_[t][r]);else e.insetTemplates_[t].svgId_!==e.svgId_&&n(e.insetTemplates_[t]);return n(e),e},e.updateStyle=function(){if(e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var n=0;n<e.insetTemplates_[t].length;n++)if(Array.isArray(e.insetTemplates_[t][n]))for(var r=0;r<e.insetTemplates_[t][n].length;r++)e.insetTemplates_[t][n][r].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n][r]);else e.insetTemplates_[t][n].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n]);else e.insetTemplates_[t].svgId_!==e.svgId_&&i(e.insetTemplates_[t]);return i(e),e},e.updateValuesLabels=function(){return e.svg_.selectAll("g.stat-label > *").remove(),e.svg().selectAll("g.stat-label").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e.labelShadow_&&e.svg().selectAll("g.stat-label-shadow").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e},e.getLegendConstructor=function(){return Wu},e}(e):"ct"==t?hc(e):"ps"==t?function(t){var e=Ou(t,!0);return e.psShape_="circle",e.psCustomShape_,e.psCustomSVG_,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=.7,e.psStroke_="#000",e.psStrokeWidth_=.3,e.psClasses_=5,e.psColors_=null,e.psColorFun_=Hu,e.psClassToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.psThreshold_=[0],e.psClassifMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=uc,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","noDataFillStyle_","psThreshold_","psColors_","psCustomSVG_","psOffset_","psClassifMethod_","psClasses_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomSVG","psOffset","psClassifMethod","psClasses"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=lc(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThreshold=function(t){return arguments.length?(e.psThreshold_=t,e.psClasses(t.length+1),e):e.psThreshold_},e.updateClassification=function(){return function(){var t,n=function(t){return r(Array(t).keys())},i=e.statData("size").getArray(),a=e.psMinValue_?e.psMinValue_:e.statData("size").getMin(),o=e.psMaxValue_?e.psMaxValue_:e.statData("size").getMax();if(t=i?[a,o]:[e.statData().getMin(),e.statData().getMax()],e.classifierSize(_n().domain(t).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassifMethod_){var l=e.statData("color").getArray(),s=n(e.psClasses_);e.classifierColor(yn().domain(l).range(s))}else if("equinter"===e.psClassifMethod_){var u=e.statData("color").getArray(),c=n(e.psClasses_);e.classifierColor(vn().domain([a(u),o(u)]).range(c)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassifMethod_){e.psClasses(e.psThreshold().length+1);var f=n(e.psClasses_);e.classifierColor(mn().domain(e.psThreshold()).range(f))}}(),e.svg()&&e.classifierColor_&&e.svg().selectAll(".symbol").attr("ecl",(function(t){var n=e.statData("color").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifierColor()(+r):"nd"})),e},e.updateStyle=function(){var t;e.psClassToFillStyle()||e.psClassToFillStyle(lc(e.psColorFun_,e.psColors_));var n=e.statData("size").getArray()?e.statData("size"):e.statData();if(e.svg()){e.svg_.selectAll("g.symbol > *").remove(),t=e.psCustomSVG_?e.svg().select("#g_ps").selectAll("g.symbol").append("g").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").html(e.psCustomSVG_).attr("transform",(function(t){var r=n.get(t.properties.id),i=e.classifierSize_(+r.value);if(i)return"translate(".concat(e.psOffset_.x*i,",").concat(e.psOffset_.y*i,") scale(").concat(i,")")})):"bar"==e.psShape_?e.svg().select("#g_ps").selectAll("g.symbol").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.classifierSize_(+r.value):0})).attr("transform",(function(){return this.getBoundingClientRect(),"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")})).transition().duration(e.transitionDuration()):e.svg().selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){var n=e.statData("size")?e.statData("size"):e.statData();if(n){var r=n.get(t.properties.id);if(0==r||r){var i=e.classifierSize_(+r.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(i*i)();var a=sc[e.psShape_]||sc.circle;return ac().type(a).size(i*i)()}}}));var r="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",i=e.svg().selectAll(r);"WORLD"!==e.geo_?("mixed"==e.nutsLvl_&&(e.svg().selectAll("g.symbol").style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&":"!=r.value?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_?"block":void 0:"none"})),i.style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_?"block":void 0:"none"})),i.style("stroke",(function(t){var r=dt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStroke_[parseInt(r)]||"#777":void 0})).style("stroke-width",(function(t){var r=dt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return!e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"WORLD"!=e.geo_||"0"===r?void 0:e.nutsbnStrokeWidth_[parseInt(r)]||"#777"}))),i.attr("fill",(function(t){return n.get(t.properties.id)?e.nutsrgFillStyle_:e.cntrgFillStyle_})).style("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_}))):i.attr("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})).style("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})),t.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=dt(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle()||"gray"}return e.psFill()}))}return e},e.getLegendConstructor=function(){return oc},e}(e):"chbi"==t?function(t){var e=Ou(t);return e.clnb_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier1_=void 0,e.classifier2_=void 0,e.tooltip_.textFunction=gc,["clnb_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["clnb","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=r(Array(e.clnb()).keys());if(e.classifier1_||e.classifier1(yn().domain(e.statData("v1").getArray()).range(t)),e.classifier2_||e.classifier2(yn().domain(e.statData("v2").getArray()).range(t)),e.svg()){if(e.svg().selectAll("path.nutsrg").attr("ecl1",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v1").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)}})).attr("ecl2",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("nd",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v1").get(t.properties.id),r=e.statData("v2").get(t.properties.id);if(!n||!r)return"nd";var i=n.value;return 0!=i&&!i||":"==i||0!=(i=r.value)&&!i||":"==i?"nd":""}})),!e.classToFillStyle()){var n=function(t,e,n,r,i){for(var a=[],o=Te(e,n),l=Te(r,i),s=0;s<t;s++){for(var u=s/(t-1),c=Te(o(u),l(u)),f=[],h=0;h<t;h++)f.push(c(h/(t-1)));a.push(f)}return function(t,e){return a[t][e]}}(e.clnb(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(n)}"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg0").attr("ecl1",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}))}return e},e.updateStyle=function(){if(e.svg()){e.svg().selectAll("path.nutsrg").transition().duration(e.transitionDuration()).attr("fill",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this).attr("ecl1");if(!n)return;if("nd"===n)return e.noDataFillStyle()||"gray";var r=dt(this).attr("ecl2");if(!r)return;return"nd"===r?e.noDataFillStyle()||"gray":e.classToFillStyle()(+n,+r)}return e.nutsrgFillStyle_}));var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg().selectAll(t).on("mouseover",(function(t){if(e.countriesToShow_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg").style("display",(function(t){var n=dt(this).attr("ecl1"),r=dt(this).attr("ecl2"),i=dt(this).attr("lvl");return n&&r&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==i?"block":"none"})).style("stroke",(function(t){var n=dt(this).attr("lvl"),r=dt(this).attr("ecl1"),i=dt(this).attr("ecl2");if(r&&i&&"0"!==n)return e.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(t){var n=dt(this).attr("lvl"),r=dt(this).attr("ecl1"),i=dt(this).attr("ecl2");if(r&&i&&"0"!==n)return e.nutsbnStrokeWidth_[parseInt(n)]||.2}))}return e},e.getLegendConstructor=function(){return dc},e}(e):"scomp"==t?function(t){var e=Ou(t);e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="lightgray",e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,r,i,a,o){t.filters=t.filters||{};for(var l=0;l<i.length;l++){var s=i[l];t.filters[r]=s;var u={};for(var c in t)u[c]=t[c];for(var f in u.filters={},t.filters)u.filters[f]=t.filters[f];e.stat(s,u),o&&(e.catColors_=e.catColors_||{},e.catColors_[s]=o[l]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[s]=a[l])}return n=i,e};var n=void 0,r=function(t){for(var r={},i=0,a=0;a<n.length;a++){var o=n[a],l=e.statData(o).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r[o]=l.value,i+=l.value}if(0!=i){for(var s=0;s<n.length;s++)r[n[s]]/=i;return r}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=_c[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll("path.nutsrg").attr("fill",(function(t){var n=t.properties.id;if(!e.countriesToShow_.includes(n[0]+n[1]))return e.nutsrgFillStyle_;var i=r(n);if(!i)return e.noDataFillStyle()||"gray";var a=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&a.attr("patternTransform","rotate("+e.stripeOrientation()+")"),a.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var o=0;for(var l in i){var s=i[l];if(s){s*=e.stripeWidth();var u=e.catColors()[l]||"lightgray";a.append("rect").attr("x",o).attr("y",0).attr("height",1).style("stroke","none").attr("code",l).style("fill",u).transition().duration(e.transitionDuration()).attr("width",s),o+=s}}return"url(#pattern_"+n+")"})).attr("nd",(function(t){return r(t.properties.id)?"":"nd"}));var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(i).on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return yc},e.tooltip_.textFunction=function(t,n){var i=dt("#tooltip_eurostat");i.html(""),i.selectAll("*").remove(),t.properties.id?i.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):i.append("div").html("<b>"+t.properties.na+"</b><br>");var a=[],o=r(t.properties.id);for(var l in o)a.push({code:l,value:o[l]});if(a&&0!=a.length){var s=e.pieChartRadius(),u=e.pieChartInnerRadius(),c=i.append("svg").attr("viewBox",[-s,-s,2*s,2*s]).attr("width",2*s),f=Js().sort(null).value((function(t){return t.value}));c.append("g").attr("stroke","darkgray").selectAll("path").data(f(a)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",Hs().innerRadius(u).outerRadius(s))}else i.append("div").html(e.noDataText())},e}(e):"pie"==t?function(t){var e=Ou(t,!0);e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="darkgray",e.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])}));var n=void 0,r=void 0;e.statPie=function(t,i,a,o,l,s){t.filters=t.filters||{};for(var u=0;u<a.length;u++){var c=a[u];t.filters[i]=c;var f={};for(var h in t)f[h]=t[h];for(var p in f.filters={},t.filters)f.filters[p]=t.filters[p];e.stat(c,f),l&&(e.catColors_=e.catColors_||{},e.catColors_[c]=l[u]),o&&(e.catLabels_=e.catLabels_||{},e.catLabels_[c]=o[u])}if(n=a,s){r=s,t.filters[i]=s;var d={};for(var g in t)d[g]=t[g];for(var _ in d.filters={},t.filters)d.filters[_]=t.filters[_];e.stat(s,d),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e};var i=function(t){for(var i={},a=0,o=0;o<n.length;o++){var l=n[o],s=e.statData(l).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[l]=s.value,a+=s.value}if(r){var u=e.statData(r).get(t);u&&(a=u.value)}if(0!=a){for(var c=0;c<n.length;c++)i[n[c]]/=a;if(r){var f=0;for(var h in i)f+=i[h];i.other=1-f}return i}};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,i=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=a(e);n&&r.push(n)})),xt(r));return e.sizeClassifier_=_n().domain(i).range([e.pieMinRadius_,e.pieMaxRadius_]),e};var a=function(t){var i,a=0;if(r)!(i=e.statData(r).get(t))||0!=i.value&&!i.value||isNaN(i.value)?e.showOnlyWhenComplete()&&(a=void 0):a=i.value;else for(var o=0;o<n.length;o++){var l=n[o];if(!(i=e.statData(l).get(t))||0!=i.value&&!i.value||isNaN(i.value)){if(e.showOnlyWhenComplete())return}else a+=i.value}if(0!=a)return a};return e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=schemeCategory10[t%10]}e.catLabels_=e.catLabels_||{};var r=[];if(e.svg()){var o=e.svg().selectAll("#g_ps");if(o){o.selectAll("g.symbol").append("g").attr("id",(function(t){return r.push(t.properties.id),"pie_"+t.properties.id}));var l="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg().selectAll(l).on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),r.forEach((function(t){var n=[],r=i(t);for(var o in r)n.push({code:o,value:r[o]});if(n&&0!=n.length){var l=e.svg().selectAll("#pie_"+t),s=e.sizeClassifier_(a(t)),u=e.pieChartInnerRadius_,c=Js().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(c(n)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",Hs().innerRadius(u).outerRadius(s))}}))}}return e},e.getLegendConstructor=function(){return vc},e.tooltip_.textFunction=function(t,r){var o=dt("#tooltip_eurostat");o.html(""),o.selectAll("*").remove(),t.properties.id?o.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):o.append("div").html("<b>"+t.properties.na+"</b><br>");var l=[],s=i(t.properties.id);for(var u in s)l.push({code:u,value:s[u]});if(l&&0!=l.length){var c=Math.min(120,120)/2-25,f=o.append("svg").attr("width",120).attr("height",107.5).append("g").attr("transform","translate(60,60)"),h=Js().sort(null).value((function(t){return t.value})),p=Hs().innerRadius(0).outerRadius(.8*c),d=Hs().innerRadius(.9*c).outerRadius(.9*c),g=h(l);f.selectAll("allSlices").data(g).enter().append("path").attr("d",p).attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),f.selectAll("allPolylines").data(g).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=p.centroid(t),n=d.centroid(t),r=d.centroid(t),i=t.startAngle+(t.endAngle-t.startAngle)/2;return r[0]=.95*c*(i<Math.PI?1:-1),[e,n,r]}})),f.selectAll("allLabels").data(g).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=d.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*c*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");var _=document.createElement("div");_.style.padding="10px",_.style.paddingTop="0px",_.style.fontSize="13px";for(var y=0;y<n.length;y++){var v=n[y],m=e.statData(v).get(t.properties.id);if(m&&m.value){var x="<strong>"+e.catLabels_[v]+"</strong>: "+m.value.toFixed()+"<br>";_.innerHTML=_.innerHTML+x}}var b=a(t.properties.id);_.innerHTML=_.innerHTML+"<hr><strong>Total</strong>: ".concat(b.toFixed()," <br>"),o.node().appendChild(_)}else o.append("div").html(e.noDataText())},e}(e):"spark"==t?function(t){var e=Ou(t,!0);e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statSpark=function(t,r,i){t.filters=t.filters||{};for(var a=0;a<r.length;a++){var o=r[a];t.filters.time=o;var l={};for(var s in t)l[s]=t[s];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];e.stat(o,l),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[o]=i[a])}return n=r,e};var n=void 0,r=function(t){for(var r=[],i=0,a=0;a<n.length;a++){var o=n[a],l=e.statData(o).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r.push({date:o,value:l.value}),i+=l.value}if(0!=i)return r};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,a=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=i(e);n&&r.push(n)})),xt(r));return e.widthClassifier_=_n().domain(a).range([0,e.sparkLineWidth_]),e.heightClassifier_=_n().domain(a).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],i=(e.svg().selectAll("#g_ps").selectAll("g.symbol").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),"WORLD"==e.geo_?"path.worldrg":"path.nutsrg");return e.svg().selectAll(i).on("mouseover",(function(t){if(r(t.properties.id))if(e.countriesToShow_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){r(t.properties.id)&&(e.countriesToShow_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove())})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){var i=e.svg().select("#spark_"+t),a=r(t);a&&function(t,r){var i,a,o,l,s=xt(r.map((function(t){return t.value})));"area"==e.sparkType_?(l=e.widthClassifier_(s[1]),o=e.heightClassifier_(s[1]),a=cn().domain(s).range([o-.5,0]),i=cn().domain([0,n.length-1]).range([.5,l-.5])):(l=e.sparkLineWidth_,o=e.sparkLineHeight_,a=cn().domain(s).range([e.sparkLineHeight_-.5,0]),i=cn().domain([0,n.length-1]).range([.5,e.sparkLineWidth_-.5])),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",kn(e.sparkAreaColor_)==Function?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("d",Ys().x((function(t,e){return i(e)})).y0(o).y1((function(t){return a(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")})),t.append("path").datum(r).attr("fill","none").attr("opacity",e.sparkLineOpacity_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("d",Vs().x((function(t,e){return i(e)})).y((function(t){return a(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")})),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return i(e)})).attr("cy",(function(t){return a(t.value)})).attr("r",e.sparkLineCircleRadius_).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")}))}(i,a)})),e};var i=function(t){for(var r,i=0,a=0;a<n.length;a++){var o=n[a];if(!(r=e.statData(o).get(t))||0!=r.value&&!r.value||isNaN(r.value)){if(e.showOnlyWhenComplete())return}else r.value>i&&(i=r.value)}if(0!=i)return i};return e.getLegendConstructor=function(){return Wu},e.tooltip_.textFunction=function(t,i){var a=dt("#tooltip_eurostat");a.html(""),a.selectAll("*").remove(),t.properties.id?a.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):a.append("div").html("<b>"+t.properties.na+"</b><br>");var o=e.sparkTooltipChart_.height,l=e.sparkTooltipChart_.width,s=e.sparkTooltipChart_.margin,u=r(t.properties.id);u&&function(t,r,i,a){var o,l=xt(r.map((function(t){return t.value}))),s=cn().domain(l).range([a-.5,0]),u=cn().domain([n[0],n[n.length-1]]).range([.5,i-.5]);t.append("g").attr("class","axis").attr("transform","translate(0,"+a+")").call((o=u,ss(3,o)).ticks(n.length).tickFormat(rn(".0f"))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)");var c=s.domain(),f=[c[0],((c[0]+c[1])/2).toFixed(1),c[1]];t.append("g").attr("class","axis").call(function(t){return ss(4,t)}(s).tickValues(f).tickFormat(rn(",.2r"))),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",kn(e.sparkAreaColor_)==Function?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",1).attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("stroke","none").attr("d",Ys().x((function(t,e){return u(t.date)})).y0(a).y1((function(t){return s(t.value)}))),t.append("path").datum(r).attr("fill","none").attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",1).attr("d",Vs().x((function(t,e){return u(t.date)})).y((function(t){return s(t.value)}))),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return u(t.date)})).attr("cy",(function(t){return s(t.value)})).attr("r",e.sparkTooltipChart_.circleRadius)}(a.append("svg").attr("width",l+s.left+s.right).attr("height",o+s.top+s.bottom).append("g").attr("transform","translate("+s.left+","+s.top+")"),u,l,o)},e}(e):(console.log("Unexpected map type: "+t),Ou(e,!0))},xc=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,r=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(i,a){i.selectAll(".estatmapPattern").remove();for(var o=0;o<a;o++){var l=n+(r-n)*o/(a-1),s=i.append("pattern").attr("class","estatmapPattern").attr("id","pattern_"+o).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");s.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?s.append("rect").attr("x",0).attr("y",0).attr("width",l).attr("height",l).style("stroke","none").style("fill",t.symbColor):s.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*l).style("stroke","none").style("fill",t.symbColor)}}};return e}()}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.eurostatmap=e():t.eurostatmap=e()}(self,(function(){return function(){"use strict";var t={d:function(e,n){for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function r(t){return function(t){if(Array.isArray(t))return n(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(){}function a(t){return null==t?i:function(){return this.querySelector(t)}}function o(){return[]}function l(t){return null==t?o:function(){return this.querySelectorAll(t)}}function s(t){return function(){return this.matches(t)}}function u(t){return new Array(t.length)}function c(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function f(t,e,n,r,i,a){for(var o,l=0,s=e.length,u=a.length;l<u;++l)(o=e[l])?(o.__data__=a[l],r[l]=o):n[l]=new c(t,a[l]);for(;l<s;++l)(o=e[l])&&(i[l]=o)}function h(t,e,n,r,i,a,o){var l,s,u,f={},h=e.length,p=a.length,d=new Array(h);for(l=0;l<h;++l)(s=e[l])&&(d[l]=u="$"+o.call(s,s.__data__,l,e),u in f?i[l]=s:f[u]=s);for(l=0;l<p;++l)(s=f[u="$"+o.call(t,a[l],l,a)])?(r[l]=s,s.__data__=a[l],f[u]=null):n[l]=new c(t,a[l]);for(l=0;l<h;++l)(s=e[l])&&f[d[l]]===s&&(i[l]=s)}function p(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}t.r(e),t.d(e,{getFillPatternDefinitionFun:function(){return xc},map:function(){return mc}}),c.prototype={constructor:c,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var d="http://www.w3.org/1999/xhtml",g={svg:"http://www.w3.org/2000/svg",xhtml:d,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),g.hasOwnProperty(e)?{space:g[e],local:t}:t}function y(t){return function(){this.removeAttribute(t)}}function v(t){return function(){this.removeAttributeNS(t.space,t.local)}}function m(t,e){return function(){this.setAttribute(t,e)}}function x(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function b(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function S(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function w(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function T(t){return function(){this.style.removeProperty(t)}}function k(t,e,n){return function(){this.style.setProperty(t,e,n)}}function z(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function F(t,e){return t.style.getPropertyValue(e)||w(t).getComputedStyle(t,null).getPropertyValue(e)}function A(t){return function(){delete this[t]}}function M(t,e){return function(){this[t]=e}}function C(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function L(t){return t.trim().split(/^|\s+/)}function E(t){return t.classList||new N(t)}function N(t){this._node=t,this._names=L(t.getAttribute("class")||"")}function D(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function O(t,e){for(var n=E(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function P(t){return function(){D(this,t)}}function R(t){return function(){O(this,t)}}function I(t,e){return function(){(e.apply(this,arguments)?D:O)(this,t)}}function W(){this.textContent=""}function j(t){return function(){this.textContent=t}}function H(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function U(){this.innerHTML=""}function B(t){return function(){this.innerHTML=t}}function G(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function q(){this.nextSibling&&this.parentNode.appendChild(this)}function V(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Y(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===d&&e.documentElement.namespaceURI===d?e.createElement(t):e.createElementNS(n,t)}}function X(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function K(t){var e=_(t);return(e.local?X:Y)(e)}function J(){return null}function Z(){var t=this.parentNode;t&&t.removeChild(this)}function $(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Q(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}N.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var tt={},et=null;function nt(t,e,n){return t=rt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function rt(t,e,n){return function(r){var i=et;et=r;try{t.call(this,this.__data__,e,n)}finally{et=i}}}function it(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function at(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function ot(t,e,n){var r=tt.hasOwnProperty(t.type)?nt:rt;return function(i,a,o){var l,s=this.__on,u=r(e,a,o);if(s)for(var c=0,f=s.length;c<f;++c)if((l=s[c]).type===t.type&&l.name===t.name)return this.removeEventListener(l.type,l.listener,l.capture),this.addEventListener(l.type,l.listener=u,l.capture=n),void(l.value=e);this.addEventListener(t.type,u,n),l={type:t.type,name:t.name,value:e,listener:u,capture:n},s?s.push(l):this.__on=[l]}}function lt(t,e,n){var r=w(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function st(t,e){return function(){return lt(this,t,e)}}function ut(t,e){return function(){return lt(this,t,e.apply(this,arguments))}}"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(tt={mouseenter:"mouseover",mouseleave:"mouseout"}));var ct=[null];function ft(t,e){this._groups=t,this._parents=e}function ht(){return new ft([[document.documentElement]],ct)}ft.prototype=ht.prototype={constructor:ft,select:function(t){"function"!=typeof t&&(t=a(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,l,s=e[i],u=s.length,c=r[i]=new Array(u),f=0;f<u;++f)(o=s[f])&&(l=t.call(o,o.__data__,f,s))&&("__data__"in o&&(l.__data__=o.__data__),c[f]=l);return new ft(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=l(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new ft(r,i)},filter:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],c=0;c<l;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new ft(r,this._parents)},data:function(t,e){if(!t)return _=new Array(this.size()),c=-1,this.each((function(t){_[++c]=t})),_;var n,r=e?h:f,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,l=new Array(o),s=new Array(o),u=new Array(o),c=0;c<o;++c){var p=i[c],d=a[c],g=d.length,_=t.call(p,p&&p.__data__,c,i),y=_.length,v=s[c]=new Array(y),m=l[c]=new Array(y);r(p,d,v,m,u[c]=new Array(g),_,e);for(var x,b,S=0,w=0;S<y;++S)if(x=v[S]){for(S>=w&&(w=S+1);!(b=m[w])&&++w<y;);x._next=b||null}}return(l=new ft(l,i))._enter=s,l._exit=u,l},enter:function(){return new ft(this._enter||this._groups.map(u),this._parents)},exit:function(){return new ft(this._exit||this._groups.map(u),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var s,u=e[l],c=n[l],f=u.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)o[l]=e[l];return new ft(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=p);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,l=n[a],s=l.length,u=i[a]=new Array(s),c=0;c<s;++c)(o=l[c])&&(u[c]=o);u.sort(e)}return new ft(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,l=a.length;o<l;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=_(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?v:y:"function"==typeof e?n.local?S:b:n.local?x:m)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?T:"function"==typeof e?z:k)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?A:"function"==typeof e?C:M)(t,e)):this.node()[t]},classed:function(t,e){var n=L(t+"");if(arguments.length<2){for(var r=E(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?I:e?P:R)(n,e))},text:function(t){return arguments.length?this.each(null==t?W:("function"==typeof t?H:j)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?U:("function"==typeof t?G:B)(t)):this.node().innerHTML},raise:function(){return this.each(q)},lower:function(){return this.each(V)},append:function(t){var e="function"==typeof t?t:K(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:K(t),r=null==e?J:"function"==typeof e?e:a(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Z)},clone:function(t){return this.select(t?Q:$)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=it(t+""),o=a.length;if(!(arguments.length<2)){for(l=e?ot:at,null==n&&(n=!1),r=0;r<o;++r)this.each(l(a[r],e,n));return this}var l=this.node().__on;if(l)for(var s,u=0,c=l.length;u<c;++u)for(r=0,s=l[u];r<o;++r)if((i=a[r]).type===s.type&&i.name===s.name)return s.value},dispatch:function(t,e){return this.each(("function"==typeof e?ut:st)(t,e))}};var pt=ht;function dt(t){return"string"==typeof t?new ft([[document.querySelector(t)]],[document.documentElement]):new ft([[t]],ct)}function gt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t,yt,vt=(1===(_t=gt).length&&(yt=_t,_t=function(t,e){return gt(yt(t),e)}),{left:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;_t(t[i],e)<0?n=i+1:r=i}return n},right:function(t,e,n,r){for(null==n&&(n=0),null==r&&(r=t.length);n<r;){var i=n+r>>>1;_t(t[i],e)>0?r=i:n=i+1}return n}}),mt=vt.right;function xt(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}var bt=Array.prototype,St=(bt.slice,bt.map,Math.sqrt(50)),wt=Math.sqrt(10),Tt=Math.sqrt(2);function kt(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=St?10:a>=wt?5:a>=Tt?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=St?10:a>=wt?5:a>=Tt?2:1)}function zt(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function Ft(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n}function At(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r}function Mt(t){return null===t?NaN:+t}function Ct(t,e,n){if(null==n&&(n=Mt),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}}function Lt(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var Et="$";function Nt(){}function Dt(t,e){var n=new Nt;if(t instanceof Nt)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Nt.prototype=Dt.prototype={constructor:Nt,has:function(t){return Et+t in this},get:function(t){return this[Et+t]},set:function(t,e){return this[Et+t]=e,this},remove:function(t){var e=Et+t;return e in this&&delete this[e]},clear:function(){for(var t in this)t[0]===Et&&delete this[t]},keys:function(){var t=[];for(var e in this)e[0]===Et&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)e[0]===Et&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)e[0]===Et&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)e[0]===Et&&++t;return t},empty:function(){for(var t in this)if(t[0]===Et)return!1;return!0},each:function(t){for(var e in this)e[0]===Et&&t(this[e],e.slice(1),this)}};var Ot=Dt;function Pt(){}var Rt=Ot.prototype;Pt.prototype=function(t,e){var n=new Pt;if(t instanceof Pt)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:Pt,has:Rt.has,add:function(t){return this[Et+(t+="")]=t,this},remove:Rt.remove,clear:Rt.clear,values:Rt.keys,size:Rt.size,empty:Rt.empty,each:Rt.each};var It=Array.prototype,Wt=It.map,jt=It.slice;function Ht(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ut={name:"implicit"};function Bt(){var t=Ot(),e=[],n=[],r=Ut;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Ut)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ot();for(var r,a,o=-1,l=n.length;++o<l;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=jt.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Bt(e,n).unknown(r)},Ht.apply(i,arguments),i}function Gt(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function qt(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Vt(){}var Yt=.7,Xt=1/Yt,Kt="\\s*([+-]?\\d+)\\s*",Jt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zt="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",$t=/^#([0-9a-f]{3,8})$/,Qt=new RegExp("^rgb\\("+[Kt,Kt,Kt]+"\\)$"),te=new RegExp("^rgb\\("+[Zt,Zt,Zt]+"\\)$"),ee=new RegExp("^rgba\\("+[Kt,Kt,Kt,Jt]+"\\)$"),ne=new RegExp("^rgba\\("+[Zt,Zt,Zt,Jt]+"\\)$"),re=new RegExp("^hsl\\("+[Jt,Zt,Zt]+"\\)$"),ie=new RegExp("^hsla\\("+[Jt,Zt,Zt,Jt]+"\\)$"),ae={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function oe(){return this.rgb().formatHex()}function le(){return this.rgb().formatRgb()}function se(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=$t.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ue(e):3===n?new pe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?ce(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?ce(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Qt.exec(t))?new pe(e[1],e[2],e[3],1):(e=te.exec(t))?new pe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ee.exec(t))?ce(e[1],e[2],e[3],e[4]):(e=ne.exec(t))?ce(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=re.exec(t))?ye(e[1],e[2]/100,e[3]/100,1):(e=ie.exec(t))?ye(e[1],e[2]/100,e[3]/100,e[4]):ae.hasOwnProperty(t)?ue(ae[t]):"transparent"===t?new pe(NaN,NaN,NaN,0):null}function ue(t){return new pe(t>>16&255,t>>8&255,255&t,1)}function ce(t,e,n,r){return r<=0&&(t=e=n=NaN),new pe(t,e,n,r)}function fe(t){return t instanceof Vt||(t=se(t)),t?new pe((t=t.rgb()).r,t.g,t.b,t.opacity):new pe}function he(t,e,n,r){return 1===arguments.length?fe(t):new pe(t,e,n,null==r?1:r)}function pe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function de(){return"#"+_e(this.r)+_e(this.g)+_e(this.b)}function ge(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function _e(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function ye(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new me(t,e,n,r)}function ve(t){if(t instanceof me)return new me(t.h,t.s,t.l,t.opacity);if(t instanceof Vt||(t=se(t)),!t)return new me;if(t instanceof me)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,l=a-i,s=(a+i)/2;return l?(o=e===a?(n-r)/l+6*(n<r):n===a?(r-e)/l+2:(e-n)/l+4,l/=s<.5?a+i:2-a-i,o*=60):l=s>0&&s<1?0:o,new me(o,l,s,t.opacity)}function me(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function xe(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function be(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}function Se(t){return function(){return t}}function we(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Se(isNaN(t)?e:t)}Gt(Vt,se,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:oe,formatHex:oe,formatHsl:function(){return ve(this).formatHsl()},formatRgb:le,toString:le}),Gt(pe,he,qt(Vt,{brighter:function(t){return t=null==t?Xt:Math.pow(Xt,t),new pe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?Yt:Math.pow(Yt,t),new pe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:de,formatHex:de,formatRgb:ge,toString:ge})),Gt(me,(function(t,e,n,r){return 1===arguments.length?ve(t):new me(t,e,n,null==r?1:r)}),qt(Vt,{brighter:function(t){return t=null==t?Xt:Math.pow(Xt,t),new me(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?Yt:Math.pow(Yt,t),new me(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new pe(xe(t>=240?t-240:t+120,i,r),xe(t,i,r),xe(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Te=function t(e){var n=function(t){return 1==(t=+t)?we:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):Se(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=he(t)).r,(e=he(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=we(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function ke(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),l=new Array(i);for(n=0;n<i;++n)r=he(e[n]),a[n]=r.r||0,o[n]=r.g||0,l[n]=r.b||0;return a=t(a),o=t(o),l=t(l),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=l(t),r+""}}}var ze=ke((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,l=r<e-1?t[r+2]:2*a-i;return be((n-r/e)*e,o,i,a,l)}}));function Fe(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Oe(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Ae(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Me(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ce(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Oe(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}ke((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],l=t[(r+2)%e];return be((n-r/e)*e,i,a,o,l)}}));var Le=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ee=new RegExp(Le.source,"g");function Ne(t,e){var n,r,i,a=Le.lastIndex=Ee.lastIndex=0,o=-1,l=[],s=[];for(t+="",e+="";(n=Le.exec(t))&&(r=Ee.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),l[o]?l[o]+=i:l[++o]=i),(n=n[0])===(r=r[0])?l[o]?l[o]+=r:l[++o]=r:(l[++o]=null,s.push({i:o,x:Me(n,r)})),a=Ee.lastIndex;return a<e.length&&(i=e.slice(a),l[o]?l[o]+=i:l[++o]=i),l.length<2?s[0]?function(t){return function(e){return t(e)+""}}(s[0].x):function(t){return function(){return t}}(e):(e=s.length,function(t){for(var n,r=0;r<e;++r)l[(n=s[r]).i]=n.x(t);return l.join("")})}function De(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Oe(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?Se(e):("number"===i?Me:"string"===i?(n=se(e))?(e=n,Te):Ne:e instanceof se?Te:e instanceof Date?Ae:(r=e,!ArrayBuffer.isView(r)||r instanceof DataView?Array.isArray(e)?Fe:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ce:Me:De))(t,e)}function Pe(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}function Re(t){return+t}var Ie=[0,1];function We(t){return t}function je(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function He(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function Ue(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=je(i,r),a=n(o,a)):(r=je(r,i),a=n(a,o)),function(t){return a(r(t))}}function Be(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=je(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=mt(t,e,1,r)-1;return a[n](i[n](e))}}function Ge(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function qe(){var t,e,n,r,i,a,o=Ie,l=Ie,s=Oe,u=We;function c(){return r=Math.min(o.length,l.length)>2?Be:Ue,i=a=null,f}function f(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),l,s)))(t(u(e)))}return f.invert=function(n){return u(e((a||(a=r(l,o.map(t),Me)))(n)))},f.domain=function(t){return arguments.length?(o=Wt.call(t,Re),u===We||(u=He(o)),c()):o.slice()},f.range=function(t){return arguments.length?(l=jt.call(t),c()):l.slice()},f.rangeRound=function(t){return l=jt.call(t),s=Pe,c()},f.clamp=function(t){return arguments.length?(u=t?He(o):We,f):u!==We},f.interpolate=function(t){return arguments.length?(s=t,c()):s},f.unknown=function(t){return arguments.length?(n=t,f):n},function(n,r){return t=n,e=r,c()}}function Ve(t,e){return qe()(t,e)}var Ye,Xe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ke(t){if(!(e=Xe.exec(t)))throw new Error("invalid format: "+t);var e;return new Je({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Je(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Ze(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}function $e(t){return(t=Ze(Math.abs(t)))?t[1]:NaN}function Qe(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}Ke.prototype=Je.prototype,Je.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var tn={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qe(100*t,e)},r:Qe,s:function(t,e){var n=Ze(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Ye=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Ze(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function en(t){return t}var nn,rn,an,on=Array.prototype.map,ln=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function sn(t){return nn=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?en:(e=on.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,l=e[0],s=0;i>0&&l>0&&(s+l+1>r&&(l=Math.max(1,r-s)),a.push(t.substring(i-=l,i+l)),!((s+=l+1)>r));)l=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?en:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(on.call(t.numerals,String)),s=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function f(t){var e=(t=Ke(t)).fill,n=t.align,f=t.sign,h=t.symbol,p=t.zero,d=t.width,g=t.comma,_=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):tn[v]||(void 0===_&&(_=12),y=!0,v="g"),(p||"0"===e&&"="===n)&&(p=!0,e="0",n="=");var m="$"===h?i:"#"===h&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",x="$"===h?a:/[%p]/.test(v)?s:"",b=tn[v],S=/[defgprs%]/.test(v);function w(t){var i,a,s,h=m,w=x;if("c"===v)w=b(t)+w,t="";else{var T=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:b(Math.abs(t),_),y&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==f&&(T=!1),h=(T?"("===f?f:u:"-"===f||"("===f?"":f)+h,w=("s"===v?ln[8+Ye/3]:"")+w+(T&&"("===f?")":""),S)for(i=-1,a=t.length;++i<a;)if(48>(s=t.charCodeAt(i))||s>57){w=(46===s?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!p&&(t=r(t,1/0));var k=h.length+t.length+w.length,z=k<d?new Array(d-k+1).join(e):"";switch(g&&p&&(t=r(z+t,z.length?d-w.length:1/0),z=""),n){case"<":t=h+t+w+z;break;case"=":t=h+z+t+w;break;case"^":t=z.slice(0,k=z.length>>1)+h+t+w+z.slice(k);break;default:t=z+h+t+w}return l(t)}return _=void 0===_?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,_)):Math.max(0,Math.min(20,_)),w.toString=function(){return t+""},w}return{format:f,formatPrefix:function(t,e){var n=f(((t=Ke(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($e(e)/3))),i=Math.pow(10,-r),a=ln[8+r/3];return function(t){return n(i*t)+a}}}}(t),rn=nn.format,an=nn.formatPrefix,nn}function un(t){var e=t.domain;return t.ticks=function(t){var n=e();return function(t,e,n){var r,i,a,o,l=-1;if(n=+n,(t=+t)==(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=kt(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++l<i;)a[l]=(t+l)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++l<i;)a[l]=(t-l)/o;return r&&a.reverse(),a}(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return function(t,e,n,r){var i,a=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=St?i*=10:a>=wt?i*=5:a>=Tt&&(i*=2),e<t?-i:i}(t,e,n);switch((r=Ke(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($e(e)/3)))-$e(Math.abs(t)))}(a,o))||(r.precision=i),an(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$e(e)-$e(t))+1}(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=function(t){return Math.max(0,-$e(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return rn(r)}(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,l=i[a],s=i[o];return s<l&&(r=l,l=s,s=r,r=a,a=o,o=r),(r=kt(l,s,n))>0?r=kt(l=Math.floor(l/r)*r,s=Math.ceil(s/r)*r,n):r<0&&(r=kt(l=Math.ceil(l*r)/r,s=Math.floor(s*r)/r,n)),r>0?(i[a]=Math.floor(l/r)*r,i[o]=Math.ceil(s/r)*r,e(i)):r<0&&(i[a]=Math.ceil(l*r)/r,i[o]=Math.floor(s*r)/r,e(i)),t},t}function cn(){var t=Ve(We,We);return t.copy=function(){return Ge(t,cn())},Ht.apply(t,arguments),un(t)}function fn(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function hn(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function pn(t){return t<0?-t*t:t*t}function dn(t){var e=t(We,We),n=1;function r(){return 1===n?t(We,We):.5===n?t(hn,pn):t(fn(n),fn(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},un(e)}function gn(){var t=dn(qe());return t.copy=function(){return Ge(t,gn()).exponent(t.exponent())},Ht.apply(t,arguments),t}function _n(){return gn.apply(null,arguments).exponent(.5)}function yn(){var t,e=[],n=[],r=[];function i(){var t=0,i=Math.max(1,n.length);for(r=new Array(i-1);++t<i;)r[t-1]=Ct(e,t/i);return a}function a(e){return isNaN(e=+e)?t:n[mt(r,e)]}return a.invertExtent=function(t){var i=n.indexOf(t);return i<0?[NaN,NaN]:[i>0?r[i-1]:e[0],i<r.length?r[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,r=0,a=t.length;r<a;++r)null==(n=t[r])||isNaN(n=+n)||e.push(n);return e.sort(gt),i()},a.range=function(t){return arguments.length?(n=jt.call(t),i()):n.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return r.slice()},a.copy=function(){return yn().domain(e).range(n).unknown(t)},Ht.apply(a,arguments)}function vn(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[mt(i,e,0,r)]:t}function l(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],l()):[e,n]},o.range=function(t){return arguments.length?(r=(a=jt.call(t)).length-1,l()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return vn().domain([e,n]).range(a).unknown(t)},Ht.apply(un(o),arguments)}function mn(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[mt(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=jt.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=jt.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return mn().domain(e).range(n).unknown(t)},Ht.apply(i,arguments)}function xn(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n}function bn(t){return ze(t[t.length-1])}sn({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var Sn=bn(new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(xn)),wn={b:"break in time series",c:"confidential",d:"definition differs, see metadata",e:"estimated",f:"forecast",n:"not significant",p:"provisional",r:"revised",s:"Eurostat estimate",u:"low reliability",z:"not applicable"};function Tn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function zn(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function Fn(t,e){return fetch(t,e).then(zn)}var An={value:function(){}};function Mn(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new Cn(r)}function Cn(t){this._=t}function Ln(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function En(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Nn(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=An,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Cn.prototype=Mn.prototype={constructor:Cn,on:function(t,e){var n,r=this._,i=Ln(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Nn(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Nn(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=En(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Cn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Dn=Mn;function On(){et.preventDefault(),et.stopImmediatePropagation()}function Pn(t){var e=t.document.documentElement,n=dt(t).on("dragstart.drag",On,!0);"onselectstart"in e?n.on("selectstart.drag",On,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Rn(t,e){var n=t.document.documentElement,r=dt(t).on("dragstart.drag",null);e&&(r.on("click.drag",On,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var In=Math.SQRT2;function Wn(t){return((t=Math.exp(t))+1/t)/2}function jn(t,e){var n,r,i=t[0],a=t[1],o=t[2],l=e[0],s=e[1],u=e[2],c=l-i,f=s-a,h=c*c+f*f;if(h<1e-12)r=Math.log(u/o)/In,n=function(t){return[i+t*c,a+t*f,o*Math.exp(In*t*r)]};else{var p=Math.sqrt(h),d=(u*u-o*o+4*h)/(2*o*2*p),g=(u*u-o*o-4*h)/(2*u*2*p),_=Math.log(Math.sqrt(d*d+1)-d),y=Math.log(Math.sqrt(g*g+1)-g);r=(y-_)/In,n=function(t){var e,n=t*r,l=Wn(_),s=o/(2*p)*(l*(e=In*n+_,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(_));return[i+s*c,a+s*f,o*l/Wn(In*n+_)]}}return n.duration=1e3*r,n}function Hn(){for(var t,e=et;t=e.sourceEvent;)e=t;return e}function Un(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function Bn(t){var e=Hn();return e.changedTouches&&(e=e.changedTouches[0]),Un(t,e)}function Gn(t,e,n){arguments.length<3&&(n=e,e=Hn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return Un(t,r);return null}var qn,Vn,Yn=0,Xn=0,Kn=0,Jn=0,Zn=0,$n=0,Qn="object"==typeof performance&&performance.now?performance:Date,tr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function er(){return Zn||(tr(nr),Zn=Qn.now()+$n)}function nr(){Zn=0}function rr(){this._call=this._time=this._next=null}function ir(t,e,n){var r=new rr;return r.restart(t,e,n),r}function ar(){Zn=(Jn=Qn.now())+$n,Yn=Xn=0;try{!function(){er(),++Yn;for(var t,e=qn;e;)(t=Zn-e._time)>=0&&e._call.call(null,t),e=e._next;--Yn}()}finally{Yn=0,function(){for(var t,e,n=qn,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:qn=e);Vn=t,lr(r)}(),Zn=0}}function or(){var t=Qn.now(),e=t-Jn;e>1e3&&($n-=e,Jn=t)}function lr(t){Yn||(Xn&&(Xn=clearTimeout(Xn)),t-Zn>24?(t<1/0&&(Xn=setTimeout(ar,t-Qn.now()-$n)),Kn&&(Kn=clearInterval(Kn))):(Kn||(Jn=Qn.now(),Kn=setInterval(or,1e3)),Yn=1,tr(ar)))}function sr(t,e,n){var r=new rr;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}rr.prototype=ir.prototype={constructor:rr,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?er():+n)+(null==e?0:+e),this._next||Vn===this||(Vn?Vn._next=this:qn=this,Vn=this),this._call=t,this._time=n,lr()},stop:function(){this._call&&(this._call=null,this._time=1/0,lr())}};var ur=Dn("start","end","cancel","interrupt"),cr=[];function fr(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(s){var u,c,f,h;if(1!==n.state)return l();for(u in i)if((h=i[u]).name===n.name){if(3===h.state)return sr(a);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete i[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete i[u])}if(sr((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(s))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),u=0,c=-1;u<f;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=h);r.length=c+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(l),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),l())}function l(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=ir((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:ur,tween:cr,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function hr(t,e){var n=dr(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function pr(t,e){var n=dr(t,e);if(n.state>3)throw new Error("too late; already running");return n}function dr(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function gr(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}}var _r,yr,vr,mr,xr=180/Math.PI,br={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Sr(t,e,n,r,i,a){var o,l,s;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(l=Math.sqrt(n*n+r*r))&&(n/=l,r/=l,s/=l),t*r<e*n&&(t=-t,e=-e,s=-s,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*xr,skewX:Math.atan(s)*xr,scaleX:o,scaleY:l}}function wr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var l=[],s=[];return a=t(a),o=t(o),function(t,r,i,a,o,l){if(t!==i||r!==a){var s=o.push("translate(",null,e,null,n);l.push({i:s-4,x:Me(t,i)},{i:s-2,x:Me(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,l,s),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Me(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,l,s),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Me(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,l,s),function(t,e,n,r,a,o){if(t!==n||e!==r){var l=a.push(i(a)+"scale(",null,",",null,")");o.push({i:l-4,x:Me(t,n)},{i:l-2,x:Me(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,l,s),a=o=null,function(t){for(var e,n=-1,r=s.length;++n<r;)l[(e=s[n]).i]=e.x(t);return l.join("")}}}var Tr=wr((function(t){return"none"===t?br:(_r||(_r=document.createElement("DIV"),yr=document.documentElement,vr=document.defaultView),_r.style.transform=t,t=vr.getComputedStyle(yr.appendChild(_r),null).getPropertyValue("transform"),yr.removeChild(_r),Sr(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),kr=wr((function(t){return null==t?br:(mr||(mr=document.createElementNS("http://www.w3.org/2000/svg","g")),mr.setAttribute("transform",t),(t=mr.transform.baseVal.consolidate())?Sr((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):br)}),", ",")",")");function zr(t,e){var n,r;return function(){var i=pr(this,t),a=i.tween;if(a!==n)for(var o=0,l=(r=n=a).length;o<l;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Fr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=pr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var l={name:e,value:n},s=0,u=i.length;s<u;++s)if(i[s].name===e){i[s]=l;break}s===u&&i.push(l)}a.tween=i}}function Ar(t,e,n){var r=t._id;return t.each((function(){var t=pr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return dr(t,r).value[e]}}function Mr(t,e){var n;return("number"==typeof e?Me:e instanceof se?Te:(n=se(e))?(e=n,Te):Ne)(t,e)}function Cr(t){return function(){this.removeAttribute(t)}}function Lr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Er(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function Nr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function Dr(t,e,n){var r,i,a;return function(){var o,l,s=n(this);if(null!=s)return(o=this.getAttribute(t))===(l=s+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,s));this.removeAttribute(t)}}function Or(t,e,n){var r,i,a;return function(){var o,l,s=n(this);if(null!=s)return(o=this.getAttributeNS(t.space,t.local))===(l=s+"")?null:o===r&&l===i?a:(i=l,a=e(r=o,s));this.removeAttributeNS(t.space,t.local)}}function Pr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Rr(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ir(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Rr(t,i)),n}return i._value=e,i}function Wr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Pr(t,i)),n}return i._value=e,i}function jr(t,e){return function(){hr(this,t).delay=+e.apply(this,arguments)}}function Hr(t,e){return e=+e,function(){hr(this,t).delay=e}}function Ur(t,e){return function(){pr(this,t).duration=+e.apply(this,arguments)}}function Br(t,e){return e=+e,function(){pr(this,t).duration=e}}function Gr(t,e){if("function"!=typeof e)throw new Error;return function(){pr(this,t).ease=e}}function qr(t,e,n){var r,i,a=function(t){return(t+"").trim().split(/^|\s+/).every((function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t}))}(e)?hr:pr;return function(){var o=a(this,t),l=o.on;l!==r&&(i=(r=l).copy()).on(e,n),o.on=i}}var Vr=pt.prototype.constructor;function Yr(t){return function(){this.style.removeProperty(t)}}function Xr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Kr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Xr(t,a,n)),r}return a._value=e,a}function Jr(t){return function(e){this.textContent=t.call(this,e)}}function Zr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Jr(r)),e}return r._value=t,r}var $r=0;function Qr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function ti(){return++$r}var ei=pt.prototype;Qr.prototype=function(t){return pt().transition(t)}.prototype={constructor:Qr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=a(t));for(var r=this._groups,i=r.length,o=new Array(i),l=0;l<i;++l)for(var s,u,c=r[l],f=c.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=c[p])&&(u=t.call(s,s.__data__,p,c))&&("__data__"in s&&(u.__data__=s.__data__),h[p]=u,fr(h[p],e,n,p,h,dr(s,n)));return new Qr(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=l(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],f=c.length,h=0;h<f;++h)if(u=c[h]){for(var p,d=t.call(u,u.__data__,h,c),g=dr(u,n),_=0,y=d.length;_<y;++_)(p=d[_])&&fr(p,e,n,_,d,g);a.push(d),o.push(u)}return new Qr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=s(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],l=o.length,u=r[i]=[],c=0;c<l;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Qr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),l=0;l<a;++l)for(var s,u=e[l],c=n[l],f=u.length,h=o[l]=new Array(f),p=0;p<f;++p)(s=u[p]||c[p])&&(h[p]=s);for(;l<r;++l)o[l]=e[l];return new Qr(o,this._parents,this._name,this._id)},selection:function(){return new Vr(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=ti(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],s=l.length,u=0;u<s;++u)if(o=l[u]){var c=dr(o,e);fr(o,t,n,u,l,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Qr(r,this._parents,t,n)},call:ei.call,nodes:ei.nodes,node:ei.node,size:ei.size,empty:ei.empty,each:ei.each,on:function(t,e){var n=this._id;return arguments.length<2?dr(this.node(),n).on.on(t):this.each(qr(n,t,e))},attr:function(t,e){var n=_(t),r="transform"===n?kr:Mr;return this.attrTween(t,"function"==typeof e?(n.local?Or:Dr)(n,r,Ar(this,"attr."+t,e)):null==e?(n.local?Lr:Cr)(n):(n.local?Nr:Er)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=_(t);return this.tween(n,(r.local?Ir:Wr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Tr:Mr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=F(this,t),o=(this.style.removeProperty(t),F(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Yr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=F(this,t),l=n(this),s=l+"";return null==l&&(this.style.removeProperty(t),s=l=F(this,t)),o===s?null:o===r&&s===i?a:(i=s,a=e(r=o,l))}}(t,r,Ar(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,l="end."+o;return function(){var s=pr(this,t),u=s.on,c=null==s.value[o]?a||(a=Yr(e)):void 0;u===n&&i===c||(r=(n=u).copy()).on(l,i=c),s.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=F(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Kr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(Ar(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Zr(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=dr(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?zr:Fr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?jr:Hr)(e,t)):dr(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ur:Br)(e,t)):dr(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Gr(e,t)):dr(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var l={value:o},s={value:function(){0==--i&&a()}};n.each((function(){var n=pr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(l),e._.interrupt.push(l),e._.end.push(s)),n.on=e}))}))}};var ni={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function ri(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return ni.time=er(),ni;return n}function ii(t){return function(){return t}}function ai(t,e,n){this.target=t,this.type=e,this.transform=n}function oi(t,e,n){this.k=t,this.x=e,this.y=n}pt.prototype.interrupt=function(t){return this.each((function(){gr(this,t)}))},pt.prototype.transition=function(t){var e,n;t instanceof Qr?(e=t._id,t=t._name):(e=ti(),(n=ni).time=er(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,l=r[a],s=l.length,u=0;u<s;++u)(o=l[u])&&fr(o,t,e,u,l,n||ri(o,e));return new Qr(r,this._parents,t,e)},oi.prototype={constructor:oi,scale:function(t){return 1===t?this:new oi(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new oi(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var li=new oi(1,0,0);function si(t){for(;!t.__zoom;)if(!(t=t.parentNode))return li;return t.__zoom}function ui(){et.stopImmediatePropagation()}function ci(){et.preventDefault(),et.stopImmediatePropagation()}function fi(){return!et.ctrlKey&&!et.button}function hi(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function pi(){return this.__zoom||li}function di(){return-et.deltaY*(1===et.deltaMode?.05:et.deltaMode?1:.002)}function gi(){return navigator.maxTouchPoints||"ontouchstart"in this}function _i(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function yi(t){return"string"==typeof t?new ft([document.querySelectorAll(t)],[document.documentElement]):new ft([null==t?[]:t],ct)}si.prototype=oi.prototype;var vi=1e-6,mi=Math.PI,xi=mi/2,bi=mi/4,Si=2*mi,wi=180/mi,Ti=mi/180,ki=Math.abs,zi=Math.atan,Fi=Math.atan2,Ai=Math.cos,Mi=Math.ceil,Ci=(Math.exp,Math.floor,Math.log,Math.pow,Math.sin),Li=Math.sign||function(t){return t>0?1:t<0?-1:0},Ei=Math.sqrt;function Ni(t){return t>1?xi:t<-1?-xi:Math.asin(t)}function Di(){}function Oi(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Di,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function Pi(t,e){return ki(t[0]-e[0])<vi&&ki(t[1]-e[1])<vi}function Ri(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 Ii(t,e,n,r,i){var a,o,l=[],s=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(Pi(r,o)){if(!r[2]&&!o[2]){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);return void i.lineEnd()}o[0]+=2e-6}l.push(n=new Ri(r,t,null,!0)),s.push(n.o=new Ri(r,null,n,!1)),l.push(n=new Ri(o,t,null,!1)),s.push(n.o=new Ri(o,null,n,!0))}})),l.length){for(s.sort(e),Wi(l),Wi(s),a=0,o=s.length;a<o;++a)s[a].e=n=!n;for(var u,c,f=l[0];;){for(var h=f,p=!0;h.v;)if((h=h.n)===f)return;u=h.z,i.lineStart();do{if(h.v=h.o.v=!0,h.e){if(p)for(a=0,o=u.length;a<o;++a)i.point((c=u[a])[0],c[1]);else r(h.x,h.n.x,1,i);h=h.n}else{if(p)for(u=h.p.z,a=u.length-1;a>=0;--a)i.point((c=u[a])[0],c[1]);else r(h.x,h.p.x,-1,i);h=h.p}u=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function Wi(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}Math.tan;var ji=1e9,Hi=-ji;function Ui(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,l,u){var c=0,f=0;if(null==i||(c=o(i,l))!==(f=o(a,l))||s(i,a)<0^l>0)do{u.point(0===c||3===c?t:n,c>1?r:e)}while((c=(c+l+4)%4)!==f);else u.point(a[0],a[1])}function o(r,i){return ki(r[0]-t)<vi?i>0?0:3:ki(r[0]-n)<vi?i>0?2:1:ki(r[1]-e)<vi?i>0?1:0:i>0?3:2}function l(t,e){return s(t.x,e.x)}function s(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var s,u,c,f,h,p,d,g,_,y,v,m=o,x=Oi(),b={point:S,lineStart:function(){b.point=w,u&&u.push(c=[]),y=!0,_=!1,d=g=NaN},lineEnd:function(){s&&(w(f,h),p&&_&&x.rejoin(),s.push(x.result())),b.point=S,_&&m.lineEnd()},polygonStart:function(){m=x,s=[],u=[],v=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,l=u[n],s=1,c=l.length,f=l[0],h=f[0],p=f[1];s<c;++s)a=h,o=p,h=(f=l[s])[0],p=f[1],o<=r?p>r&&(h-a)*(r-o)>(p-o)*(t-a)&&++e:p<=r&&(h-a)*(r-o)<(p-o)*(t-a)&&--e;return e}(),n=v&&e,i=(s=Ft(s)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&Ii(s,l,e,a,o),o.polygonEnd()),m=o,s=u=c=null}};function S(t,e){i(t,e)&&m.point(t,e)}function w(a,o){var l=i(a,o);if(u&&c.push([a,o]),y)f=a,h=o,p=l,y=!1,l&&(m.lineStart(),m.point(a,o));else if(l&&_)m.point(a,o);else{var s=[d=Math.max(Hi,Math.min(ji,d)),g=Math.max(Hi,Math.min(ji,g))],x=[a=Math.max(Hi,Math.min(ji,a)),o=Math.max(Hi,Math.min(ji,o))];!function(t,e,n,r,i,a){var o,l=t[0],s=t[1],u=0,c=1,f=e[0]-l,h=e[1]-s;if(o=n-l,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<c&&(c=o)}else if(f>0){if(o>c)return;o>u&&(u=o)}if(o=i-l,f||!(o<0)){if(o/=f,f<0){if(o>c)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<c&&(c=o)}if(o=r-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<c&&(c=o)}else if(h>0){if(o>c)return;o>u&&(u=o)}if(o=a-s,h||!(o<0)){if(o/=h,h<0){if(o>c)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<c&&(c=o)}return u>0&&(t[0]=l+u*f,t[1]=s+u*h),c<1&&(e[0]=l+c*f,e[1]=s+c*h),!0}}}}}(s,x,t,e,n,r)?l&&(m.lineStart(),m.point(a,o),v=!1):(_||(m.lineStart(),m.point(s[0],s[1])),m.point(x[0],x[1]),l||m.lineEnd(),v=!1)}d=a,g=o,_=l}return b}}function Bi(t){return t}function Gi(t){return function(e){var n=new qi;for(var r in t)n[r]=t[r];return n.stream=e,n}}function qi(){}function Vi(t,e){t&&Xi.hasOwnProperty(t.type)&&Xi[t.type](t,e)}qi.prototype={constructor:qi,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()}};var Yi={Feature:function(t,e){Vi(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Vi(n[r].geometry,e)}},Xi={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,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ki(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ki(n[r],e,0)},Polygon:function(t,e){Ji(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ji(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Vi(n[r],e)}};function Ki(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ji(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ki(t[n],e,1);e.polygonEnd()}function Zi(t,e){t&&Yi.hasOwnProperty(t.type)?Yi[t.type](t,e):Vi(t,e)}var $i=1/0,Qi=$i,ta=-$i,ea=ta,na={point:function(t,e){t<$i&&($i=t),t>ta&&(ta=t),e<Qi&&(Qi=e),e>ea&&(ea=e)},lineStart:Di,lineEnd:Di,polygonStart:Di,polygonEnd:Di,result:function(){var t=[[$i,Qi],[ta,ea]];return ta=ea=-(Qi=$i=1/0),t}},ra=na;function ia(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),Zi(n,t.stream(ra)),e(ra.result()),null!=r&&t.clipExtent(r),t}function aa(t,e,n){return ia(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,l])}),n)}function oa(t,e,n){return aa(t,[[0,0],e],n)}function la(t,e,n){return ia(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function sa(t,e,n){return ia(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}function ua(){return new ca}function ca(){this.reset()}ca.prototype={constructor:ca,reset:function(){this.s=this.t=0},add:function(t){ha(fa,t,this.t),ha(this,fa.s,this.s),this.s?this.t+=fa.t:this.s=fa.t},valueOf:function(){return this.s}};var fa=new ca;function ha(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var pa,da,ga,_a,ya=ua(),va=ua(),ma={point:Di,lineStart:Di,lineEnd:Di,polygonStart:function(){ma.lineStart=xa,ma.lineEnd=wa},polygonEnd:function(){ma.lineStart=ma.lineEnd=ma.point=Di,ya.add(ki(va)),va.reset()},result:function(){var t=ya/2;return ya.reset(),t}};function xa(){ma.point=ba}function ba(t,e){ma.point=Sa,pa=ga=t,da=_a=e}function Sa(t,e){va.add(_a*t-ga*e),ga=t,_a=e}function wa(){Sa(pa,da)}var Ta,ka,za,Fa,Aa=ma,Ma=0,Ca=0,La=0,Ea=0,Na=0,Da=0,Oa=0,Pa=0,Ra=0,Ia={point:Wa,lineStart:ja,lineEnd:Ba,polygonStart:function(){Ia.lineStart=Ga,Ia.lineEnd=qa},polygonEnd:function(){Ia.point=Wa,Ia.lineStart=ja,Ia.lineEnd=Ba},result:function(){var t=Ra?[Oa/Ra,Pa/Ra]:Da?[Ea/Da,Na/Da]:La?[Ma/La,Ca/La]:[NaN,NaN];return Ma=Ca=La=Ea=Na=Da=Oa=Pa=Ra=0,t}};function Wa(t,e){Ma+=t,Ca+=e,++La}function ja(){Ia.point=Ha}function Ha(t,e){Ia.point=Ua,Wa(za=t,Fa=e)}function Ua(t,e){var n=t-za,r=e-Fa,i=Ei(n*n+r*r);Ea+=i*(za+t)/2,Na+=i*(Fa+e)/2,Da+=i,Wa(za=t,Fa=e)}function Ba(){Ia.point=Wa}function Ga(){Ia.point=Va}function qa(){Ya(Ta,ka)}function Va(t,e){Ia.point=Ya,Wa(Ta=za=t,ka=Fa=e)}function Ya(t,e){var n=t-za,r=e-Fa,i=Ei(n*n+r*r);Ea+=i*(za+t)/2,Na+=i*(Fa+e)/2,Da+=i,Oa+=(i=Fa*t-za*e)*(za+t),Pa+=i*(Fa+e),Ra+=3*i,Wa(za=t,Fa=e)}var Xa=Ia;function Ka(t){this._context=t}Ka.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,Si)}},result:Di};var Ja,Za,$a,Qa,to,eo=ua(),no={point:Di,lineStart:function(){no.point=ro},lineEnd:function(){Ja&&io(Za,$a),no.point=Di},polygonStart:function(){Ja=!0},polygonEnd:function(){Ja=null},result:function(){var t=+eo;return eo.reset(),t}};function ro(t,e){no.point=io,Za=Qa=t,$a=to=e}function io(t,e){Qa-=t,to-=e,eo.add(Ei(Qa*Qa+to*to)),Qa=t,to=e}var ao,oo,lo,so,uo,co,fo,ho,po,go,_o,yo,vo,mo,xo,bo,So=no;function wo(){this._string=[]}function To(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ko(t,e,n){var r=Lt(t,e-vi,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function zo(t,e,n){var r=Lt(t,e-vi,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Fo(){var t,e,n,r,i,a,o,l,s,u,c,f,h=10,p=h,d=90,g=360,_=2.5;function y(){return{type:"MultiLineString",coordinates:v()}}function v(){return Lt(Mi(r/d)*d,n,d).map(c).concat(Lt(Mi(l/g)*g,o,g).map(f)).concat(Lt(Mi(e/h)*h,t,h).filter((function(t){return ki(t%d)>vi})).map(s)).concat(Lt(Mi(a/p)*p,i,p).filter((function(t){return ki(t%g)>vi})).map(u))}return y.lines=function(){return v().map((function(t){return{type:"LineString",coordinates:t}}))},y.outline=function(){return{type:"Polygon",coordinates:[c(r).concat(f(o).slice(1),c(n).reverse().slice(1),f(l).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],l=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),l>o&&(t=l,l=o,o=t),y.precision(_)):[[r,l],[n,o]]},y.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),y.precision(_)):[[e,a],[t,i]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(d=+t[0],g=+t[1],y):[d,g]},y.stepMinor=function(t){return arguments.length?(h=+t[0],p=+t[1],y):[h,p]},y.precision=function(h){return arguments.length?(_=+h,s=ko(a,i,90),u=zo(e,t,_),c=ko(l,o,90),f=zo(r,n,_),y):_},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}wo.prototype={_radius:4.5,_circle:To(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=To(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var Ao={sphere:Di,point:Mo,lineStart:Lo,lineEnd:Do,polygonStart:function(){Ao.lineStart=Oo,Ao.lineEnd=Po},polygonEnd:function(){Ao.lineStart=Lo,Ao.lineEnd=Do}};function Mo(t,e){t*=Ti;var n=Ai(e*=Ti);Co(n*Ai(t),n*Ci(t),Ci(e))}function Co(t,e,n){++ao,lo+=(t-lo)/ao,so+=(e-so)/ao,uo+=(n-uo)/ao}function Lo(){Ao.point=Eo}function Eo(t,e){t*=Ti;var n=Ai(e*=Ti);mo=n*Ai(t),xo=n*Ci(t),bo=Ci(e),Ao.point=No,Co(mo,xo,bo)}function No(t,e){t*=Ti;var n=Ai(e*=Ti),r=n*Ai(t),i=n*Ci(t),a=Ci(e),o=Fi(Ei((o=xo*a-bo*i)*o+(o=bo*r-mo*a)*o+(o=mo*i-xo*r)*o),mo*r+xo*i+bo*a);oo+=o,co+=o*(mo+(mo=r)),fo+=o*(xo+(xo=i)),ho+=o*(bo+(bo=a)),Co(mo,xo,bo)}function Do(){Ao.point=Mo}function Oo(){Ao.point=Ro}function Po(){Io(yo,vo),Ao.point=Mo}function Ro(t,e){yo=t,vo=e,t*=Ti,e*=Ti,Ao.point=Io;var n=Ai(e);mo=n*Ai(t),xo=n*Ci(t),bo=Ci(e),Co(mo,xo,bo)}function Io(t,e){t*=Ti;var n=Ai(e*=Ti),r=n*Ai(t),i=n*Ci(t),a=Ci(e),o=xo*a-bo*i,l=bo*r-mo*a,s=mo*i-xo*r,u=Ei(o*o+l*l+s*s),c=Ni(u),f=u&&-c/u;po+=f*o,go+=f*l,_o+=f*s,oo+=c,co+=c*(mo+(mo=r)),fo+=c*(xo+(xo=i)),ho+=c*(bo+(bo=a)),Co(mo,xo,bo)}function Wo(t){ao=oo=lo=so=uo=co=fo=ho=po=go=_o=0,Zi(t,Ao);var e=po,n=go,r=_o,i=e*e+n*n+r*r;return i<1e-12&&(e=co,n=fo,r=ho,oo<vi&&(e=lo,n=so,r=uo),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[Fi(n,e)*wi,Ni(r/Ei(i))*wi]}function jo(t){return[Fi(t[1],t[0]),Ni(t[2])]}function Ho(t){var e=t[0],n=t[1],r=Ai(n);return[r*Ai(e),r*Ci(e),Ci(n)]}function Uo(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Bo(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 Go(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function qo(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Vo(t){var e=Ei(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var Yo=ua();function Xo(t){return ki(t[0])<=mi?t[0]:Li(t[0])*((ki(t[0])+mi)%Si-mi)}function Ko(t,e,n,r){return function(i){var a,o,l,s=e(i),u=Oi(),c=e(u),f=!1,h={point:p,lineStart:g,lineEnd:_,polygonStart:function(){h.point=y,h.lineStart=v,h.lineEnd=m,o=[],a=[]},polygonEnd:function(){h.point=p,h.lineStart=g,h.lineEnd=_,o=Ft(o);var t=function(t,e){var n=Xo(e),r=e[1],i=Ci(r),a=[Ci(n),-Ai(n),0],o=0,l=0;Yo.reset(),1===i?r=xi+vi:-1===i&&(r=-xi-vi);for(var s=0,u=t.length;s<u;++s)if(f=(c=t[s]).length)for(var c,f,h=c[f-1],p=Xo(h),d=h[1]/2+bi,g=Ci(d),_=Ai(d),y=0;y<f;++y,p=m,g=b,_=S,h=v){var v=c[y],m=Xo(v),x=v[1]/2+bi,b=Ci(x),S=Ai(x),w=m-p,T=w>=0?1:-1,k=T*w,z=k>mi,F=g*b;if(Yo.add(Fi(F*T*Ci(k),_*S+F*Ai(k))),o+=z?w+T*Si:w,z^p>=n^m>=n){var A=Bo(Ho(h),Ho(v));Vo(A);var M=Bo(a,A);Vo(M);var C=(z^w>=0?-1:1)*Ni(M[2]);(r>C||r===C&&(A[0]||A[1]))&&(l+=z^w>=0?1:-1)}}return(o<-1e-6||o<vi&&Yo<-1e-6)^1&l}(a,r);o.length?(f||(i.polygonStart(),f=!0),Ii(o,Zo,t,n,i)):t&&(f||(i.polygonStart(),f=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),f&&(i.polygonEnd(),f=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(e,n){t(e,n)&&i.point(e,n)}function d(t,e){s.point(t,e)}function g(){h.point=d,s.lineStart()}function _(){h.point=p,s.lineEnd()}function y(t,e){l.push([t,e]),c.point(t,e)}function v(){c.lineStart(),l=[]}function m(){y(l[0][0],l[0][1]),c.lineEnd();var t,e,n,r,s=c.clean(),h=u.result(),p=h.length;if(l.pop(),a.push(l),l=null,p)if(1&s){if((e=(n=h[0]).length-1)>0){for(f||(i.polygonStart(),f=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else p>1&&2&s&&h.push(h.pop().concat(h.shift())),o.push(h.filter(Jo))}return h}}function Jo(t){return t.length>1}function Zo(t,e){return((t=t.x)[0]<0?t[1]-xi-vi:xi-t[1])-((e=e.x)[0]<0?e[1]-xi-vi:xi-e[1])}var $o=Ko((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var l=a>0?mi:-mi,s=ki(a-n);ki(s-mi)<vi?(t.point(n,r=(r+o)/2>0?xi:-xi),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),t.point(a,r),e=0):i!==l&&s>=mi&&(ki(n-i)<vi&&(n-=i*vi),ki(a-l)<vi&&(a-=l*vi),r=function(t,e,n,r){var i,a,o=Ci(t-n);return ki(o)>vi?zi((Ci(e)*(a=Ai(r))*Ci(n)-Ci(r)*(i=Ai(e))*Ci(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(l,r),e=0),t.point(n=a,r=o),i=l},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*xi,r.point(-mi,i),r.point(0,i),r.point(mi,i),r.point(mi,0),r.point(mi,-i),r.point(0,-i),r.point(-mi,-i),r.point(-mi,0),r.point(-mi,i);else if(ki(t[0]-e[0])>vi){var a=t[0]<e[0]?mi:-mi;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-mi,-xi]);function Qo(t,e){(e=Ho(e))[0]-=t,Vo(e);var n,r=(n=-e[1])>1?0:n<-1?mi:Math.acos(n);return((-e[2]<0?-r:r)+Si-vi)%Si}function tl(t){var e=Ai(t),n=6*Ti,r=e>0,i=ki(e)>vi;function a(t,n){return Ai(t)*Ai(n)>e}function o(t,n,r){var i=[1,0,0],a=Bo(Ho(t),Ho(n)),o=Uo(a,a),l=a[0],s=o-l*l;if(!s)return!r&&t;var u=e*o/s,c=-e*l/s,f=Bo(i,a),h=qo(i,u);Go(h,qo(a,c));var p=f,d=Uo(h,p),g=Uo(p,p),_=d*d-g*(Uo(h,h)-1);if(!(_<0)){var y=Ei(_),v=qo(p,(-d-y)/g);if(Go(v,h),v=jo(v),!r)return v;var m,x=t[0],b=n[0],S=t[1],w=n[1];b<x&&(m=x,x=b,b=m);var T=b-x,k=ki(T-mi)<vi;if(!k&&w<S&&(m=S,S=w,w=m),k||T<vi?k?S+w>0^v[1]<(ki(v[0]-x)<vi?S:w):S<=v[1]&&v[1]<=w:T>mi^(x<=v[0]&&v[0]<=b)){var z=qo(p,(-d+y)/g);return Go(z,h),[v,jo(z)]}}}function l(e,n){var i=r?t:mi-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return Ko(a,(function(t){var e,n,s,u,c;return{lineStart:function(){u=s=!1,c=1},point:function(f,h){var p,d=[f,h],g=a(f,h),_=r?g?0:l(f,h):g?l(f+(f<0?mi:-mi),h):0;if(!e&&(u=s=g)&&t.lineStart(),g!==s&&(!(p=o(e,d))||Pi(e,p)||Pi(d,p))&&(d[2]=1),g!==s)c=0,g?(t.lineStart(),p=o(d,e),t.point(p[0],p[1])):(p=o(e,d),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&r^g){var y;_&n||!(y=o(d,e,!0))||(c=0,r?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&Pi(e,d)||t.point(d[0],d[1]),e=d,s=g,n=_},lineEnd:function(){s&&t.lineEnd(),e=null},clean:function(){return c|(u&&s)<<1}}}),(function(e,r,i,a){!function(t,e,n,r,i,a){if(n){var o=Ai(e),l=Ci(e),s=r*n;null==i?(i=e+r*Si,a=e-s/2):(i=Qo(o,i),a=Qo(o,a),(r>0?i<a:i>a)&&(i+=r*Si));for(var u,c=i;r>0?c>a:c<a;c-=s)u=jo([o,-l*Ai(c),-l*Ci(c)]),t.point(u[0],u[1])}}(a,t,n,i,e,r)}),r?[0,-t]:[-mi,t-mi])}function el(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n}function nl(t,e){return[ki(t)>mi?t+Math.round(-t/Si)*Si:t,e]}function rl(t){return function(e,n){return[(e+=t)>mi?e-Si:e<-mi?e+Si:e,n]}}function il(t){var e=rl(t);return e.invert=rl(-t),e}function al(t,e){var n=Ai(t),r=Ci(t),i=Ai(e),a=Ci(e);function o(t,e){var o=Ai(e),l=Ai(t)*o,s=Ci(t)*o,u=Ci(e),c=u*n+l*r;return[Fi(s*i-c*a,l*n-u*r),Ni(c*i+s*a)]}return o.invert=function(t,e){var o=Ai(e),l=Ai(t)*o,s=Ci(t)*o,u=Ci(e),c=u*i-s*a;return[Fi(s*i+u*a,l*n+c*r),Ni(c*n-l*r)]},o}nl.invert=nl;var ol=Ai(30*Ti);function ll(t,e){return+e?function(t,e){function n(r,i,a,o,l,s,u,c,f,h,p,d,g,_){var y=u-r,v=c-i,m=y*y+v*v;if(m>4*e&&g--){var x=o+h,b=l+p,S=s+d,w=Ei(x*x+b*b+S*S),T=Ni(S/=w),k=ki(ki(S)-1)<vi||ki(a-f)<vi?(a+f)/2:Fi(b,x),z=t(k,T),F=z[0],A=z[1],M=F-r,C=A-i,L=v*M-y*C;(L*L/m>e||ki((y*M+v*C)/m-.5)>.3||o*h+l*p+s*d<ol)&&(n(r,i,a,o,l,s,F,A,k,x/=w,b/=w,S,g,_),_.point(F,A),n(F,A,k,x,b,S,u,c,f,h,p,d,g,_))}}return function(e){var r,i,a,o,l,s,u,c,f,h,p,d,g={point:_,lineStart:y,lineEnd:m,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function _(n,r){n=t(n,r),e.point(n[0],n[1])}function y(){c=NaN,g.point=v,e.lineStart()}function v(r,i){var a=Ho([r,i]),o=t(r,i);n(c,f,u,h,p,d,c=o[0],f=o[1],u=r,h=a[0],p=a[1],d=a[2],16,e),e.point(c,f)}function m(){g.point=_,e.lineEnd()}function x(){y(),g.point=b,g.lineEnd=S}function b(t,e){v(r=t,e),i=c,a=f,o=h,l=p,s=d,g.point=v}function S(){n(c,f,u,h,p,d,i,a,r,o,l,s,16,e),g.lineEnd=m,m()}return g}}(t,e):function(t){return Gi({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)}var sl=Gi({point:function(t,e){this.stream.point(t*Ti,e*Ti)}});function ul(t,e,n,r,i){function a(a,o){return[e+t*(a*=r),n-t*(o*=i)]}return a.invert=function(a,o){return[(a-e)/t*r,(n-o)/t*i]},a}function cl(t,e,n,r,i,a){var o=Ai(a),l=Ci(a),s=o*t,u=l*t,c=o/t,f=l/t,h=(l*n-o*e)/t,p=(l*e+o*n)/t;function d(t,a){return[s*(t*=r)-u*(a*=i)+e,n-u*t-s*a]}return d.invert=function(t,e){return[r*(c*t-f*e+h),i*(p-f*t-c*e)]},d}function fl(t){return function(t){var e,n,r,i,a,o,l,s,u,c,f=150,h=480,p=250,d=0,g=0,_=0,y=0,v=0,m=0,x=1,b=1,S=null,w=$o,T=null,k=Bi,z=.5;function F(t){return s(t[0]*Ti,t[1]*Ti)}function A(t){return(t=s.invert(t[0],t[1]))&&[t[0]*wi,t[1]*wi]}function M(){var t=cl(f,0,0,x,b,m).apply(null,e(d,g)),r=(m?cl:ul)(f,h-t[0],p-t[1],x,b,m);return n=function(t,e,n){return(t%=Si)?e||n?el(il(t),al(e,n)):il(t):e||n?al(e,n):nl}(_,y,v),l=el(e,r),s=el(n,l),o=ll(l,z),C()}function C(){return u=c=null,F}return F.stream=function(t){return u&&c===t?u:u=sl(function(t){return Gi({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(w(o(k(c=t)))))},F.preclip=function(t){return arguments.length?(w=t,S=void 0,C()):w},F.postclip=function(t){return arguments.length?(k=t,T=r=i=a=null,C()):k},F.clipAngle=function(t){return arguments.length?(w=+t?tl(S=t*Ti):(S=null,$o),C()):S*wi},F.clipExtent=function(t){return arguments.length?(k=null==t?(T=r=i=a=null,Bi):Ui(T=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),C()):null==T?null:[[T,r],[i,a]]},F.scale=function(t){return arguments.length?(f=+t,M()):f},F.translate=function(t){return arguments.length?(h=+t[0],p=+t[1],M()):[h,p]},F.center=function(t){return arguments.length?(d=t[0]%360*Ti,g=t[1]%360*Ti,M()):[d*wi,g*wi]},F.rotate=function(t){return arguments.length?(_=t[0]%360*Ti,y=t[1]%360*Ti,v=t.length>2?t[2]%360*Ti:0,M()):[_*wi,y*wi,v*wi]},F.angle=function(t){return arguments.length?(m=t%360*Ti,M()):m*wi},F.reflectX=function(t){return arguments.length?(x=t?-1:1,M()):x<0},F.reflectY=function(t){return arguments.length?(b=t?-1:1,M()):b<0},F.precision=function(t){return arguments.length?(o=ll(l,z=t*t),C()):Ei(z)},F.fitExtent=function(t,e){return aa(F,t,e)},F.fitSize=function(t,e){return oa(F,t,e)},F.fitWidth=function(t,e){return la(F,t,e)},F.fitHeight=function(t,e){return sa(F,t,e)},function(){return e=t.apply(this,arguments),F.invert=e.invert&&A,M()}}((function(){return t}))()}var hl=Math.abs,pl=(Math.atan,Math.atan2,Math.ceil,Math.cos,Math.exp,Math.floor),dl=(Math.log,Math.max),gl=Math.min,_l=(Math.pow,Math.round,Math.sign,Math.sin,Math.tan,Math.PI),yl=_l/2,vl=(Math.SQRT1_2,xl(2),xl(_l),180/_l),ml=_l/180;function xl(t){return t>0?Math.sqrt(t):0}var bl=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function Sl(t,e){var n,r=gl(18,36*hl(e)/_l),i=pl(r),a=r-i,o=(n=bl[i])[0],l=n[1],s=(n=bl[++i])[0],u=n[1],c=(n=bl[gl(19,++i)])[0],f=n[1];return[t*(s+a*(c-o)/2+a*a*(c-2*s+o)/2),(e>0?yl:-yl)*(u+a*(f-l)/2+a*a*(f-2*u+l)/2)]}function wl(t){return t}function Tl(t,e){return"string"==typeof e&&(e=t.objects[e]),"GeometryCollection"===e.type?{type:"FeatureCollection",features:e.geometries.map((function(e){return kl(t,e)}))}:kl(t,e)}function kl(t,e){var n=e.id,r=e.bbox,i=null==e.properties?{}:e.properties,a=function(t,e){var n=function(t){if(null==t)return wl;var e,n,r=t.scale[0],i=t.scale[1],a=t.translate[0],o=t.translate[1];return function(t,l){l||(e=n=0);var s=2,u=t.length,c=new Array(u);for(c[0]=(e+=t[0])*r+a,c[1]=(n+=t[1])*i+o;s<u;)c[s]=t[s],++s;return c}}(t.transform),r=t.arcs;function i(t,e){e.length&&e.pop();for(var i=r[t<0?~t:t],a=0,o=i.length;a<o;++a)e.push(n(i[a],a));t<0&&function(t,e){for(var n,r=t.length,i=r-e;i<--r;)n=t[i],t[i++]=t[r],t[r]=n}(e,o)}function a(t){return n(t)}function o(t){for(var e=[],n=0,r=t.length;n<r;++n)i(t[n],e);return e.length<2&&e.push(e[0]),e}function l(t){for(var e=o(t);e.length<4;)e.push(e[0]);return e}function s(t){return t.map(l)}return function t(e){var n,r=e.type;switch(r){case"GeometryCollection":return{type:r,geometries:e.geometries.map(t)};case"Point":n=a(e.coordinates);break;case"MultiPoint":n=e.coordinates.map(a);break;case"LineString":n=o(e.arcs);break;case"MultiLineString":n=e.arcs.map(o);break;case"Polygon":n=s(e.arcs);break;case"MultiPolygon":n=e.arcs.map(s);break;default:return null}return{type:r,coordinates:n}}(e)}(t,e);return null==n&&null==r?{type:"Feature",properties:i,geometry:a}:null==r?{type:"Feature",id:n,properties:i,geometry:a}:{type:"Feature",id:n,bbox:r,properties:i,geometry:a}}bl.forEach((function(t){t[1]*=1.0144})),Sl.invert=function(t,e){var n=e/yl,r=90*n,i=gl(18,hl(r/5)),a=dl(0,pl(i));do{var o=bl[a][1],l=bl[a+1][1],s=bl[gl(19,a+2)][1],u=s-o,c=s-2*l+o,f=2*(hl(n)-l)/u,h=c/u,p=f*(1-h*f*(1-2*h*f));if(p>=0||1===a){r=(e>=0?5:-5)*(p+i);var d,g=50;do{p=(i=gl(18,hl(r)/5))-(a=pl(i)),o=bl[a][1],l=bl[a+1][1],s=bl[gl(19,a+2)][1],r-=(d=(e>=0?yl:-yl)*(l+p*(s-o)/2+p*p*(s-2*l+o)/2)-e)*vl}while(hl(d)>1e-12&&--g>0);break}}while(--a>=0);var _=bl[a][0],y=bl[a+1][0],v=bl[gl(19,a+2)][0];return[t/(y+p*(v-_)/2+p*p*(v-2*y+_)/2),r*ml]};var zl=function(t){return{type:"Feature",geometry:{type:"MultiPoint",coordinates:[[t[0],t[1]],[t[2],t[3]]]}}},Fl=function(t){return t.toLocaleString("en").replace(/,/gi," ")},Al=function(t){var e;function n(){(e=dt("#"+t.div)).empty()&&(e=dt("body").append("div").attr("id",t.div)),e.style("max-width",t.maxWidth),e.style("overflow","hidden"),e.style("font-size",t.fontSize),e.style("background",t.background),e.style("padding",t.padding),e.style("border",t.border),e.style("border-radius",t["border-radius"]),e.style("box-shadow",t["box-shadow"]),e.style("position","absolute"),e.style("font-family",t["font-family"]),e.style("pointer-events","none"),e.style("opacity","0")}return(t=t||{}).containerId=t.containerId||"map",t.div=t.div||"tooltip_eurostat",t.maxWidth=t.maxWidth||"200px",t.fontSize=t.fontSize||"14px",t.background=t.background||"white",t.padding=t.padding||"5px",t.border=t.border||"0px",t["border-radius"]=t["border-radius"]||"5px",t["box-shadow"]=t["box-shadow"]||"5px 5px 5px grey",t["font-family"]=t["font-family"]||"Helvetica, Arial, sans-serif",t.transitionDuration=t.transitionDuration||0,t.xOffset=t.xOffset||30,t.yOffset=t.yOffset||20,n.mouseover=function(t){t&&e.html(t);var r=et.pageX,i=et.pageY;n.ensureTooltipOnScreen(r,i)},n.mousemove=function(){var t=et.pageX,e=et.pageY;this.ensureTooltipOnScreen(t,e)},n.mouseout=function(){e.style("opacity",0)},n.style=function(t,r){return 1==arguments.length?e.style(t):(e.style(t,r),n)},n.attr=function(t,r){return 1==arguments.length?e.attr(t):(e.attr(t,r),n)},n.ensureTooltipOnScreen=function(n,r){e.style("opacity",1);var i=e.node();i.style.left=n+t.xOffset+"px",i.style.top=r-t.yOffset+"px";var a=document.getElementById(t.containerId).getBoundingClientRect(),o=a.width,l=a.height;if(i.offsetLeft>a.left+o-i.clientWidth){var s=n-i.clientWidth-t.xOffset;if(i.style.left=s+"px",i.offsetLeft+i.clientWidth>n){var u=n-(i.clientWidth+t.xOffset);i.style.left=u+"px"}}i.offsetTop+i.clientHeight>a.top+l&&(i.style.top=i.offsetTop-i.clientHeight+"px")},n(),n},Ml={EUR_3035:{cc:[{text:"AL",x:51e5,y:206e4,class:"cc",size:7},{text:"AT",x:467e4,y:2629e3,class:"cc",size:18},{text:"BE",x:393e4,y:301e4,class:"cc",size:17},{text:"BG",x:5567e3,y:22e5,class:"cc",size:22},{text:"HR",x:4876e3,y:2455e3,class:"cc",size:10},{text:"CY",x:6426e3,y:148e4,class:"cc",size:10},{text:"CZ",x:4707e3,y:2885e3,class:"cc",size:18},{text:"DK",x:4316e3,y:3621e3,class:"cc",size:20},{text:"EE",x:522e4,y:399e4,class:"cc",size:12},{text:"FI",x:515e4,y:4424e3,class:"cc",size:20},{text:"FR",x:3767740,y:2662817,class:"cc",size:22},{text:"DE",x:4347284,y:3093276,class:"cc",size:22},{text:"EL",x:537e4,y:175e4,class:"cc",size:22},{text:"HU",x:502e4,y:263e4,class:"cc",size:17},{text:"IS",x:304e4,y:4833e3,class:"cc",size:10},{text:"IE",x:3136e3,y:3394e3,class:"cc",size:17},{text:"IT",x:4469967,y:2181963,class:"cc",size:22},{text:"LV",x:529e4,y:38e5,class:"cc",size:12},{text:"LT",x:519e4,y:363e4,class:"cc",size:12},{text:"LU",x:412e4,y:294e4,class:"cc",size:12},{text:"MT",x:4731e3,y:13e5,class:"cc",size:10},{text:"ME",x:5073e3,y:2185e3,class:"cc",size:7},{text:"MK",x:53e5,y:208e4,class:"cc",size:10},{text:"NL",x:402e4,y:3208e3,class:"cc",size:17},{text:"NO",x:43e5,y:4147e3,class:"cc",size:20},{text:"PL",x:4964e3,y:32e5,class:"cc",size:22},{text:"PT",x:28e5,y:199e4,class:"cc",size:18},{text:"RO",x:5451e3,y:26e5,class:"cc",size:22},{text:"RS",x:52e5,y:23e5,class:"cc",size:10},{text:"SK",x:504e4,y:2835e3,class:"cc",size:12},{text:"SI",x:4655e3,y:248e4,class:"cc",size:10},{text:"ES",x:3160096,y:19e5,class:"cc",size:22},{text:"SE",x:463e4,y:4e6,class:"cc",size:20},{text:"CH",x:42e5,y:2564e3,class:"cc",size:16},{text:"TR",x:651e4,y:21e5,class:"cc",size:22},{text:"UK",x:3558e3,y:325e4,class:"cc",size:17}],en:[{text:"MEDITERRANEAN SEA",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTIC OCEAN",x:282e4,y:254e4,class:"seas",size:12,letterSpacing:2},{text:"NORTH SEA",x:3915e3,y:37e5,class:"seas",size:12},{text:"BALTIC SEA",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGIAN SEA",x:385e4,y:48e5,class:"seas",size:12,letterSpacing:1},{text:"BLACK SEA",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:4},{text:"ALBANIA",cc:"AL",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUSTRIA",cc:"AT",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIUM",cc:"BE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIA",cc:"BG",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIA",cc:"HR",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CYPRUS",cc:"CY",x:6426e3,y:148e4,class:"countries",size:10},{text:"CZECHIA",cc:"CZ",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DENMARK",cc:"DK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIA",cc:"EE",x:522e4,y:399e4,class:"countries",size:7},{text:"FINLAND",cc:"FI",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANCE",cc:"FR",x:3767740,y:2662817,class:"countries",size:12},{text:"GERMANY",cc:"DE",x:4347284,y:3093276,class:"countries",size:12},{text:"GREECE",cc:"EL",x:547e4,y:186e4,class:"countries",size:12},{text:"HUNGARY",cc:"HU",x:502e4,y:263e4,class:"countries",size:10},{text:"ICELAND",cc:"IS",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRELAND",cc:"IE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALY",cc:"IT",x:4469967,y:2181963,class:"countries",size:12},{text:"LATVIA",cc:"LV",x:529e4,y:38e5,class:"countries",size:7},{text:"LITHUANIA",cc:"LT",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",cc:"LU",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",cc:"MT",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",cc:"ME",x:5073e3,y:2185e3,class:"countries",size:7},{text:"N. MACEDONIA",cc:"MK",x:53e5,y:2082e3,class:"countries",size:7},{text:"NETHERLANDS",cc:"NL",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWAY",cc:"NO",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLAND",cc:"PL",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",cc:"PT",x:283e4,y:199e4,class:"countries",size:10,rotate:-75},{text:"ROMANIA",cc:"RO",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIA",cc:"RS",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAKIA",cc:"SK",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVENIA",cc:"SI",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPAIN",cc:"ES",x:3160096,y:185e4,class:"countries",size:12},{text:"SWEDEN",cc:"SE",x:463e4,y:41e5,class:"countries",size:12,rotate:-75},{text:"SWITZERLAND",cc:"CH",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURKEY",cc:"TR",x:651e4,y:21e5,class:"countries",size:12},{text:"U.K.",cc:"UK",x:3558e3,y:325e4,class:"countries",size:12}],fr:[{text:"MER MÉDITERRANÉE",x:5472e3,y:1242e3,class:"seas",size:12},{text:"OCÈAN ATLANTIQUE",x:282e4,y:254e4,class:"seas",size:12},{text:"MER DU NORD",x:3915e3,y:37e5,class:"seas",size:12},{text:"MER BALTIQUE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"MER DE NORVÈGE",x:385e4,y:48e5,class:"seas",size:12},{text:"MER NOIRE",x:6265e3,y:2472e3,class:"seas",size:12},{text:"ALBANIE",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"AUTRICHE",x:467e4,y:2629e3,class:"countries",size:10},{text:"BELGIQUE",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIE",x:5567e3,y:2256e3,class:"countries",size:12},{text:"CROATIE",x:4876e3,y:2455e3,class:"countries",size:7},{text:"CHYPRE",x:6426e3,y:148e4,class:"countries",size:10},{text:"TCHÉQUIE",x:4707e3,y:2885e3,class:"countries",size:12},{text:"DANEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTONIE",x:522e4,y:399e4,class:"countries",size:10},{text:"FINLANDE",x:5125e3,y:4424e3,class:"countries",size:12},{text:"FRANCE",x:3767740,y:2662817,class:"countries",size:12},{text:"ALLEMAGNE",x:4347284,y:3093276,class:"countries",size:12},{text:"GRÈCE",x:542e4,y:186e4,class:"countries",size:12},{text:"HONGRIE",x:502e4,y:2654e3,class:"countries",size:10},{text:"ISLANDE",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLANDE",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIE",x:45e5,y:2181963,class:"countries",size:12},{text:"LETTONIE",x:529e4,y:3776e3,class:"countries",size:10},{text:"LITUANIE",x:519e4,y:363e4,class:"countries",size:10},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTE",x:4731e3,y:1335e3,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"MAC. DU NORD",x:53e5,y:2082e3,class:"countries",size:7},{text:"PAYS-BAS",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORVEGE",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLOGNE",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"ROUMANIE",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIE",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOVAQUIE",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOVÉNIE",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-35},{text:"ESPAGNE",x:3160096,y:185e4,class:"countries",size:12},{text:"SUÈDE",x:47e5,y:4401e3,class:"countries",size:12,rotate:-75},{text:"SUISSE",x:42e5,y:2564e3,class:"countries",size:7},{text:"TURQUIE",x:651e4,y:21e5,class:"countries",size:12},{text:"ROYAUME-UNI",x:3558e3,y:325e4,class:"countries",size:10}],de:[{text:"MITTELMEER",x:5472e3,y:12e5,class:"seas",size:12,letterSpacing:7},{text:"ATLANTISCHER OZEAN",x:282e4,y:254e4,class:"seas",size:12},{text:"NORDSEE",x:3915e3,y:37e5,class:"seas",size:12},{text:"OSTSEE",x:49e5,y:3672e3,class:"seas",size:10,rotate:-50},{text:"NORWEGISCHE MEER",x:385e4,y:48e5,class:"seas",size:12},{text:"SCHWARZE MEER",x:63e5,y:25e5,class:"seas",size:12,letterSpacing:1},{text:"ALBANIEN",x:51e5,y:206e4,class:"countries",size:7,rotate:80},{text:"ÖSTERREICH",x:465e4,y:2629e3,class:"countries",size:7},{text:"BELGIEN",x:39e5,y:303e4,class:"countries",size:7,rotate:30},{text:"BULGARIEN",x:5567e3,y:2256e3,class:"countries",size:10},{text:"KROATIEN",x:4876e3,y:2455e3,class:"countries",size:7},{text:"ZYPERN",x:6426e3,y:148e4,class:"countries",size:10},{text:"TSCHECHIEN",x:4707e3,y:2885e3,class:"countries",size:7},{text:"DÄNEMARK",x:4316e3,y:3621e3,class:"countries",size:10},{text:"ESTLAND",x:522e4,y:399e4,class:"countries",size:7},{text:"FINNLAND",x:515e4,y:4424e3,class:"countries",size:12},{text:"FRANKREICH",x:3767740,y:2662817,class:"countries",size:12},{text:"DEUTSCHLAND",x:4347284,y:3093276,class:"countries",size:10},{text:"GRIECHENLAND",x:555e4,y:15e5,class:"countries",size:10},{text:"UNGARN",x:502e4,y:263e4,class:"countries",size:10},{text:"ISLAND",x:304e4,y:4833e3,class:"countries",size:10},{text:"IRLAND",x:3136e3,y:3394e3,class:"countries",size:10},{text:"ITALIEN",x:4469967,y:2181963,class:"countries",size:12,rotate:35},{text:"LETTLAND",x:529e4,y:38e5,class:"countries",size:7},{text:"LITAUEN",x:519e4,y:363e4,class:"countries",size:7},{text:"LUX.",x:412e4,y:294e4,class:"countries",size:7},{text:"MALTA",x:4731e3,y:133e4,class:"countries",size:7},{text:"MONT.",x:5073e3,y:2185e3,class:"countries",size:7},{text:"NORDMAZEDONIEN",x:535e4,y:2082e3,class:"countries",size:7},{text:"NIEDERLANDE",x:3977e3,y:3208e3,class:"countries",size:7},{text:"NORWEGEN",x:433e4,y:4147e3,class:"countries",size:12,rotate:-75},{text:"POLEN",x:4964e3,y:3269e3,class:"countries",size:12},{text:"PORTUGAL",x:2836136,y:1956179,class:"countries",size:10,rotate:-75},{text:"RUMÄNIEN",x:5451e3,y:26e5,class:"countries",size:12},{text:"SERBIEN",x:52e5,y:23e5,class:"countries",size:7},{text:"SLOWAKEI",x:504e4,y:2835e3,class:"countries",size:7,rotate:-30},{text:"SLOWENIEN",x:4735e3,y:2522e3,class:"countries",size:7,rotate:-30},{text:"SPANIEN",x:3160096,y:185e4,class:"countries",size:12},{text:"SCHWEDEN",x:467e4,y:418e4,class:"countries",size:12,rotate:-75},{text:"SCHWEIZ",x:42e5,y:2564e3,class:"countries",size:7},{text:"TRUTHAHN",x:651e4,y:21e5,class:"countries",size:12},{text:"VEREINIGTES",x:355e4,y:352e4,class:"countries",size:10},{text:"KÖNIGREICH",x:355e4,y:342e4,class:"countries",size:10}]},IC_32628:{cc:[{text:"ES",x:420468,y:3180647,class:"cc",size:12}],en:[{text:"Canary Islands",x:420468,y:3180647,class:"countries",size:12}],fr:[{text:"Les îles Canaries",x:420468,y:3180647,class:"countries",size:12}],de:[{text:"Kanarische Inseln",x:41e4,y:3180647,class:"countries",size:12}]},GP_32620:{cc:[{text:"FR",x:667e3,y:174e4,class:"cc",size:12}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:12}]},MQ_32620:{cc:[{text:"FR",x:716521,y:1621322,class:"cc",size:12}],en:[{text:"Martinique",x:716521,y:1621322,class:"countries",size:12}]},GF_32622:{cc:[{text:"FR",x:266852,y:444074,class:"cc",size:12}],en:[{text:"Guyane",x:266852,y:444074,class:"countries",size:12}],de:[{text:"Guayana",x:266852,y:444074,class:"countries",size:12}]},RE_32740:{cc:[{text:"FR",x:348011,y:768e4,class:"cc",size:10}],en:[{text:"Réunion",x:348011,y:768e4,class:"countries",size:10}]},YT_32738:{cc:[{text:"FR",x:516549,y:8593920,class:"cc",size:10}],en:[{text:"Mayotte",x:516549,y:8593920,class:"countries",size:10}]},MT_3035:{cc:[{text:"MT",x:4719755,y:1410701,class:"cc",size:10}],en:[{text:"Malta",x:4719755,y:1410701,class:"countries",size:10}]},PT20_32626:{cc:[{text:"PT",x:397418,y:432e4,class:"cc",size:10}],en:[{text:"Azores",x:397418,y:432e4,class:"countries",size:10}],fr:[{text:"Açores",x:397418,y:4271471,class:"countries",size:10}],de:[{text:"Azoren",x:397418,y:4271471,class:"countries",size:10}]},PT30_32628:{cc:[{text:"PT",x:333586,y:3624e3,class:"cc",size:10,rotate:30}],en:[{text:"Madeira",x:333586,y:3624e3,class:"countries",size:10,rotate:30}],fr:[{text:"Madère",x:333586,y:3624e3,class:"countries",size:10,rotate:30}]},LI_3035:{cc:[{text:"LI",x:4287060,y:266e4,class:"cc",size:12}],en:[{text:"Liechtenstein",x:4287060,y:2679e3,class:"countries",size:7}]},IS_3035:{cc:[{text:"IS",x:3011804,y:496e4,class:"cc",size:12}],en:[{text:"Iceland",x:3011804,y:496e4,class:"countries",size:12}],fr:[{text:"Islande",x:3011804,y:496e4,class:"countries",size:12}],de:[{text:"Island",x:3011804,y:496e4,class:"countries",size:12}]},SJ_SV_3035:{cc:[{text:"NO",x:457e4,y:626e4,class:"cc",size:10}],en:[{text:"Svalbard",x:457e4,y:626e4,class:"countries",size:10}],de:[{text:"Spitzbergen",x:457e4,y:626e4,class:"countries",size:7}]},SJ_JM_3035:{cc:[{text:"NO",x:3647762,y:5420300,class:"cc",size:10}],en:[{text:"Jan Mayen",x:3647762,y:5420300,class:"countries",size:7}]},CARIB_32620:{cc:[{text:"FR",x:7e5,y:181e4,class:"cc",size:10},{text:"FR",x:64e4,y:159e4,class:"cc",size:10},{text:"FR",x:54e4,y:1962e3,class:"cc",size:7}],en:[{text:"Guadeloupe",x:7e5,y:181e4,class:"countries",size:10},{text:"Martinique",x:57e4,y:159e4,class:"countries",size:10},{text:"Saint Martin",x:597e3,y:1962e3,class:"countries",size:7}]},WORLD_54030:{en:[{text:"NORTH ATLANTIC",x:-45,y:25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH ATLANTIC",x:-15,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTH PACIFIC",x:-126,y:-25,class:"seas",size:10,letterSpacing:1},{text:"NORTH",x:-136,y:25,class:"seas",size:10,letterSpacing:1},{text:"PACIFIC",x:-134,y:20,class:"seas",size:10,letterSpacing:1},{text:"INDIAN OCEAN",x:80,y:-25,class:"seas",size:10,letterSpacing:1},{text:"SOUTHERN OCEAN",x:-5,y:-67,class:"seas",size:10,letterSpacing:6}]}},Cl={"03M":{type:"Topology",arcs:[[[3061,1303],[-152,-59],[-32,-66],[-65,72],[-96,7],[-16,59],[-64,19],[-56,-39],[-120,39],[-184,-19],[-16,26],[32,52],[-16,72],[24,40],[8,183]],[[2885,0],[-8,46],[-65,85],[-40,-7],[-40,40],[0,111],[80,13],[25,46],[72,13],[40,98],[-56,118],[144,196],[-24,79],[88,59],[-24,98],[-8,20],[24,39],[8,52],[48,72],[-88,125]],[[825,2638],[-112,-98],[-72,-7],[-88,-118],[-176,-39],[56,-91],[88,-33],[24,-53],[56,-39],[24,-91],[-56,-46],[24,-105],[-56,-92],[-104,0],[-48,-104],[-16,-40],[-57,7],[-40,-53],[-16,-78],[113,-118],[-97,-65],[-88,-99],[-80,20],[-80,-39],[-24,-13]],[[1098,2304],[-193,66],[24,39],[-16,39],[65,13],[0,33],[-65,79],[-88,65]],[[2308,1689],[-153,-20],[-64,59],[-40,7],[-96,-27],[-104,138],[-8,92],[-32,78],[-64,26],[-32,-59],[-24,0],[-56,86],[-40,137],[-25,65],[-56,0],[-56,46],[-64,-72],[-120,53],[-88,-40],[-88,46]]],transform:{scale:[37.761044752777565,38.54734205626113],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"F",co:"F"}}]}}},"10M":{type:"Topology",arcs:[[[962,0],[-29,75],[48,131],[21,35],[11,38],[32,117],[-24,44]],[[1021,440],[-64,-29],[-70,36],[-120,2],[3,121]],[[770,570],[-126,16],[-40,91],[-45,4],[-51,93],[-142,4]],[[275,891],[-131,-99],[30,-36],[24,-31],[-6,-86],[-98,-86],[13,-64],[-27,-38],[-80,-31]],[[366,778],[-37,22],[-54,91]]],transform:{scale:[113.2099448513097,114.12782081303801],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"20M":{type:"Topology",arcs:[[[536,0],[-24,45],[15,30],[45,92],[-1,44],[-2,37]],[[569,248],[-130,9],[-10,64]],[[429,321],[-64,10],[-78,94],[-83,13]],[[153,502],[-73,-51],[26,-84],[-48,-53],[-3,-52],[-55,-25]],[[204,438],[-51,64]]],transform:{scale:[203.12309601494124,202.56551463031246],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}},"60M":{type:"Topology",arcs:[[[310,138],[-36,-2],[-40,42]],[[234,178],[-123,65]],[[84,278],[-84,-147]],[[111,243],[-27,35]],[[292,0],[18,138]]],transform:{scale:[372.84281730215633,364.87611898580536],translate:[5167020.037451873,2202278.5103255166]},objects:{nutsbn_1:{type:"GeometryCollection",geometries:[{type:"LineString",arcs:[0],properties:{id:1000004,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[1],properties:{id:1000003,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[2],properties:{id:1000001,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[3],properties:{id:1000002,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}},{type:"LineString",arcs:[4],properties:{id:1000005,lvl:1,eu:"F",efta:"F",cc:"T",oth:"T",co:"F"}}]}}}};function Ll(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var El=function t(e,n){var i={svgId_:"map",svg_:void 0};i.width_=Math.min(800,window.innerWidth),i.height_=0,i.containerId_=void 0,i.nutsLvl_=3,i.nutsYear_=2016,i.geo_="EUR",i.proj_="3035",i.projectionFunction_=void 0,i.scale_="20M",i.geoCenter_=void 0,i.pixSize_=void 0,i.zoomExtent_=void 0,i.fontFamily_="Helvetica, Arial, sans-serif",i.title_="",i.titleFontSize_=20,i.titleFill_="black",i.titlePosition_=void 0,i.titleFontWeight_="bold",i.titleStroke_="none",i.titleStrokeWidth_="none",i.subtitle_="",i.subtitleFontSize_=12,i.subtitleFill_="grey",i.subtitlePosition_=void 0,i.subtitleFontWeight_="bold",i.subtitleStroke_="none",i.subtitleStrokeWidth_="none",i.frameStroke_="none",i.frameStrokeWidth_=.5,i.showScalebar_=!1,i.scalebarPosition_=[],i.scalebarFontSize_=9,i.scalebarUnits_=" km",i.scalebarTextOffset_=[0,12],i.scalebarMaxWidth_=150,i.scalebarHeight_=90,i.scalebarStrokeWidth_=1,i.scalebarSegmentHeight_=6,i.scalebarTickHeight_=8,i.tooltip_={maxWidth:"200px",fontSize:"14px",background:"white",padding:"5px",border:"0px",borderRadius:"5px",boxShadow:"5px 5px 5px grey",transitionDuration:200,xOffset:0,yOffset:0,textFunction:null,showFlags:!1},i.tooltipText_=function(t){return t.properties.na},i.tooltipShowFlags_=!1,i.bordersToShow_=["eu","efta","cc","oth","co"],i.countriesToShow_=["AL","AT","BE","BG","CH","CY","CZ","DE","DK","EE","EL","ES","FI","FR","HR","HU","IE","IS","IT","LI","LT","LU","LV","ME","MK","MT","NL","NO","PL","PT","RO","RS","SE","SI","SK","TR","UK"],i.nutsrgFillStyle_="white",i.nutsrgSelFillSty_="#e0bcdf",i.nutsbnStroke_={0:"black",1:"grey",2:"grey",3:"grey",oth:"grey",co:"black"},i.nutsbnStrokeWidth_={0:1,1:.4,2:.4,3:.4,oth:0,co:.4},i.cntrgFillStyle_="#E6E6E6",i.cntbnStroke_={eu:"black",efta:"black",cc:"black",oth:"#ffffff",co:"#7f7f7f"},i.cntbnStrokeWidth_={eu:.8,efta:.8,cc:.8,oth:.8,co:.5},i.worldFillStyle_="#E6E6E6",i.worldStroke_="black",i.worldStrokeWidth_=1,i.worldCoastStroke_="none",i.worldCoastStrokeWidth_=.3,i.seaFillStyle_="white",i.drawCoastalMargin_=!1,i.coastalMarginColor_="#c2daed",i.coastalMarginWidth_=5,i.coastalMarginStdDev_=2,i.drawGraticule_=!1,i.graticuleStroke_="lightgray",i.graticuleStrokeWidth_=1,i.labelling_=!1,i.labelsConfig_=Ml,i.labelsToShow_=["countries","seas"],i.labelFill_={seas:"#003399",countries:"black",cc:"black",values:"black"},i.labelStroke_={seas:"#003399",countries:"black",cc:"black",values:"black"},i.labelStrokeWidth_={seas:.5,countries:.5,cc:.5,values:.5},i.labelOpacity_={seas:1,countries:.8,cc:.8,values:.9},i.labelValuesFontSize_=10,i.labelShadow_=!1,i.labelShadowsToShow_=["countries","seas","cc","values"],i.labelShadowWidth_={seas:3,countries:1,cc:1,values:1},i.labelShadowColor_={seas:"white",countries:"white",cc:"white",values:"white"},i.showSourceLink_=!0,i.bottomText_="Administrative boundaries: ©EuroGeographics ©UN-FAO ©INSTAT ©Turkstat",i.botTxtFontSize_=10,i.botTxtFill_="black",i.botTxtPadding_=10,i.botTxtTooltipTxt_="The designations employed and the presentation of material on this map do not imply the expression of any opinion whatsoever on the part of the European Union concerning the legal status of any country, territory, city or area or of its authorities, or concerning the delimitation of its frontiers or boundaries. Kosovo*: This designation is without prejudice to positions on status, and is in line with UNSCR 1244/1999 and the ICJ Opinion on the Kosovo declaration of independence.",i.nuts2jsonBaseURL_="https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/",i.insets_=[],i.insetTemplates_={},i.insetBoxPosition_=void 0,i.insetBoxPadding_=5,i.insetBoxWidth_=210,i.insetZoomExtent_=null,i.insetScale_="03M",i._geom={mixed:{rg0:void 0,rg1:void 0,rg2:void 0,rg3:void 0},cntbn:void 0,cntrg:void 0,nutsbn:void 0,nutsrg:void 0,gra:void 0,worldrg:void 0,worldbn:void 0,kosovo:void 0,path:void 0};var a=function(t){i[t.substring(0,t.length-1)]=function(e){return arguments.length?(i[t]=e,i):i[t]}};for(var o in i)a(o);["tooltip_","nuts2jsonBaseURL_"].forEach((function(t){i[t.substring(0,t.length-1)]=function(e){if(!arguments.length)return i[t];if("object"===kn(e)&&null!==e)for(var n in e)i[t][n]=e[n];else i[t]=e;return l(t,e),i}}));var l=function(t,e){if(i.insetTemplates_)for(var n in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[n]))for(var r=0;r<i.insetTemplates_[n].length;r++)if(Array.isArray(i.insetTemplates_[n][r]))for(var a=0;a<i.insetTemplates_[n][r].length;a++)i.insetTemplates_[n][r][a][t](e);else i.insetTemplates_[n][r][t](e);else i.insetTemplates_[n][t](e)};i.tooltipText=function(t){return console.log("map.tooltipText() is now deprecated. Please use map.tooltip(config.textFunction) instead. See API reference for details."),i.tooltip_.textFunction=t,i},i.title=function(t){return arguments.length?(i.title_=t,i.svg()&&i.svg().select("#title"+i.geo()).text(t),i):i.title_},i.subtitle=function(t){return arguments.length?(i.subtitle_=t,i.svg()&&i.svg().select("#subtitle"+i.geo()).text(t),i):i.subtitle_},i.insets=function(){return arguments.length?(1==arguments.length&&"default"===arguments[0]?i.insets_="default":1==arguments.length&&Array.isArray(arguments[0])?i.insets_=arguments[0]:i.insets_=arguments,i):i.insets_},i.drawGraticule=function(t){if(!arguments.length)return i.drawGraticule_;i.drawGraticule_=t;var e=dt("#g_gra"),n=i.svg_?i.svg_.select("#zoomgroup"+i.svgId_):null;return e._groups[0][0]&&0==t?e.remove():i._geom.gra&&i._geom.path&&n&&1==t&&(e.remove(),n.append("g").attr("id","g_gra").style("fill","none").style("stroke",i.graticuleStroke()).style("stroke-width",i.graticuleStrokeWidth()).selectAll("path").data(i._geom.gra).enter().append("path").attr("d",i._geom.path).attr("class","gra"),dt("#g_gra").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))),i},i.seaFillStyle=function(t){if(!arguments.length)return i.seaFillStyle_;if(i.seaFillStyle_=t,"WORLD"==i.geo_){var e=dt("#sphere");e&&e.style("fill",i.seaFillStyle_)}else{var n=yi("#sea");n&&n.style("fill",i.seaFillStyle_)}for(var r in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[r]))for(var a=0;a<i.insetTemplates_[r].length;a++)if(Array.isArray(i.insetTemplates_[r][a]))for(var o=0;o<i.insetTemplates_[r][a].length;o++){var l=i.insetTemplates_[r][a][o];l.seaFillStyle_=i.seaFillStyle_}else{var s=i.insetTemplates_[r][a];s.seaFillStyle_=i.seaFillStyle_}else{var u=i.insetTemplates_[r];u.seaFillStyle_=i.seaFillStyle_}return i},i.cntrgFillStyle=function(t){if(!arguments.length)return i.cntrgFillStyle_;if(i.cntrgFillStyle_=t,"WORLD"==i.geo_){var e=yi(".worldrg");e&&e.attr("fill",(function(t,e,n){var r=dt(n[e]);return r.attr("ecl")?r.attr("fill"):i.cntrgFillStyle_}))}else{var n=yi(".cntrg");n&&n.style("fill",i.cntrgFillStyle_)}for(var r in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[r]))for(var a=0;a<i.insetTemplates_[r].length;a++)if(Array.isArray(i.insetTemplates_[r][a]))for(var o=0;o<i.insetTemplates_[r][a].length;o++){var l=i.insetTemplates_[r][a][o];l.cntrgFillStyle_=i.cntrgFillStyle_}else{var s=i.insetTemplates_[r][a];s.cntrgFillStyle_=i.cntrgFillStyle_}else{var u=i.insetTemplates_[r];u.cntrgFillStyle_=i.cntrgFillStyle_}return i},i.nutsrgFillStyle=function(t){if(!arguments.length)return i.nutsrgFillStyle_;for(var e in i.nutsrgFillStyle_=t,i.svg_&&i.updateStyle(),i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.nutsrgFillStyle_=i.nutsrgFillStyle_}else{var o=i.insetTemplates_[e][n];o.nutsrgFillStyle_=i.nutsrgFillStyle_}else{var l=i.insetTemplates_[e];l.nutsrgFillStyle_=i.nutsrgFillStyle_}return i},i.drawCoastalMargin=function(t){if(!arguments.length)return i.drawCoastalMargin_;i.drawCoastalMargin_=t;var e=yi("#g_coast_margin"),n=dt("#coastal_blur"),r=i.svg_?i.svg_.select("#zoomgroup"+i.svgId_):null;if(e._groups[0][0]&&0==t)e.remove();else if(1==t&&i._geom.path&&r){e.remove(),n.remove(),i.svg_.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var a=function(t){var e=i.svg().select("#zoomgroup"+t.svgId_).append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",t.coastalMarginWidth_).style("stroke",t.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");t._geom.cntbn&&e.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(t._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.nutsbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",t._geom.path),t._geom.worldbn&&e.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(t._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",t._geom.path)};for(var o in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[o]))for(var l=0;l<i.insetTemplates_[o].length;l++)if(Array.isArray(i.insetTemplates_[o][l]))for(var s=0;s<i.insetTemplates_[o][l].length;s++){var u=i.insetTemplates_[o][l][s];u.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+u.svgId_),i.drawCoastalMargin_&&a(u)}else{var c=i.insetTemplates_[o][l];c.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+c.svgId_),i.drawCoastalMargin_&&a(c)}else{var f=i.insetTemplates_[o];f.drawCoastalMargin_=i.drawCoastalMargin_,i.svg().select("#zoomgroup"+f.svgId_),i.drawCoastalMargin_&&a(f)}i.drawCoastalMargin_&&a(i),yi("#g_coast_margin").each((function(){"WORLD"==i.geo_?this.parentNode.insertBefore(this,this.parentNode.childNodes[3]):this.parentNode.insertBefore(this,this.parentNode.childNodes[1])}))}return i},i.coastalMarginWidth=function(t){if(!arguments.length)return i.coastalMarginWidth_;for(var e in i.coastalMarginWidth_=t,i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.coastalMarginWidth_=i.coastalMarginWidth_,a.drawCoastalMargin(!0)}else{var o=i.insetTemplates_[e][n];o.coastalMarginWidth_=i.coastalMarginWidth_,o.drawCoastalMargin(!0)}else{var l=i.insetTemplates_[e];l.coastalMarginWidth_=i.coastalMarginWidth_,l.drawCoastalMargin(!0)}return i.drawCoastalMargin(!0),i},i.coastalMarginColor=function(t){if(!arguments.length)return i.coastalMarginColor_;for(var e in i.coastalMarginColor_=t,i.insetTemplates_)if(Array.isArray(i.insetTemplates_[e]))for(var n=0;n<i.insetTemplates_[e].length;n++)if(Array.isArray(i.insetTemplates_[e][n]))for(var r=0;r<i.insetTemplates_[e][n].length;r++){var a=i.insetTemplates_[e][n][r];a.coastalMarginColor_=i.coastalMarginColor_,a.drawCoastalMargin(!0)}else{var o=i.insetTemplates_[e][n];o.coastalMarginColor_=i.coastalMarginColor_,o.drawCoastalMargin(!0)}else{var l=i.insetTemplates_[e];l.coastalMarginColor_=i.coastalMarginColor_,l.drawCoastalMargin(!0)}return i.drawCoastalMargin(!0),i};var s=void 0,u=void 0,c=void 0;function f(t,e){var n=t.labelsConfig_,r=t.lg_,i=[],a=e.append("g").attr("class","labels-container");if((t.labelsToShow_.includes("countries")||t.labelsToShow_.includes("seas"))&&(i=n[t.geo_+"_"+t.proj_][r]?n[t.geo_+"_"+t.proj_][r]:n[t.geo_+"_"+t.proj_].en),t.labelsToShow_.includes("cc")&&(i=i.concat(n[t.geo_+"_"+t.proj_].cc)),t.labelsToShow_.includes("values")&&t._geom.nutsrg){var o,l=a.append("g").attr("class","g_stat_label_shadows").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelShadowColor_.values})).attr("stroke",(function(e){return t.labelShadowColor_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values+t.labelShadowWidth_.values})).style("font-family",t.fontFamily_),s=a.append("g").attr("class","g_stat_labels").style("font-size",t.labelValuesFontSize_+"px").attr("text-anchor","middle").style("opacity",(function(e){return t.labelOpacity_.values})).style("fill",(function(e){return t.labelFill_.values})).attr("stroke",(function(e){return t.labelStroke_.values})).attr("stroke-width",(function(e){return t.labelStrokeWidth_.values})).style("font-family",t.fontFamily_);"mixed"==t.nutsLvl_?(t._geom.mixed.rg0=t._geom.nutsrg,t._geom.mixed.rg1=Tl(u[1],u[1].objects.nutsrg).features,t._geom.mixed.rg2=Tl(u[2],u[2].objects.nutsrg).features,t._geom.mixed.rg3=Tl(u[3],u[3].objects.nutsrg).features,o=t._geom.mixed.rg0.concat(t._geom.mixed.rg1,t._geom.mixed.rg2,t._geom.mixed.rg3)):o=t._geom.nutsrg,s.selectAll("g").data(o).enter().append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).style("pointer-events","none").attr("class","stat-label"),t.labelShadow_&&l.selectAll("g").data(o).enter().filter((function(e){return t.labelShadowsToShow_.includes("values")})).append("g").attr("transform",(function(e){return"translate("+t._geom.path.centroid(e)+")"})).style("pointer-events","none").attr("class","stat-label-shadow")}if(i){var c=i.filter((function(e){return"countries"==e.class&&t.labelsToShow_.includes("countries")||"seas"==e.class&&t.labelsToShow_.includes("seas")||"cc"==e.class&&t.labelsToShow_.includes("cc")?e:void 0})),f=a.append("g").attr("class","g_labelShadows").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle"),h=a.append("g").attr("class","g_geolabels").style("pointer-events","none").style("font-family",t.fontFamily_).attr("text-anchor","middle");t.labelShadow_&&f.selectAll("text").data(c).enter().append("text").filter((function(e){return t.labelShadowsToShow_.includes(e.class)})).attr("class",(function(t){return"labelShadow_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke",(function(e){return t.labelShadowColor_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]+t.labelShadowWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).style("font-style",(function(t){return"seas"==t.class?"italic":"normal"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text})),h.selectAll("text").data(c).enter().append("text").attr("class",(function(t){return"geolabel_"+t.class})).attr("x",(function(e){return e.rotate?0:t._projection([e.x,e.y])[0]})).attr("y",(function(e){return e.rotate?0:t._projection([e.x,e.y])[1]})).attr("dy",-7).style("opacity",(function(e){return t.labelOpacity_[e.class]})).style("letter-spacing",(function(t){return t.letterSpacing?t.letterSpacing:0})).style("fill",(function(e){return t.labelFill_[e.class]})).attr("stroke",(function(e){return t.labelStroke_[e.class]})).attr("stroke-width",(function(e){return t.labelStrokeWidth_[e.class]})).style("font-size",(function(t){return t.size+"px"})).attr("transform",(function(e){if(e.rotate){var n=t._projection([e.x,e.y]),r=n[0],i=n[1];return"translate(".concat(r,",").concat(i,") rotate(").concat(e.rotate,")")}return"rotate(0)"})).text((function(t){return t.text}))}}function h(t){return t<.01?1e3*t+"mm":t<1?100*t+"cm":t<1e3?1*t+"m":t/1e3}i.isGeoReady=function(){if(!s)return!1;for(var t in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[t])){for(var e=0;e<i.insetTemplates_[t].length;e++)if(Array.isArray(i.insetTemplates_[t][e])){for(var n=0;n<i.insetTemplates_[t][e].length;n++)if(!i.insetTemplates_[t][e][n].isGeoReady())return!1}else if(!i.insetTemplates_[t][e].isGeoReady())return!1}else if(!i.insetTemplates_[t].isGeoReady())return!1;return!0},i.getGeoDataPromise=function(){var t=this;if("mixed"==i.nutsLvl_&&"WORLD"!==i.geo_){var e=[];return[0,1,2,3].forEach((function(n){var r=[];r.push(i.nuts2jsonBaseURL_),r.push(i.nutsYear_),"EUR"!=i.geo_&&r.push("/"+t.geo_),r.push("/"),r.push(i.proj_),r.push("/"),r.push(i.scale_),r.push("/"),r.push(n),r.push(".json"),e.push(Fn(r.join("")))})),n&&[0,1,2,3].forEach((function(n){var r=[];r.push(i.nuts2jsonBaseURL_),r.push(i.nutsYear_),"EUR"!=i.geo_&&r.push("/"+t.geo_),r.push("/"),r.push(i.proj_),r.push("/nutspt_"),r.push(n),r.push(".json"),e.push(Fn(r.join("")))})),e}if("WORLD"==i.geo_)return[Fn("https://raw.githubusercontent.com/eurostat/eurostat-map.js/master/src/assets/topojson/WORLD_4326.json")];var r=[],a=[];if(a.push(i.nuts2jsonBaseURL_),a.push(i.nutsYear_),"EUR"!=i.geo_&&a.push("/"+this.geo_),a.push("/"),a.push(i.proj_),a.push("/"),a.push(i.scale_),a.push("/"),a.push(i.nutsLvl_),a.push(".json"),r.push(Fn(a.join(""))),n){var o=[];o.push(i.nuts2jsonBaseURL_),o.push(i.nutsYear_),"EUR"!=i.geo_&&o.push("/"+this.geo_),o.push("/"),o.push(i.proj_),o.push("/nutspt_"),o.push(i.nutsLvl_),o.push(".json"),r.push(Fn(o.join("")))}return r},i.updateGeoMT=function(t){if(s=null,u=null,c=null,"mixed"==i.nutsLvl_&&"WORLD"!==i.geo_){var e=i.getGeoDataPromise();Promise.all(e).then((function(e){u=e,s=e[0],n&&(c=[e[4],e[5],e[6],e[7]]),i.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}else{var r=i.getGeoDataPromise();Promise.all(r).then((function(e){s=e[0],n&&(c=e[1]),i.buildMapTemplate(),t&&t()}),(function(t){console.error(t)}))}for(var a in i.insetTemplates_)if(Array.isArray(i.insetTemplates_[a]))for(var o=0;o<i.insetTemplates_[a].length;o++)if(Array.isArray(i.insetTemplates_[a][o]))for(var l=0;l<i.insetTemplates_[a][o].length;l++)i.insetTemplates_[a][o][l].updateGeoMT(t);else i.insetTemplates_[a][o].updateGeoMT(t);else i.insetTemplates_[a].updateGeoMT(t);return i},i.buildMapTemplateBase=function(){i.insetTemplates_={};var t=dt("#"+i.svgId());0==t.size()&&(t=dt("body").append("svg").attr("id",i.svgId())),i.svg(t),i.containerId_||(i.containerId_=i.svgId_),i.tooltip_.containerId||(i.tooltip_.containerId=i.containerId_),yi("#"+i.svgId()+" > *").remove(),"WORLD"==i.geo_.toUpperCase()&&(i.height()||i.height(.55*i.width()),t.attr("width",i.width()).attr("height",i.height()),i.proj_=54030),i.height()||i.height(.85*i.width()),t.attr("width",i.width()).attr("height",i.height()),t.append("defs").append("clipPath").attr("id",i.svgId_+"_clipP").append("path").attr("d",function(t,e,n,r){return t=parseFloat(t,10),e=parseFloat(e,10),n=parseFloat(n,10),r=parseFloat(r,10),t<0||e<0||n<0||r<0?"":"M"+t+","+e+"L"+(t+n)+","+e+" "+(t+n)+","+(e+r)+" "+t+","+(e+r)+"z"}(0,0,i.width_,i.height_)),i.drawCoastalMargin_&&t.append("filter").attr("id","coastal_blur").attr("x","-200%").attr("y","-200%").attr("width","400%").attr("height","400%").append("feGaussianBlur").attr("in","SourceGraphic").attr("stdDeviation",i.coastalMarginStdDev_);var e=t.insert("g",":first-child").attr("id","drawing"+i.svgId_).attr("clip-path","url(#"+i.svgId_+"_clipP)"),n=e.append("g").attr("id","zoomgroup"+i.svgId_);i.insetBoxPosition_||(i.insetBoxPosition_=[i.width()-i.insetBoxWidth()-2*i.insetBoxPadding(),2*i.insetBoxPadding()]);var r=e.append("g").attr("id","insetsgroup").attr("transform","translate("+i.insetBoxPosition()[0]+","+i.insetBoxPosition()[1]+")");"default"===i.insets_&&(i.insets_=Dl(i.insetBoxWidth(),i.insetBoxPadding()));for(var a=0;a<i.insets_.length;a++){var o=i.insets_[a];if(o.svgId=o.svgId||"inset"+o.geo+Math.random().toString(36).substring(7),0==dt("#"+o.svgId).size()){var l=null==o.x?i.insetBoxPadding_:o.x,s=null==o.y?i.insetBoxPadding_+a*(i.insetBoxPadding_+i.insetBoxWidth_):o.y;r.append("g").attr("id","insetzg"+o.svgId).attr("transform","translate("+l+","+s+")").append("svg").attr("id",o.svgId)}if(i.insetTemplates_[o.geo]){var u=p(o,i);u.buildMapTemplateBase(),i.insetTemplates_[o.geo]=[i.insetTemplates_[o.geo],u]}else i.insetTemplates_[o.geo]=p(o,i).buildMapTemplateBase()}if(e.append("rect").attr("id","frame"+i.geo_).attr("x",0).attr("y",0).attr("width",i.width_).attr("height",i.height_).style("stroke-width",i.frameStrokeWidth_).style("stroke",i.frameStroke_).style("fill","none"),i.zoomExtent()){var c=function(){var t,e,n=fi,r=hi,i=_i,a=di,o=gi,l=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],u=250,c=jn,f=Dn("start","zoom","end"),h=500,p=0;function d(t){t.property("__zoom",pi).on("wheel.zoom",b).on("mousedown.zoom",S).on("dblclick.zoom",w).filter(o).on("touchstart.zoom",T).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new oi(e,t.x,t.y)}function _(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new oi(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),l=null==n?y(o):"function"==typeof n?n.apply(t,i):n,s=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,f="function"==typeof e?e.apply(t,i):e,h=c(u.invert(l).concat(s/u.k),f.invert(l).concat(s/f.k));return function(t){if(1===t)t=f;else{var e=h(t),n=s/e[2];t=new oi(n,l[0]-e[0]*n,l[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new x(t,e)}function x(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function b(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(l[0],Math.min(l[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Bn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],gr(this),t.start()}ci(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(_(g(e,r),t.mouse[0],t.mouse[1]),t.extent,s))}function u(){t.wheel=null,t.end()}}function S(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=dt(et.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",c,!0),a=Bn(this),o=et.clientX,l=et.clientY;Pn(et.view),ui(),t.mouse=[a,this.__zoom.invert(a)],gr(this),t.start()}function u(){if(ci(),!t.moved){var e=et.clientX-o,n=et.clientY-l;t.moved=e*e+n*n>p}t.zoom("mouse",i(_(t.that.__zoom,t.mouse[0]=Bn(t.that),t.mouse[1]),t.extent,s))}function c(){r.on("mousemove.zoom mouseup.zoom",null),Rn(et.view,t.moved),ci(),t.end()}}function w(){if(n.apply(this,arguments)){var t=this.__zoom,e=Bn(this),a=t.invert(e),o=t.k*(et.shiftKey?.5:2),l=i(_(g(t,o),e,a),r.apply(this,arguments),s);ci(),u>0?dt(this).transition().duration(u).call(v,l,e):dt(this).call(d.transform,l)}}function T(){if(n.apply(this,arguments)){var e,r,i,a,o=et.touches,l=o.length,s=m(this,arguments,et.changedTouches.length===l);for(ui(),r=0;r<l;++r)a=[a=Gn(this,o,(i=o[r]).identifier),this.__zoom.invert(a),i.identifier],s.touch0?s.touch1||s.touch0[2]===a[2]||(s.touch1=a,s.taps=0):(s.touch0=a,e=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(s.taps<2&&(t=setTimeout((function(){t=null}),h)),gr(this),s.start())}}function k(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),l=et.changedTouches,u=l.length;for(ci(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)r=Gn(this,l,(n=l[e]).identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var c=o.touch0[0],f=o.touch0[1],h=o.touch1[0],p=o.touch1[1],d=(d=h[0]-c[0])*d+(d=h[1]-c[1])*d,y=(y=p[0]-f[0])*y+(y=p[1]-f[1])*y;n=g(n,Math.sqrt(d/y)),r=[(c[0]+h[0])/2,(c[1]+h[1])/2],a=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(_(n,r,a),o.extent,s))}}function z(){if(this.__zooming){var t,n,r=m(this,arguments),i=et.changedTouches,a=i.length;for(ui(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),h),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=dt(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",pi),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,l=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(_(g(a,u),o,l),t,s)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),s)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,l=null==a?y(t):"function"==typeof a?a.apply(this,arguments):a;return i(li.translate(l[0],l[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,s)}),a)},x.prototype={start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){!function(t,e,n,r){var i=et;t.sourceEvent=et,et=t;try{e.apply(n,r)}finally{et=i}}(new ai(d,t,this.that.__zoom),f.apply,f,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:ii(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:ii(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:ii(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:ii([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],d):[l[0],l[1]]},d.translateExtent=function(t){return arguments.length?(s[0][0]=+t[0][0],s[1][0]=+t[1][0],s[0][1]=+t[0][1],s[1][1]=+t[1][1],d):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(c=t,d):c},d.on=function(){var t=f.on.apply(f,arguments);return t===f?d:t},d.clickDistance=function(t){return arguments.length?(p=(t=+t)*t,d):Math.sqrt(p)},d}().scaleExtent(i.zoomExtent()).on("zoom",(function(){for(var t=et.transform.k,e=["gra","bn_0","bn_co","cntbn","symbol"],r=0;r<e.length;r++)i.svg().selectAll("."+e[r]).style("stroke-width",(function(e){return 1/t+"px"}));n.attr("transform",et.transform)})).on("end",(function(){var e=si(t.node()),n=(Bn(this),e.invert([i.width_/2,i.height_/2]));i._projection.invert(n)}));t.call(c)}return i},i.buildMapTemplate=function(){i.tooltip_?i._tooltip=Al(i.tooltip_):i._tooltip=Al();var t=Nl[i.geo()+"_"+i.proj()];i.geoCenter()||(t?i.geoCenter(t.geoCenter):i.geoCenter([.5*(s.bbox[0]+s.bbox[2]),.5*(s.bbox[1]+s.bbox[3])])),i.pixSize()||(t?i.pixSize(800*t.pixSize/i.width()):i.pixSize(Math.min((s.bbox[2]-s.bbox[0])/i.width_,(s.bbox[3]-s.bbox[1])/i.height_)));var e=[i.geoCenter_[0]-.5*i.pixSize_*i.width_,i.geoCenter_[1]-.5*i.pixSize_*i.height_,i.geoCenter_[0]+.5*i.pixSize_*i.width_,i.geoCenter_[1]+.5*i.pixSize_*i.height_];"WORLD"==i.geo_?i._projection=i.projectionFunction_?i.projectionFunction_:fl(Sl).scale(152.63).translate([i.width_/2,i.height_/2]).scale((i.width_-20)/2/Math.PI):i._projection=i.projectionFunction_?i.projectionFunction_.fitSize([i.width_,i.height_],zl(e)):function(){var t,e,n,r,i,a,o,l=1,s=0,u=0,c=1,f=1,h=0,p=null,d=1,g=1,_=Gi({point:function(t,e){var n=m([t,e]);this.stream.point(n[0],n[1])}}),y=Bi;function v(){return d=l*c,g=l*f,a=o=null,m}function m(n){var r=n[0]*d,i=n[1]*g;if(h){var a=i*t-r*e;r=r*t+i*e,i=a}return[r+s,i+u]}return m.invert=function(n){var r=n[0]-s,i=n[1]-u;if(h){var a=i*t+r*e;r=r*t-i*e,i=a}return[r/d,i/g]},m.stream=function(t){return a&&o===t?a:a=_(y(o=t))},m.postclip=function(t){return arguments.length?(y=t,p=n=r=i=null,v()):y},m.clipExtent=function(t){return arguments.length?(y=null==t?(p=n=r=i=null,Bi):Ui(p=+t[0][0],n=+t[0][1],r=+t[1][0],i=+t[1][1]),v()):null==p?null:[[p,n],[r,i]]},m.scale=function(t){return arguments.length?(l=+t,v()):l},m.translate=function(t){return arguments.length?(s=+t[0],u=+t[1],v()):[s,u]},m.angle=function(n){return arguments.length?(e=Ci(h=n%360*Ti),t=Ai(h),v()):h*wi},m.reflectX=function(t){return arguments.length?(c=t?-1:1,v()):c<0},m.reflectY=function(t){return arguments.length?(f=t?-1:1,v()):f<0},m.fitExtent=function(t,e){return aa(m,t,e)},m.fitSize=function(t,e){return oa(m,t,e)},m.fitWidth=function(t,e){return la(m,t,e)},m.fitHeight=function(t,e){return sa(m,t,e)},m}().reflectY(!0).fitSize([i.width_,i.height_],zl(e)),i._geom.path=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),Zi(t,n(r))),r.result()}return a.area=function(t){return Zi(t,n(Aa)),Aa.result()},a.measure=function(t){return Zi(t,n(So)),So.result()},a.bounds=function(t){return Zi(t,n(ra)),ra.result()},a.centroid=function(t){return Zi(t,n(Xa)),Xa.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,Bi):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new wo):new Ka(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)}().projection(i._projection),"WORLD"==i.geo_?(i._geom.worldrg=Tl(s,s.objects.CNTR_RG_20M_2020_4326).features,i._geom.worldbn=Tl(s,s.objects.CNTR_BN_20M_2020_4326).features,i._geom.kosovo=Tl(s,s.objects.NUTS_BN_20M_2021_RS_XK_border).features,i._geom.gra=[Fo().step([30,30])()]):(i._geom.gra=Tl(s,s.objects.gra).features,i._geom.nutsrg=Tl(s,s.objects.nutsrg).features,i._geom.nutsbn=Tl(s,s.objects.nutsbn).features,i._geom.cntrg=Tl(s,s.objects.cntrg).features,i._geom.cntbn=Tl(s,s.objects.cntbn).features);var a,o=i.svg().select("#zoomgroup"+i.svgId_);if(o.selectAll("*").remove(),o.append("rect").attr("id","sea").attr("x",-5*i.width_).attr("y",-5*i.height_).attr("width",11*i.width_).attr("height",11*i.height_).style("fill",(function(){return"WORLD"==i.geo_?"white":i.seaFillStyle_})),"WORLD"==i.geo_&&o.append("path").datum({type:"Sphere"}).attr("id","sphere").attr("d",i._geom.path).attr("stroke",i.graticuleStroke()).attr("stroke-width",i.graticuleStrokeWidth()).attr("fill",i.seaFillStyle_),i.drawCoastalMargin_){var l=o.append("g").attr("id","g_coast_margin").style("fill","none").style("stroke-width",i.coastalMarginWidth_).style("stroke",i.coastalMarginColor_).style("filter","url(#coastal_blur)").style("stroke-linejoin","round").style("stroke-linecap","round");i._geom.cntbn&&l.append("g").attr("id","g_coast_margin_cnt").selectAll("path").data(i._geom.cntbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._geom.path),i._geom.nutsbn&&l.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(i._geom.nutsbn).enter().filter((function(t){return"T"===t.properties.co})).append("path").attr("d",i._geom.path),i._geom.worldbn&&l.append("g").attr("id","g_coast_margin_nuts").selectAll("path").data(i._geom.worldbn).enter().filter((function(t){return"T"===t.properties.COAS_FLAG})).append("path").attr("d",i._geom.path)}if(i._geom.gra&&i.drawGraticule_&&o.append("g").attr("id","g_gra").style("fill","none").style("stroke",i.graticuleStroke()).style("stroke-width",i.graticuleStrokeWidth()).selectAll("path").data(i._geom.gra).enter().append("path").attr("d",i._geom.path).attr("class","gra"),i._geom.cntrg&&o.append("g").attr("id","g_cntrg").selectAll("path").data(i._geom.cntrg).enter().append("path").attr("d",i._geom.path).attr("class","cntrg").style("fill",i.cntrgFillStyle()),i._geom.worldrg&&o.append("g").attr("id","g_worldrg").selectAll("path").data(i._geom.worldrg).enter().append("path").attr("d",i._geom.path).attr("class","worldrg").attr("fill",i.worldFillStyle_),i._geom.nutsrg)if("mixed"==i.nutsLvl_){if(i._geom.mixed.rg0=i._geom.nutsrg,i._geom.mixed.rg1=Tl(u[1],u[1].objects.nutsrg).features,i._geom.mixed.rg2=Tl(u[2],u[2].objects.nutsrg).features,i._geom.mixed.rg3=Tl(u[3],u[3].objects.nutsrg).features,[i._geom.mixed.rg0,i._geom.mixed.rg1,i._geom.mixed.rg2,i._geom.mixed.rg3].forEach((function(t,e){o.append("g").attr("id","g_nutsrg").selectAll("path").data(t).enter().append("path").attr("d",i._geom.path).attr("class","nutsrg").attr("lvl",e).attr("fill",i.nutsrgFillStyle_)})),"EUR"==i.geo_){var p=Tl(Cl[i.scale_],"nutsbn_1").features;i.bordersToShow_.includes("cc")&&o.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(p).enter().append("path").attr("d",i._geom.path).style("stroke","grey").style("stroke-width",.3)}}else o.append("g").attr("id","g_nutsrg").selectAll("path").data(i._geom.nutsrg).enter().append("path").attr("d",i._geom.path).attr("class","nutsrg").attr("fill",i.nutsrgFillStyle_);if(i._geom.cntbn&&o.append("g").attr("id","g_cntbn").style("fill","none").selectAll("path").data(i._geom.cntbn).enter().append("path").filter((function(t){return i.bordersToShow_.includes("eu")&&"T"==t.properties.eu||i.bordersToShow_.includes("efta")&&"T"==t.properties.efta||i.bordersToShow_.includes("cc")&&"T"==t.properties.cc||i.bordersToShow_.includes("oth")&&"T"==t.properties.oth||i.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).attr("d",i._geom.path).attr("class",(function(t){return"T"===t.properties.co?"bn_co":"cntbn"})).style("stroke",(function(t){return"T"===t.properties.co?i.cntbnStroke_.co:"T"===t.properties.eu?i.cntbnStroke_.eu:"T"===t.properties.efta?i.cntbnStroke_.efta:"T"===t.properties.cc?i.cntbnStroke_.cc:"T"===t.properties.oth?i.cntbnStroke_.oth:void 0})).style("stroke-width",(function(t){return"T"===t.properties.co?i.cntbnStrokeWidth_.co+"px":"T"===t.properties.eu?i.cntbnStrokeWidth_.eu+"px":"T"===t.properties.efta?i.cntbnStrokeWidth_.efta+"px":"T"===t.properties.cc?i.cntbnStrokeWidth_.cc+"px":"T"===t.properties.oth?i.cntbnStrokeWidth_.oth+"px":void 0})),i._geom.nutsbn&&(i._geom.nutsbn.sort((function(t,e){return e.properties.lvl-t.properties.lvl})),o.append("g").attr("id","g_nutsbn").style("fill","none").selectAll("path").data(i._geom.nutsbn).enter().filter((function(t){return i.bordersToShow_.includes("eu")&&"T"==t.properties.eu||i.bordersToShow_.includes("efta")&&"T"==t.properties.efta||i.bordersToShow_.includes("cc")&&"T"==t.properties.cc||i.bordersToShow_.includes("oth")&&"T"==t.properties.oth||i.bordersToShow_.includes("co")&&"T"==t.properties.co?t:void 0})).append("path").attr("d",i._geom.path).attr("class",(function(t){return"T"===(t=t.properties).co?"bn_co":["bn_"+t.lvl].join(" ")})).style("stroke",(function(t){return"T"===(t=t.properties).co?i.nutsbnStroke_.co||"#1f78b4":t.id>1e5?"#4f4f4f":i.nutsbnStroke_[t.lvl]||"#777"})).style("stroke-width",(function(t){return"T"===(t=t.properties).co?i.nutsbnStrokeWidth_.co:t.id>1e5?.2:t.lvl>0?i.nutsbnStrokeWidth_[t.lvl]:i.nutsbnStrokeWidth_[t.lvl]||.2})),"EUR"==i.geo_)){var d=Tl(Cl[i.scale_],"nutsbn_1").features;i.bordersToShow_.includes("cc")&&o.append("g").attr("id","g_kosovo").style("fill","none").selectAll("path").data(d).enter().append("path").attr("d",i._geom.path).style("stroke","grey").style("stroke-width",.3)}if(i._geom.worldbn&&o.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(i._geom.worldbn).enter().append("path").attr("d",i._geom.path).style("stroke",(function(t){return t.properties.POL_STAT>0?"#b2b2b2":"F"==t.properties.COAS_FLAG?i.worldStroke_:"T"==t.properties.COAS_FLAG?i.worldCoastStroke_:void 0})).style("stroke-width",(function(t){return"F"==t.properties.COAS_FLAG?i.worldStrokeWidth_:"T"==t.properties.COAS_FLAG?i.worldCoastStrokeWidth_:void 0})),i._geom.kosovo&&o.append("g").attr("id","g_worldbn").style("fill","none").selectAll("path").data(i._geom.kosovo).enter().append("path").attr("d",i._geom.path).style("stroke","#4f4f4f").style("stroke-width",(function(t){return"0.3px"})),n&&(c?a="mixed"==i.nutsLvl_?[].concat(r(c[0].features),r(c[1].features),r(c[2].features),r(c[3].features)):c.features:"WORLD"==i.geo_&&(a=[],i._geom.worldrg.forEach((function(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ll(Object(n),!0).forEach((function(e){Tn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ll(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t);e.geometry={coordinates:Wo(t),type:"Point"},a.push(e)}))),o.append("g").attr("id","g_ps").selectAll("g").data(a).enter().append("g").attr("transform",(function(t){return"translate("+i._projection(t.geometry.coordinates)+")"})).attr("class","symbol").style("fill","gray").attr("id",(function(t){return"ps"+t.properties.id})).on("mouseover",(function(t){if(i.countriesToShow_){if(i.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var e=dt(this.childNodes[0]);e.attr("fill___",e.style("fill")),e.style("fill",i.nutsrgSelFillSty_),i._tooltip&&i._tooltip.mouseover(i.tooltip_.textFunction(t,i))}}else{var n=dt(this.childNodes[0]);n.attr("fill___",n.style("fill")),n.style("fill",i.nutsrgSelFillSty_),i._tooltip&&i._tooltip.mouseover(i.tooltip_.textFunction(t,i))}})).on("mousemove",(function(t){i.countriesToShow_?i.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&i._tooltip&&i._tooltip.mousemove():i._tooltip&&i._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this.childNodes[0]);t.style("fill",t.attr("fill___")),i._tooltip&&i._tooltip.mouseout()}))),i.labelling_&&f(i,o),i.title()&&(i.titlePosition()||i.titlePosition([10,5+i.titleFontSize()]),i.svg().append("text").attr("id","title"+i.geo_).attr("class","eurostat-map-title").style("pointer-events","none").attr("x",i.titlePosition()[0]).attr("y",i.titlePosition()[1]).text(i.title()).style("font-family",i.fontFamily_).style("font-size",i.titleFontSize()+"px").style("font-weight",i.titleFontWeight()).style("fill",i.titleFill()).style("stroke",i.titleStroke()).style("stroke-width",i.titleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),i.subtitle()&&(i.subtitlePosition()||i.subtitlePosition([10,8+i.titleFontSize()+5+i.subtitleFontSize()]),i.svg().append("text").attr("id","subtitle"+i.geo_).attr("class","eurostat-map-subtitle").style("pointer-events","none").attr("x",i.subtitlePosition()[0]).attr("y",i.subtitlePosition()[1]).text(i.subtitle()).style("font-family",i.fontFamily_).style("font-size",i.subtitleFontSize()+"px").style("font-weight",i.subtitleFontWeight()).style("fill",i.subtitleFill()).style("stroke",i.subtitleStroke()).style("stroke-width",i.subtitleStrokeWidth()).style("stroke-linejoin","round").style("paint-order","stroke")),i.bottomText()&&i.svg().append("text").attr("id","bottomtext").attr("x",i.botTxtPadding_).attr("y",i.height_-i.botTxtPadding_).text(i.bottomText()).style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("fill",i.botTxtFill_).on("mouseover",(function(){i._tooltip.mw___=i._tooltip.style("max-width"),i._tooltip.style("max-width","400px"),i._tooltip.style("font-size",i.botTxtFontSize_),i.botTxtTooltipTxt_&&i._tooltip.mouseover(i.botTxtTooltipTxt_)})).on("mousemove",(function(){i.botTxtTooltipTxt_&&i._tooltip.mousemove()})).on("mouseout",(function(){i.botTxtTooltipTxt_&&i._tooltip.mouseout(),i._tooltip.style("max-width",i._tooltip.mw___)})),i.showSourceLink_&&i.stat()&&i.stat().eurostatDatasetCode){var g=i.stat().eurostatDatasetCode,_="https://ec.europa.eu/eurostat/databrowser/view/".concat(g,"/default/table?lang=en"),y=i.svg().append("a").attr("href",_).attr("target","_blank").append("text").attr("id","source-dataset-link").attr("x",i.width_-i.botTxtPadding_).attr("y",i.height_-i.botTxtPadding_).text("EUROSTAT").style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("font-weight","bold").attr("text-anchor","end").on("mouseover",(function(){var t=dt(this);t.attr("fill","lightblue"),t.style("cursor","pointer"),t.style("text-decoration","underline")})).on("mouseout",(function(){var t=dt(this);t.attr("fill","black"),t.style("cursor","default"),t.style("text-decoration","none")})).node().getComputedTextLength();i.svg().append("text").attr("x",i.width_-i.botTxtPadding_-y-2).attr("y",i.height_-i.botTxtPadding_).text("Source:").style("font-family",i.fontFamily_).style("font-size",i.botTxtFontSize_+"px").style("stroke-width","0.3px").attr("text-anchor","end")}return i.showScalebar_&&(2!==i.scalebarPosition_.length&&(i.scalebarPosition_[0]=15,i.scalebarPosition_[1]=i.height_-50),function(){var t,e,n=i.svg().append("svg").attr("id","scalebar").attr("x",i.scalebarPosition_[0]).attr("y",i.scalebarPosition_[1]),r=(i.scalebarSegmentHeight_,5),a=i.scalebarMaxWidth_,o=i.scalebarTextOffset_[0],l=i.scalebarTextOffset_[1],s=i.pixSize_,u=(t=a*s,5*(e=Math.pow(10,Math.floor(Math.log(t)/Math.log(10))))<=t?[5*e,5]:2*e<=t?[2*e,2]:[e,1]),c=u[0]/s,f=u[1],p=i.svg().append("svg").attr("id","scalebar").attr("x",i.scalebarPosition_[0]).attr("y",i.scalebarPosition_[1]).attr("width",a+20).attr("height",i.scalebarHeight_);p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",1).attr("x2",c+r).attr("y2",1).style("stroke","#000").style("stroke-width","0.8px"),p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",i.scalebarSegmentHeight_).attr("x2",c+r).attr("y2",i.scalebarSegmentHeight_).style("stroke","#000").style("stroke-width","0.8px"),p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r).attr("y1",1).attr("x2",r).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px"),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",r+o).attr("y",i.scalebarTickHeight_+l).text("0").style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_).attr("text-anchor","middle");var d={1:4,2:2,5:5}[f],g=c/d;if(g>=15){for(var _=1;_<d;_++)p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_/2+_*g).attr("y1",1).attr("x2",r+i.scalebarStrokeWidth_/2+_*g).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width","0.8px").style("stroke","black").style("stroke-width",i.scalebarStrokeWidth_),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",r+o+_*g).attr("y",i.scalebarTickHeight_+l).text(h(u[0]/d*_)).style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_).attr("text-anchor","middle");for(var y=-1;y<d;y+=2)if(1==y)n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_-1).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+y*g).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px");else{var v=r+i.scalebarStrokeWidth_/2+(y-1)*g;v>0&&n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",v).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+y*g).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width","0.8px")}}else n.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",r+i.scalebarStrokeWidth_-1).attr("y1",i.scalebarSegmentHeight_/2).attr("x2",r+i.scalebarStrokeWidth_/2+g*d).attr("y2",i.scalebarSegmentHeight_/2).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px");p.append("line").attr("class","eurostat-map-scalebar-line").attr("x1",c+r).attr("y1",1).attr("x2",c+r).attr("y2",i.scalebarTickHeight_).style("stroke","#000").style("stroke-width",i.scalebarStrokeWidth_+"px"),p.append("text").attr("class","eurostat-map-scalebar-label").attr("x",c+r+o).attr("y",i.scalebarTickHeight_+l).text(h(u[0])+i.scalebarUnits_).style("text-anchor","middle").style("font-size",i.scalebarFontSize_+"px").style("font-family",i.fontFamily_)}()),i},i.updateLabels=function(){var t=i.svg_.selectAll("g.labels-container > *");if(t&&t.remove(),i.labelling_){var e=i.svg_.select("#zoomgroup"+i.svgId_);f(i,e),i.labelsToShow_.includes("values")&&i.updateValuesLabels()}};var p=function(e,r){var a=t(0,n);for(var o in(e=e||{}).proj=e.proj||Ol[e.geo],e.scale=e.scale||i.insetScale_,e.bottomText=e.bottomText||"",e.showSourceLink=e.showSourceLink||!1,e.botTxtTooltipTxt=e.botTxtTooltipTxt||"",e.zoomExtent=e.zoomExtent||i.insetZoomExtent_,e.width=e.width||i.insetBoxWidth_,e.height=e.height||i.insetBoxWidth_,e.insets=e.insets||[],e.insetTemplates=e.insetTemplates||{},e.callback=e.callback||void 0,["nutsLvl_","nutsYear_","nutsrgFillStyle_","nutsrgSelFillSty_","nutsbnStroke_","nutsbnStrokeWidth_","cntrgFillStyle_","cntbnStroke_","cntbnStrokeWidth_","seaFillStyle_","drawCoastalMargin_","coastalMarginColor_","coastalMarginWidth_","coastalMarginStdDev_","graticuleStroke_","graticuleStrokeWidth_","labelling_","labelFill_","labelValuesFontSize_","labelOpacity_","labelStroke_","labelStrokeWidth_","labelShadowWidth_","labelShadow_","labelShadowColor_","labelShadowsToShow_","labelsToShow_","fontFamily_","lg_","projectionFunction_"].forEach((function(t){a[t]=i[t]})),["stat","statData","legend","legendObj","noDataText","lg","transitionDuration","tooltip_","classToText_"].forEach((function(t){a[t]=i[t]})),e)a[o+"_"]=e[o];return a};return i},Nl={EUR_3035:{geoCenter:[497e4,335e4],pixSize:6800},IC_32628:{geoCenter:[443468,3145647],pixSize:1e3},GP_32620:{geoCenter:[669498,1784552],pixSize:130},MQ_32620:{geoCenter:[716521,1621322],pixSize:130},GF_32622:{geoCenter:[266852,444074],pixSize:500},RE_32740:{geoCenter:[348011,7661627],pixSize:130},YT_32738:{geoCenter:[516549,8583920],pixSize:70},MT_3035:{geoCenter:[4719755,1441701],pixSize:70},PT20_32626:{geoCenter:[397418,4271471],pixSize:1500},PT30_32628:{geoCenter:[333586,3622706],pixSize:150},LI_3035:{geoCenter:[4287060,2672e3],pixSize:40},IS_3035:{geoCenter:[3011804,496e4],pixSize:700},SJ_SV_3035:{geoCenter:[457e4,6160156],pixSize:800},SJ_JM_3035:{geoCenter:[3647762,5408300],pixSize:100},CARIB_32620:{geoCenter:[636345,1669439],pixSize:500},WORLD_54030:{geoCenter:[14,17],pixSize:9e3}},Dl=function(t,e){for(var n=[{geo:"IC",x:0,y:0,width:t,height:.3*t},{geo:"CARIB",x:0,y:.3*t+e,width:.5*t,height:t},{geo:"GF",x:.5*t,y:.3*t+e,width:.5*t,height:.75*t},{geo:"YT",x:.5*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"RE",x:.75*t,y:1.05*t+e,width:.25*t,height:.25*t},{geo:"PT20",x:0,y:1.3*t+2*e,width:.75*t,height:.25*t},{geo:"PT30",x:.75*t,y:1.3*t+2*e,width:.25*t,height:.25*t},{geo:"MT",x:0,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"LI",x:.25*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_SV",x:.5*t,y:1.55*t+3*e,width:.25*t,height:.25*t},{geo:"SJ_JM",x:.75*t,y:1.55*t+3*e,width:.25*t,height:.25*t}],r=0;r<n.length;r++)n[r].drawGraticule=!1;return n},Ol={EUR:"3035",IC:"32628",GP:"32620",MQ:"32620",GF:"32622",RE:"32740",YT:"32738",MT:"3035",PT20:"32626",PT30:"32628",LI:"3035",IS:"3035",SJ_SV:"3035",SJ_JM:"3035",CARIB:"32620",WORLD:"54030"},Pl={},Rl={};function Il(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function Wl(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function jl(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Hl(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,l=0,s=a<=0,u=!1;function c(){if(s)return Rl;if(u)return u=!1,Pl;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?s=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return s=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=c())!==Rl;){for(var f=[];r!==Pl&&r!==Rl;)f.push(r),r=c();e&&null==(f=e(f,l++))||i.push(f)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?function(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+jl(-e,6):e>9999?"+"+jl(e,6):jl(e,4))+"-"+jl(t.getUTCMonth()+1,2)+"-"+jl(t.getUTCDate(),2)+(a?"T"+jl(n,2)+":"+jl(r,2)+":"+jl(i,2)+"."+jl(a,3)+"Z":i?"T"+jl(n,2)+":"+jl(r,2)+":"+jl(i,2)+"Z":r||n?"T"+jl(n,2)+":"+jl(r,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=Il(t);return function(r,i){return e(n(r),i,t)}}(t,e):Il(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=Wl(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=Wl(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}}var Ul=Hl(","),Bl=Ul.parse,Gl=(Ul.parseRows,Ul.format,Ul.formatBody,Ul.formatRows,Ul.formatRow,Ul.formatValue,Hl("\t")),ql=Gl.parse;function Vl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function Yl(t,e){return fetch(t,e).then(Vl)}function Xl(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Yl(e,n).then((function(e){return t(e,r)}))}}Gl.parseRows,Gl.format,Gl.formatBody,Gl.formatRows,Gl.formatRow,Gl.formatValue;var Kl=Xl(Bl);function Jl(t){var e,n,r,i,a=function(t,e){var n,r=[];if("string"==typeof t&&(t=[t]),Array.isArray(t)){if(t.length===e)return t;if(1===t.length){for(n=0;n<e;n++)r.push(t[0]);return r}}for(n=0;n<e;n++){var i=void 0===t[n]?null:t[n];r.push(i)}return r};if(this.length=0,this.id=[],null!=t)switch(this.class=t.class||"bundle",this.class){case"bundle":var o=[],l=0;if(this.error=null,this.length=0,null===t||"object"!=typeof t)return void(this.class=null);if(t.hasOwnProperty("error"))return void(this.error=t.error);if("dataset"===t.class||"collection"===t.class||"dimension"===t.class)return new Jl(t);for(n in t)l++,o.push(n);this.__tree__=t,this.length=l,this.id=o;break;case"dataset":t.hasOwnProperty("__tree__")?this.__tree__=e=t.__tree__:this.__tree__=e=t,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.updated=e.updated||null,this.source=e.source||null,this.extension=e.extension||null;var s,u=0,c=e.size||e.dimension&&e.dimension.size;if(this.size=c,this.value=e.hasOwnProperty("value")&&null!==e.value&&0!==e.value.length?e.value:{},Array.isArray(this.value))u=this.value.length;else{var f=1;for(s=c.length;s--;)f*=c[s];u=f}if(this.value=a(this.value,u),this.status=e.hasOwnProperty("status")?a(e.status,u):null,e.hasOwnProperty("dimension")){var h=e.dimension,p=e.role||!e.version&&h.role||null,d=e.id||h.id,g=c.length,_=function(t){p.hasOwnProperty(t)||(p[t]=null)};if(!Array.isArray(d)||!Array.isArray(c)||d.length!=g)return;if(this.length=g,this.id=d,p&&(_("time"),_("geo"),_("metric"),_("classification")),p&&null===p.classification){var y=[],v=["time","geo","metric"],m=function(t,e){for(var n=e.length;n--;)if(t===e[n])return!0;return!1};for(s=0;s<3;s++){var x=p[v[s]];null!==x&&(y=y.concat(x))}for(p.classification=[],s=0;s<g;s++)m(d[s],y)||p.classification.push(d[s]);0===p.classification.length&&(p.classification=null)}this.role=p,this.n=u;for(var b=0,S=this.length;b<S;b++)if(h[d[b]].category.hasOwnProperty("index")){if(Array.isArray(h[d[b]].category.index)){var w={},T=h[d[b]].category.index;for(r=T.length,i=0;i<r;i++)w[T[i]]=i;h[d[b]].category.index=w}}else{var k=0;for(n in h[d[b]].category.index={},h[d[b]].category.label)h[d[b]].category.index[n]=k++}}else this.length=0;break;case"dimension":if(!t.hasOwnProperty("__tree__"))return new Jl({version:"2.0",class:"dataset",dimension:{d:t},id:["d"],size:[function(t){var e=void 0===t.index?t.label:t.index;return Array.isArray(e)?e.length:Object.keys(e).length}(t.category)],value:[null]}).Dimension(0);var z=[],F=(e=t.__tree__).category;if(!e.hasOwnProperty("category"))return;if(!F.hasOwnProperty("label"))for(n in F.label={},F.index)F.label[n]=n;for(n in F.index)z[F.index[n]]=n;this.__tree__=e,this.label=e.label||null,this.note=e.note||null,this.link=e.link||null,this.href=e.href||null,this.id=z,this.length=z.length,this.role=t.role,this.hierarchy=F.hasOwnProperty("child"),this.extension=e.extension||null;break;case"category":var A=t.child;this.id=A,this.length=null===A?0:A.length,this.index=t.index,this.label=t.label,this.note=t.note||null,this.unit=t.unit,this.coordinates=t.coord;break;case"collection":if(this.length=0,this.label=t.label||null,this.note=t.note||null,this.link=t.link||null,this.href=t.href||null,this.updated=t.updated||null,this.source=t.source||null,this.extension=t.extension||null,null!==this.link&&t.link.item){var M=t.link.item;if(this.length=Array.isArray(M)?M.length:0,this.length)for(i=0;i<this.length;i++)this.id[i]=M[i].href}}}function Zl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}Xl(ql),Jl.prototype.Item=function(t){if(null===this||"collection"!==this.class||!this.length)return null;if("number"==typeof t)return t>this.length||t<0?null:this.link.item[t];var e,n=[];if("object"==typeof t){if(!t.class&&!t.follow)return null;t.class&&(e="dataset"===t.class&&"boolean"==typeof t.embedded?!0===t.embedded?function(t,e,r){var i=t.link.item[e];r.class===i.class&&i.id&&i.size&&i.dimension&&n.push(i)}:function(t,e,r){var i=t.link.item[e];r.class!==i.class||i.id&&i.size&&i.dimension||n.push(i)}:function(t,e,r){r.class===t.link.item[e].class&&n.push(t.link.item[e])})}else e=function(t,e){n.push(t.link.item[e])};for(var r=0;r<this.length;r++)e(this,r,t);return n},Jl.prototype.Dataset=function(t){if(null===this)return null;if("dataset"===this.class)return void 0!==t?this:[this];var e,n=[],r=0;if("collection"===this.class){var i=this.Item({class:"dataset",embedded:!0});if(void 0===t){for(e=i.length;r<e;r++)n.push(new Jl(i[r]));return n}if("number"==typeof t&&t>=0&&t<i.length)return new Jl(i[t]);if("string"==typeof t)for(e=i.length;r<e;r++)if(i[r].href===t)return new Jl(i[r]);return null}if("bundle"!==this.class)return null;if(void 0===t){for(e=this.id.length;r<e;r++)n.push(this.Dataset(this.id[r]));return n}if("number"==typeof t){var a=this.id[t];return void 0!==a?this.Dataset(a):null}var o=this.__tree__[t];return void 0===o?null:new Jl({class:"dataset",__tree__:o})},Jl.prototype.Dimension=function(t,e){e="boolean"!=typeof e||e;var n,r=[],i=this.id.length,a=function(t,e){if(null!==t)for(var n in t)for(var r=null!==t[n]?t[n].length:0;r--;)if(t[n][r]===e)return n;return null};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(n=0;n<i;n++)r.push(this.Dimension(this.id[n]));return r}if("number"==typeof t){var o=this.id[t];return void 0!==o?this.Dimension(o,e):null}var l=this.role;if("object"==typeof t){if(t.hasOwnProperty("role")){for(n=0;n<i;n++){var s=this.id[n];a(l,s)===t.role&&r.push(this.Dimension(s,e))}return void 0===r[0]?null:r}return null}var u=this.__tree__.dimension;if(void 0===u)return null;var c=u[t];return void 0===c?null:e?new Jl({class:"dimension",__tree__:c,role:a(l,t)}):function(t,e){var n=[];for(var r in t)n[t[r]]=e[r];return n}(c.category.index,c.category.label)},Jl.prototype.Category=function(t){if(null===this||"dimension"!==this.class)return null;if(void 0===t){for(var e=[],n=0,r=this.id.length;n<r;n++)e.push(this.Category(this.id[n]));return e}if("number"==typeof t){var i=this.id[t];return void 0!==i?this.Category(i):null}var a=this.__tree__.category;if(void 0===a)return null;var o=a.index[t];if(void 0===o)return null;var l=a.unit&&a.unit[t]||null,s=a.coordinates&&a.coordinates[t]||null,u=a.child&&a.child[t]||null,c=a.note&&a.note[t]||null;return new Jl({class:"category",index:o,label:a.label[t],note:c,child:u,unit:l,coord:s})},Jl.prototype.Dice=function(t,e,n){var r,i,a,o,l=function(t,e){return t.hasOwnProperty(e)&&!!t[e]};if(null===this||"dataset"!==this.class)return null;if("object"!=typeof t)return this;"object"!=typeof e?("boolean"==typeof e&&!0===e&&(r=!0),"boolean"==typeof n&&!0===n||(n=!1)):(r=l(e,"clone"),n=l(e,"drop"),i=l(e,"stringify"),a=l(e,"ovalue"),o=l(e,"ostatus"));var s,u=r?new Jl(JSON.parse(JSON.stringify(this))):this,c=u.status,f=[],h=[],p=function(t,e){var n,r,i,a=(n=t,r=e,i={},"[object Array]"===Object.prototype.toString.call(n[r])?(n[r].forEach((function(t,e){null!==t&&(i[String(e)]=t)})),i):n[r]);delete t[e],t[e]=a};Array.isArray(t)&&(t=function(t){var e={};return t.forEach((function(t){e[t[0]]=t[1]})),e}(t)),null===t&&(t={});var d=Object.keys(t);return d.length>0&&(d.forEach((function(e){var n=t[e];Array.isArray(n)||(t[e]=[n]),0===t[e].length&&delete t[e]})),n&&(t=function(t){var e={};return Object.keys(t).forEach((n=>e[n]=u.Dimension(n).id.filter((e=>-1===t[n].indexOf(e))))),e}(t)),u.toTable({type:"arrobj",content:"id",status:!0}).forEach((function(e,n){var r=[];d.forEach((function(n){var i=t[n],a=[];i.forEach((function(t){a.push(e[n]===t)})),r.push(-1!==a.indexOf(!0))})),-1===r.indexOf(!1)&&(f.push(e.value),h.push(e.status))})),d.forEach((function(e){var n=u.Dimension(e).id,r=0,i={};u.size[u.id.indexOf(e)]=t[e].length,n.forEach((function(n){-1!==t[e].indexOf(n)&&(i[n]=r,r++)})),u.__tree__.dimension[e].category.index=i})),u.n=f.length,u.value=u.__tree__.value=f,u.status=u.__tree__.status=null!==c?h:null),i?((s=u.__tree__).hasOwnProperty("id")||(s.version="2.0",s.hasOwnProperty("class")||(s.class="dataset"),s.id=s.dimension.id,s.size=s.dimension.size,delete s.dimension.id,delete s.dimension.size,s.dimension.hasOwnProperty("role")&&(s.role=s.dimension.role,delete s.dimension.role)),s.hasOwnProperty("status")&&-1!==["null","{}","[]"].indexOf(JSON.stringify(s.status))&&delete s.status,s.hasOwnProperty("role")&&(delete s.role.classification,["geo","time","metric"].forEach((function(t){null===s.role[t]&&delete s.role[t]}))),a&&p(s,"value"),o&&s.hasOwnProperty("status")&&p(s,"status"),JSON.stringify(s)):u},Jl.prototype.Slice=function(t){if(null===this||"dataset"!==this.class)return null;if(void 0===t)return this;if(!Array.isArray(t)){var e,n=[];for(e in t)n.push([e,t[e]]);t=n}return this.Dice(t.map((function(t){return[t[0],[t[1]]]})))},Jl.prototype.Data=function(t,e){var n,r,i=[],a=function(t){for(var e in t)if(t.hasOwnProperty(e))return e};if(null===this||"dataset"!==this.class)return null;if(void 0===t){for(r=this.value.length,n=0;n<r;n++)i.push(this.Data(n));return i}if("boolean"!=typeof e&&(e=!0),"number"==typeof t){var o=this.value[t];return void 0===o?null:e?{value:o,status:this.status?this.status[t]:null}:o}var l="object",s=this.__tree__,u=s.size||s.dimension&&s.dimension.size,c=u.length;if(Array.isArray(t)){if(!Array.isArray(t[0])){if(this.length!==t.length)return null;var f=1,h=0,p=[],d=[];for(n=0;n<c;n++)if(void 0!==t[n]){if("number"!=typeof t[n]||t[n]>=u[n])return null;h+=(f*=n>0?u[c-n]:1)*t[c-n-1]}else p.push(n),d.push(u[n]);if(p.length>1)return null;if(1===p.length){for(var g=0,_=d[0];g<_;g++){var y=[];for(n=0;n<c;n++)n!==p[0]?y.push(t[n]):y.push(g);i.push(this.Data(y,e))}return i}return e?{value:this.value[h],status:this.status?this.status[h]:null}:this.value[h]}l="array"}var v=function(t,e,n){var r,i=[],o={},l=t.dimension,s=t.id||l.id,u=t.size||l&&l.size;if("array"===n){for(r=e.length;r--;)o[e[r][0]]=e[r][1];e=o}for(var c=0,f=s.length;c<f;c++){var h=s[c],p=e[h];i.push("string"==typeof p?p:1===u[c]?a(l[h].category.index):null)}return i}(s,t,l),m=[],x=s.dimension,b=s.id||x.id;for(n=0,r=v.length;n<r;n++)m.push(x[b[n]].category.index[v[n]]);return this.Data(m,e)},Jl.prototype.toTable=function(t,e){if(null===this||"dataset"!==this.class)return null;1==arguments.length&&"function"==typeof t&&(e=t,t=null),"arrobj"===(t=t||{field:"label",content:"label",vlabel:"Value",slabel:"Status",type:"array",status:!1,unit:!1,by:null,prefix:"",drop:[],meta:!1,comma:!1,bylabel:!1}).type&&void 0===t.field&&(t.field="id");var n,r,i,a,o,l=this.__tree__,s=!0===t.status;if("function"==typeof e){n=this.toTable(t);var u=[],c="array"!==t.type?0:1;for(o=(L="object"!==t.type?n.slice(c):n.rows.slice(0)).length,r=0;r<o;r++){var f=e.call(this,L[r],r);void 0!==f&&u.push(f)}return"object"===t.type?{cols:n.cols,rows:u}:("array"===t.type&&u.unshift(n[0]),u)}if("arrobj"===t.type){var h=[],p=l.role&&l.role.metric,d=function(){},g={},_=this,y=_.id,v=t.by&&-1!==y.indexOf(t.by)?t.by:null,m=!0===t.meta,x=void 0!==t.drop&&Array.isArray(t.drop)?t.drop:[],b=!0===t.comma,S=!0===t.bylabel,w=function(e){if(m){var n={};return y.forEach((function(t){var e=_.Dimension(t);n[t]={label:e.label,role:e.role,categories:{id:e.id,label:_.Dimension(t,!1)}}})),{meta:{label:_.label,source:_.source,updated:_.updated,id:y,status:s,unit:t.unit,by:v,bylabel:S,drop:null!==v&&x.length>0?x:null,prefix:null!==v?N||"":null,comma:b,dimensions:n},data:e}}return e};v&&(t.field="id");var T=(n=this.toTable({field:t.field,vlabel:t.vlabel,slabel:t.slabel,content:t.content,status:s})).shift();if(null===v&&t.unit&&p){if("id"!==t.content)for(var k=p.length;k--;){var z=this.Dimension(p[k]);g[p[k]]={};for(var F=z.length;F--;)g[p[k]][z.Category(F).label]=z.id[F]}d=function(e,n){if(-1!==p.indexOf(e)){var r=l.dimension[e].category;r.unit?A.unit=r.unit["id"!==t.content?g[e][n]:n]:A.unit=null}},t.unit=!0}else t.unit=!1;for(o=n.length,r=0;r<o;r++){var A={};for(i=n[r].length;i--;)A[T[i]]=n[r][i],d(T[i],n[r][i]);h.push(A)}if(b&&h.forEach((function(t){null!==t.value&&(t.value=(""+t.value).replace(".",","))})),null!==v){var M,C={},L=[],E={},N=void 0!==t.prefix?t.prefix:"";x.forEach((function(t,e){(!_.Dimension(t)||_.Dimension(t).length>1)&&(x[e]="")}));var D=y.filter((function(t){return t!==v&&-1===x.indexOf(t)})),O=_.Dimension(v),P=function(t,e){var n=[];return e.forEach((function(e){n.push(t[e])})),n.join("\t")},R=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e]})),n};for(var I in"id"!==t.content?S?M=function(t,e,n){t[e][N+n[v]]=n.value}:(O.Category().forEach((function(t,e){E[t.label]=O.id[e]})),M=function(t,e,n){t[e][N+E[n[v]]]=n.value}):M=function(t,e,n){t[e][N+n[v]]=n.value},h.forEach((function(t){var e=P(t,D);void 0===C[e]&&(C[e]=R(t,D)),M(C,e,t,v)})),C)L.push(C[I]);return s=!1,w(L)}return w(h)}var W,j,H,U,B="id"===t.field;if("object"===t.type){var G="number"==typeof this.value[0]||null===this.value[0]?"number":"string";W=function(t,e){var n=B&&t||e||t;et.push({id:t,label:n,type:"string"})},j=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push({id:"status",label:i,type:"string"}),et.push({id:"value",label:r,type:G})},H=function(t){dt.push({v:t})},U=function(t){dt.push({v:t}),nt.push({c:dt})}}else W=function(t,e){var n=B&&t||e||t;et.push(n)},j=function(t,e,n){var r=(B?"value":t)||"Value",i=(B?"status":e)||"Status";n&&et.push(i),et.push(r),tt.push(et)},H=function(t){dt.push(t)},U=function(t){dt.push(t),tt.push(dt)};var q=l.dimension,V=l.id||q.id,Y=l.size||q.size,X=V.length;if(X!=Y.length)return!1;var K=[],J=1,Z=(k=1,[]),$=[],Q=[],tt=[],et=[],nt=[];for(r=0;r<X;r++){var rt=V[r],it=q[rt].label;W(rt,it),J*=Y[r],k*=Y[r];var at=[];for(i=0;i<Y[r];i++)for(var ot in q[V[r]].category.index)if(q[V[r]].category.index[ot]===i){var lt="id"!==t.content&&q[V[r]].category.label?q[V[r]].category.label[ot]:ot;at.push(lt)}K.push(at),Z.push(k)}for(j(t.vlabel,t.slabel,s),o=K.length,r=0;r<o;r++){for(var st=[],ut=0,ct=K[r].length;ut<ct;ut++)for(var ft=0;ft<J/Z[r];ft++)st.push(K[r][ut]);$.push(st)}for(o=$.length,r=0;r<o;r++){var ht=[],pt=0;for(a=0;a<J;a++)ht.push($[r][pt]),++pt===$[r].length&&(pt=0);Q.push(ht)}for(a=0;a<J;a++){var dt=[];o=$.length;for(var gt=0;gt<o;gt++)H(Q[gt][a]);s&&H(this.status?this.status[a]:null),U(this.value[a])}return"object"===t.type?{cols:et,rows:nt}:tt},Jl.prototype.node=function(){return this.__tree__},Jl.prototype.toString=function(){return this.class};var $l=function(t){var e={__data:void 0},n=void 0;e.get=function(t){return t?n?n[t]:void 0:n},e.getValue=function(t){var n=e.get(t);return n?n.value:void 0},e.set=function(t,r){var i=(n=n||{})[t];return i?r.value?(i.value=r.value,i.status=r.status):i.value=isNaN(+r)?r:+r:n[t]=r.value?r:{value:isNaN(+r)?r:+r},e},e.setData=function(t){return e.__data=t,n={},Object.keys(t).forEach((function(n){return e.set(n,t[n])})),e},e.getArray=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t}))},e.getUniqueValues=function(){return Object.values(n).map((function(t){return t.value})).filter((function(t,e,n){return n.indexOf(t)===e}))},e.getMin=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.min(t,e)}),0)},e.getMax=function(){if(n)return Object.values(n).map((function(t){return t.value})).filter((function(t){return 0==t||t&&":"!==t})).reduce((function(t,e){return Math.max(t,e)}),0)},e.isReady=function(){return null!=n},e.metadata=void 0,e.unitText_=void 0,e.retrieveFromRemote=function(t,n,a){return e.eurostatDatasetCode_?r(t,n,a):e.csvURL_&&i(a),e},e.eurostatDatasetCode_=void 0,e.filters_={lastTimePeriod:1},e.precision_=2;var r=function(t,r,i){n=null,function(t,n){return e.filters_.geo||(e.filters_.geoLevel=t+""=="0"?"country":"nuts"+t),Fn(function(t,e,n,r){n=n||"en",r=r||"json";var i=[];if(i.push("https://ec.europa.eu/eurostat/api/dissemination/statistics/1.0/data/",t,"?","format=",r,"&lang=",n),e)for(var a in e){var o=e[a];if(Array.isArray(o))for(var l=0;l<o.length;l++)i.push("&",a,"=",o[l]);else i.push("&",a,"=",o)}return i.join("")}(e.eurostatDatasetCode_,e.filters_,n))}(t,r).then((function(t){var r,a="object"==typeof(r=t)?new Jl(r):"version"===r?"1.3.1":fetch?fetch(r,undefined).then(Zl).then((function(t){return new Jl(t)})):void 0;e.metadata={label:a.label,href:a.href,source:a.source,updated:a.updated,extension:a.extension},e.metadata.time=a.Dimension("time").id[0],n=function(t){for(var e={},n=t.Dimension("geo").id,r=0;r<n.length;r++)e[n[r]]=t.Data(r);return e}(a),i&&i()}))};e.getTime=function(){return e.filters_.time||(n?e.metadata.time:void 0)},e.csvURL_=void 0,e.geoCol_="geo",e.valueCol_="value";var i=function(t){n=null,Kl(e.csvURL_).then((function(r){n=function(t,e,n){for(var r={},i=0;i<t.length;i++){var a=t[i],o=a[n];r[a[e]]=o?{value:isNaN(+o)?o:+o,status:""}:{value:":",status:""}}return r}(r,e.geoCol_,e.valueCol_),e.metadata={href:e.csvURL_},t&&t()}))};if(["unitText_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t)for(var a in t)e[a+"_"]=t[a];return e},Ql=function(t){var e={};return e.map=t,e.svgId="legend_"+Math.round(1e16*Math.random()),e.svg=void 0,e.lgg=void 0,e.x=void 0,e.y=void 0,e.boxMargin=10,e.boxPadding=7,e.boxCornerRad=7,e.boxFill="white",e.boxOpacity=.7,e.fontFill="black",e.title="",e.titleFontSize=15,e.titleFontWeight="normal",e.build=function(){e.svg=dt("#"+e.svgId),e.svg.selectAll("#g_"+e.svgId).remove(),e.lgg=e.svg.append("g").attr("id","g_"+e.svgId)},e.update=function(){return console.log("Legend update function not implemented"),e},e.makeBackgroundBox=function(){e.lgg.append("rect").attr("id","legendBR").attr("rx",e.boxCornerRad).attr("ry",e.boxCornerRad).style("fill",e.boxFill).style("opacity",e.boxOpacity)},e.setBoxDimension=function(){var t=e.lgg.node().getBBox({stroke:!0}),n=e.boxPadding;e.svg.select("#legendBR").attr("x",t.x-n).attr("y",t.y-n).attr("width",t.width+2*n).attr("height",t.height+2*n)},e},ts=Array.prototype.slice;function es(t){return t}var ns=1e-6;function rs(t){return"translate("+(t+.5)+",0)"}function is(t){return"translate(0,"+(t+.5)+")"}function as(t){return function(e){return+t(e)}}function os(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ls(){return!this.__axis}function ss(t,e){var n=[],r=null,i=null,a=6,o=6,l=3,s=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",c=1===t||3===t?rs:is;function f(f){var h=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):es:i,d=Math.max(a,0)+l,g=e.range(),_=+g[0]+.5,y=+g[g.length-1]+.5,v=(e.bandwidth?os:as)(e.copy()),m=f.selection?f.selection():f,x=m.selectAll(".domain").data([null]),b=m.selectAll(".tick").data(h,e).order(),S=b.exit(),w=b.enter().append("g").attr("class","tick"),T=b.select("line"),k=b.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),b=b.merge(w),T=T.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",s*a)),k=k.merge(w.append("text").attr("fill","currentColor").attr(u,s*d).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==m&&(x=x.transition(f),b=b.transition(f),T=T.transition(f),k=k.transition(f),S=S.transition(f).attr("opacity",ns).attr("transform",(function(t){return isFinite(t=v(t))?c(t):this.getAttribute("transform")})),w.attr("opacity",ns).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:v(t))}))),S.remove(),x.attr("d",4===t||2==t?o?"M"+s*o+","+_+"H0.5V"+y+"H"+s*o:"M0.5,"+_+"V"+y:o?"M"+_+","+s*o+"V0.5H"+y+"V"+s*o:"M"+_+",0.5H"+y),b.attr("opacity",1).attr("transform",(function(t){return c(v(t))})),T.attr(u+"2",s*a),k.attr(u,s*d).text(p),m.filter(ls).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),m.each((function(){this.__axis=v}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=ts.call(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:ts.call(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:ts.call(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(a=o=+t,f):a},f.tickSizeInner=function(t){return arguments.length?(a=+t,f):a},f.tickSizeOuter=function(t){return arguments.length?(o=+t,f):o},f.tickPadding=function(t){return arguments.length?(l=+t,f):l},f}function us(t){return{type:t}}function cs(){return Math.random()}["w","e"].map(us),["n","s"].map(us),["n","w","e","s","nw","ne","sw","se"].map(us),Math.cos,Math.sin,Math.PI,Math.max,Array.prototype.slice,Array.prototype.slice,Math.PI,Math.sqrt(5),function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(cs);var fs=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(cs),hs=(function t(e){function n(){var t=fs.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(cs),function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(cs)),ps=(function t(e){function n(t){var n=hs.source(e)(t);return function(){return n()/t}}return n.source=t,n}(cs),function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(cs),Math.PI),ds=2*ps,gs=1e-6,_s=ds-gs;function ys(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function vs(){return new ys}ys.prototype=vs.prototype={constructor:ys,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,l=n-t,s=r-e,u=a-t,c=o-e,f=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(f>gs)if(Math.abs(c*l-s*u)>gs&&i){var h=n-a,p=r-o,d=l*l+s*s,g=h*h+p*p,_=Math.sqrt(d),y=Math.sqrt(f),v=i*Math.tan((ps-Math.acos((d+f-g)/(2*_*y)))/2),m=v/y,x=v/_;Math.abs(m-1)>gs&&(this._+="L"+(t+m*u)+","+(e+m*c)),this._+="A"+i+","+i+",0,0,"+ +(c*h>u*p)+","+(this._x1=t+x*l)+","+(this._y1=e+x*s)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),l=n*Math.sin(r),s=t+o,u=e+l,c=1^a,f=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+s+","+u:(Math.abs(this._x1-s)>gs||Math.abs(this._y1-u)>gs)&&(this._+="L"+s+","+u),n&&(f<0&&(f=f%ds+ds),f>_s?this._+="A"+n+","+n+",0,1,"+c+","+(t-o)+","+(e-l)+"A"+n+","+n+",0,1,"+c+","+(this._x1=s)+","+(this._y1=u):f>gs&&(this._+="A"+n+","+n+",0,"+ +(f>=ps)+","+c+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var ms=vs;function xs(t){return function(){return t}}var bs=Math.abs,Ss=Math.atan2,ws=Math.cos,Ts=Math.max,ks=Math.min,zs=Math.sin,Fs=Math.sqrt,As=1e-12,Ms=Math.PI,Cs=Ms/2,Ls=2*Ms;function Es(t){return t>1?0:t<-1?Ms:Math.acos(t)}function Ns(t){return t>=1?Cs:t<=-1?-Cs:Math.asin(t)}function Ds(t){return t.innerRadius}function Os(t){return t.outerRadius}function Ps(t){return t.startAngle}function Rs(t){return t.endAngle}function Is(t){return t&&t.padAngle}function Ws(t,e,n,r,i,a,o,l){var s=n-t,u=r-e,c=o-i,f=l-a,h=f*s-c*u;if(!(h*h<As))return[t+(h=(c*(e-a)-f*(t-i))/h)*s,e+h*u]}function js(t,e,n,r,i,a,o){var l=t-n,s=e-r,u=(o?a:-a)/Fs(l*l+s*s),c=u*s,f=-u*l,h=t+c,p=e+f,d=n+c,g=r+f,_=(h+d)/2,y=(p+g)/2,v=d-h,m=g-p,x=v*v+m*m,b=i-a,S=h*g-d*p,w=(m<0?-1:1)*Fs(Ts(0,b*b*x-S*S)),T=(S*m-v*w)/x,k=(-S*v-m*w)/x,z=(S*m+v*w)/x,F=(-S*v+m*w)/x,A=T-_,M=k-y,C=z-_,L=F-y;return A*A+M*M>C*C+L*L&&(T=z,k=F),{cx:T,cy:k,x01:-c,y01:-f,x11:T*(i/b-1),y11:k*(i/b-1)}}function Hs(){var t=Ds,e=Os,n=xs(0),r=null,i=Ps,a=Rs,o=Is,l=null;function s(){var s,u,c=+t.apply(this,arguments),f=+e.apply(this,arguments),h=i.apply(this,arguments)-Cs,p=a.apply(this,arguments)-Cs,d=bs(p-h),g=p>h;if(l||(l=s=ms()),f<c&&(u=f,f=c,c=u),f>As)if(d>Ls-As)l.moveTo(f*ws(h),f*zs(h)),l.arc(0,0,f,h,p,!g),c>As&&(l.moveTo(c*ws(p),c*zs(p)),l.arc(0,0,c,p,h,g));else{var _,y,v=h,m=p,x=h,b=p,S=d,w=d,T=o.apply(this,arguments)/2,k=T>As&&(r?+r.apply(this,arguments):Fs(c*c+f*f)),z=ks(bs(f-c)/2,+n.apply(this,arguments)),F=z,A=z;if(k>As){var M=Ns(k/c*zs(T)),C=Ns(k/f*zs(T));(S-=2*M)>As?(x+=M*=g?1:-1,b-=M):(S=0,x=b=(h+p)/2),(w-=2*C)>As?(v+=C*=g?1:-1,m-=C):(w=0,v=m=(h+p)/2)}var L=f*ws(v),E=f*zs(v),N=c*ws(b),D=c*zs(b);if(z>As){var O,P=f*ws(m),R=f*zs(m),I=c*ws(x),W=c*zs(x);if(d<Ms&&(O=Ws(L,E,I,W,P,R,N,D))){var j=L-O[0],H=E-O[1],U=P-O[0],B=R-O[1],G=1/zs(Es((j*U+H*B)/(Fs(j*j+H*H)*Fs(U*U+B*B)))/2),q=Fs(O[0]*O[0]+O[1]*O[1]);F=ks(z,(c-q)/(G-1)),A=ks(z,(f-q)/(G+1))}}w>As?A>As?(_=js(I,W,L,E,f,A,g),y=js(P,R,N,D,f,A,g),l.moveTo(_.cx+_.x01,_.cy+_.y01),A<z?l.arc(_.cx,_.cy,A,Ss(_.y01,_.x01),Ss(y.y01,y.x01),!g):(l.arc(_.cx,_.cy,A,Ss(_.y01,_.x01),Ss(_.y11,_.x11),!g),l.arc(0,0,f,Ss(_.cy+_.y11,_.cx+_.x11),Ss(y.cy+y.y11,y.cx+y.x11),!g),l.arc(y.cx,y.cy,A,Ss(y.y11,y.x11),Ss(y.y01,y.x01),!g))):(l.moveTo(L,E),l.arc(0,0,f,v,m,!g)):l.moveTo(L,E),c>As&&S>As?F>As?(_=js(N,D,P,R,c,-F,g),y=js(L,E,I,W,c,-F,g),l.lineTo(_.cx+_.x01,_.cy+_.y01),F<z?l.arc(_.cx,_.cy,F,Ss(_.y01,_.x01),Ss(y.y01,y.x01),!g):(l.arc(_.cx,_.cy,F,Ss(_.y01,_.x01),Ss(_.y11,_.x11),!g),l.arc(0,0,c,Ss(_.cy+_.y11,_.cx+_.x11),Ss(y.cy+y.y11,y.cx+y.x11),g),l.arc(y.cx,y.cy,F,Ss(y.y11,y.x11),Ss(y.y01,y.x01),!g))):l.arc(0,0,c,b,x,g):l.lineTo(N,D)}else l.moveTo(0,0);if(l.closePath(),s)return l=null,s+""||null}return s.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-Ms/2;return[ws(r)*n,zs(r)*n]},s.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),s):t},s.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),s):e},s.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),s):n},s.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xs(+t),s):r},s.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:xs(+t),s):i},s.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:xs(+t),s):a},s.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:xs(+t),s):o},s.context=function(t){return arguments.length?(l=null==t?null:t,s):l},s}function Us(t){this._context=t}function Bs(t){return new Us(t)}function Gs(t){return t[0]}function qs(t){return t[1]}function Vs(){var t=Gs,e=qs,n=xs(!0),r=null,i=Bs,a=null;function o(o){var l,s,u,c=o.length,f=!1;for(null==r&&(a=i(u=ms())),l=0;l<=c;++l)!(l<c&&n(s=o[l],l,o))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+t(s,l,o),+e(s,l,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:xs(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function Ys(){var t=Gs,e=null,n=xs(0),r=qs,i=xs(!0),a=null,o=Bs,l=null;function s(s){var u,c,f,h,p,d=s.length,g=!1,_=new Array(d),y=new Array(d);for(null==a&&(l=o(p=ms())),u=0;u<=d;++u){if(!(u<d&&i(h=s[u],u,s))===g)if(g=!g)c=u,l.areaStart(),l.lineStart();else{for(l.lineEnd(),l.lineStart(),f=u-1;f>=c;--f)l.point(_[f],y[f]);l.lineEnd(),l.areaEnd()}g&&(_[u]=+t(h,u,s),y[u]=+n(h,u,s),l.point(e?+e(h,u,s):_[u],r?+r(h,u,s):y[u]))}if(p)return l=null,p+""||null}function u(){return Vs().defined(i).curve(o).context(a)}return s.x=function(n){return arguments.length?(t="function"==typeof n?n:xs(+n),e=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),s):t},s.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:xs(+t),s):e},s.y=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),r=null,s):n},s.y0=function(t){return arguments.length?(n="function"==typeof t?t:xs(+t),s):n},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xs(+t),s):r},s.lineX0=s.lineY0=function(){return u().x(t).y(n)},s.lineY1=function(){return u().x(t).y(r)},s.lineX1=function(){return u().x(e).y(n)},s.defined=function(t){return arguments.length?(i="function"==typeof t?t:xs(!!t),s):i},s.curve=function(t){return arguments.length?(o=t,null!=a&&(l=o(a)),s):o},s.context=function(t){return arguments.length?(null==t?a=l=null:l=o(a=t),s):a},s}function Xs(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ks(t){return t}function Js(){var t=Ks,e=Xs,n=null,r=xs(0),i=xs(Ls),a=xs(0);function o(o){var l,s,u,c,f,h=o.length,p=0,d=new Array(h),g=new Array(h),_=+r.apply(this,arguments),y=Math.min(Ls,Math.max(-Ls,i.apply(this,arguments)-_)),v=Math.min(Math.abs(y)/h,a.apply(this,arguments)),m=v*(y<0?-1:1);for(l=0;l<h;++l)(f=g[d[l]=l]=+t(o[l],l,o))>0&&(p+=f);for(null!=e?d.sort((function(t,n){return e(g[t],g[n])})):null!=n&&d.sort((function(t,e){return n(o[t],o[e])})),l=0,u=p?(y-h*m)/p:0;l<h;++l,_=c)s=d[l],c=_+((f=g[s])>0?f*u:0)+m,g[s]={data:o[s],index:l,value:f,startAngle:_,endAngle:c,padAngle:v};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:xs(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:xs(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:xs(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:xs(+t),o):a},o}function Zs(){this._=null}function $s(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Qs(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function tu(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function eu(t){for(;t.L;)t=t.L;return t}Us.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},Zs.prototype={constructor:Zs,insert:function(t,e){var n,r,i;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=eu(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;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Qs(this,n),n=(t=n).U),n.C=!1,r.C=!0,tu(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(tu(this,n),n=(t=n).U),n.C=!1,r.C=!0,Qs(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,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?eu(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Qs(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,tu(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Qs(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,tu(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Qs(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,tu(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var nu=Zs;function ru(t,e,n,r){var i=[null,null],a=Fu.push(i)-1;return i.left=t,i.right=e,n&&au(i,t,e,n),r&&au(i,e,t,r),ku[t.index].halfedges.push(a),ku[e.index].halfedges.push(a),i}function iu(t,e,n){var r=[e,n];return r.left=t,r}function au(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function ou(t,e,n,r,i){var a,o=t[0],l=t[1],s=o[0],u=o[1],c=0,f=1,h=l[0]-s,p=l[1]-u;if(a=e-s,h||!(a>0)){if(a/=h,h<0){if(a<c)return;a<f&&(f=a)}else if(h>0){if(a>f)return;a>c&&(c=a)}if(a=r-s,h||!(a<0)){if(a/=h,h<0){if(a>f)return;a>c&&(c=a)}else if(h>0){if(a<c)return;a<f&&(f=a)}if(a=n-u,p||!(a>0)){if(a/=p,p<0){if(a<c)return;a<f&&(f=a)}else if(p>0){if(a>f)return;a>c&&(c=a)}if(a=i-u,p||!(a<0)){if(a/=p,p<0){if(a>f)return;a>c&&(c=a)}else if(p>0){if(a<c)return;a<f&&(f=a)}return!(c>0||f<1)||(c>0&&(t[0]=[s+c*h,u+c*p]),f<1&&(t[1]=[s+f*h,u+f*p]),!0)}}}}}function lu(t,e,n,r,i){var a=t[1];if(a)return!0;var o,l,s=t[0],u=t.left,c=t.right,f=u[0],h=u[1],p=c[0],d=c[1],g=(f+p)/2,_=(h+d)/2;if(d===h){if(g<e||g>=r)return;if(f>p){if(s){if(s[1]>=i)return}else s=[g,n];a=[g,i]}else{if(s){if(s[1]<n)return}else s=[g,i];a=[g,n]}}else if(l=_-(o=(f-p)/(d-h))*g,o<-1||o>1)if(f>p){if(s){if(s[1]>=i)return}else s=[(n-l)/o,n];a=[(i-l)/o,i]}else{if(s){if(s[1]<n)return}else s=[(i-l)/o,i];a=[(n-l)/o,n]}else if(h<d){if(s){if(s[0]>=r)return}else s=[e,o*e+l];a=[r,o*r+l]}else{if(s){if(s[0]<e)return}else s=[r,o*r+l];a=[e,o*e+l]}return t[0]=s,t[1]=a,!0}function su(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function uu(t,e){return e[+(e.left!==t.site)]}function cu(t,e){return e[+(e.left===t.site)]}var fu,hu=[];function pu(){$s(this),this.x=this.y=this.arc=this.site=this.cy=null}function du(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],l=i[1],s=r[0]-o,u=r[1]-l,c=a[0]-o,f=a[1]-l,h=2*(s*f-u*c);if(!(h>=-Mu)){var p=s*s+u*u,d=c*c+f*f,g=(f*p-u*d)/h,_=(s*d-c*p)/h,y=hu.pop()||new pu;y.arc=t,y.site=i,y.x=g+o,y.y=(y.cy=_+l)+Math.sqrt(g*g+_*_),t.circle=y;for(var v=null,m=zu._;m;)if(y.y<m.y||y.y===m.y&&y.x<=m.x){if(!m.L){v=m.P;break}m=m.L}else{if(!m.R){v=m;break}m=m.R}zu.insert(v,y),v||(fu=y)}}}}function gu(t){var e=t.circle;e&&(e.P||(fu=e.N),zu.remove(e),hu.push(e),$s(e),t.circle=null)}var _u=[];function yu(){$s(this),this.edge=this.site=this.circle=null}function vu(t){var e=_u.pop()||new yu;return e.site=t,e}function mu(t){gu(t),Tu.remove(t),_u.push(t),$s(t)}function xu(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,l=[t];mu(t);for(var s=a;s.circle&&Math.abs(n-s.circle.x)<Au&&Math.abs(r-s.circle.cy)<Au;)a=s.P,l.unshift(s),mu(s),s=a;l.unshift(s),gu(s);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<Au&&Math.abs(r-u.circle.cy)<Au;)o=u.N,l.push(u),mu(u),u=o;l.push(u),gu(u);var c,f=l.length;for(c=1;c<f;++c)u=l[c],s=l[c-1],au(u.edge,s.site,u.site,i);s=l[0],(u=l[f-1]).edge=ru(s.site,u.site,null,i),du(s),du(u)}function bu(t){for(var e,n,r,i,a=t[0],o=t[1],l=Tu._;l;)if((r=Su(l,o)-a)>Au)l=l.L;else{if(!((i=a-wu(l,o))>Au)){r>-Au?(e=l.P,n=l):i>-Au?(e=l,n=l.N):e=n=l;break}if(!l.R){e=l;break}l=l.R}!function(t){ku[t.index]={site:t,halfedges:[]}}(t);var s=vu(t);if(Tu.insert(e,s),e||n){if(e===n)return gu(e),n=vu(e.site),Tu.insert(s,n),s.edge=n.edge=ru(e.site,s.site),du(e),void du(n);if(n){gu(e),gu(n);var u=e.site,c=u[0],f=u[1],h=t[0]-c,p=t[1]-f,d=n.site,g=d[0]-c,_=d[1]-f,y=2*(h*_-p*g),v=h*h+p*p,m=g*g+_*_,x=[(_*v-p*m)/y+c,(h*m-g*v)/y+f];au(n.edge,u,d,x),s.edge=ru(u,t,null,x),n.edge=ru(t,d,null,x),du(e),du(n)}else s.edge=ru(e.site,s.site)}}function Su(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var l=(n=o.site)[0],s=n[1],u=s-e;if(!u)return l;var c=l-r,f=1/a-1/u,h=c/u;return f?(-h+Math.sqrt(h*h-2*f*(c*c/(-2*u)-s+u/2+i-a/2)))/f+r:(r+l)/2}function wu(t,e){var n=t.N;if(n)return Su(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var Tu,ku,zu,Fu,Au=1e-6,Mu=1e-12;function Cu(t,e,n){return(t[0]-n[0])*(e[1]-t[1])-(t[0]-e[0])*(n[1]-t[1])}function Lu(t,e){return e[1]-t[1]||e[0]-t[0]}function Eu(t,e){var n,r,i,a=t.sort(Lu).pop();for(Fu=[],ku=new Array(t.length),Tu=new nu,zu=new nu;;)if(i=fu,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(bu(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;xu(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ku.length;i<a;++i)if((t=ku[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),l=new Array(r);for(n=0;n<r;++n)o[n]=n,l[n]=su(t,Fu[e[n]]);for(o.sort((function(t,e){return l[e]-l[t]})),n=0;n<r;++n)l[n]=e[o[n]];for(n=0;n<r;++n)e[n]=l[n]}}(),e){var o=+e[0][0],l=+e[0][1],s=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=Fu.length;a--;)lu(i=Fu[a],t,e,n,r)&&ou(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>Au||Math.abs(i[0][1]-i[1][1])>Au)||delete Fu[a]}(o,l,s,u),function(t,e,n,r){var i,a,o,l,s,u,c,f,h,p,d,g,_=ku.length,y=!0;for(i=0;i<_;++i)if(a=ku[i]){for(o=a.site,l=(s=a.halfedges).length;l--;)Fu[s[l]]||s.splice(l,1);for(l=0,u=s.length;l<u;)d=(p=cu(a,Fu[s[l]]))[0],g=p[1],f=(c=uu(a,Fu[s[++l%u]]))[0],h=c[1],(Math.abs(d-f)>Au||Math.abs(g-h)>Au)&&(s.splice(l,0,Fu.push(iu(o,p,Math.abs(d-t)<Au&&r-g>Au?[t,Math.abs(f-t)<Au?h:r]:Math.abs(g-r)<Au&&n-d>Au?[Math.abs(h-r)<Au?f:n,r]:Math.abs(d-n)<Au&&g-e>Au?[n,Math.abs(f-n)<Au?h:e]:Math.abs(g-e)<Au&&d-t>Au?[Math.abs(h-e)<Au?f:t,e]:null))-1),++u);u&&(y=!1)}if(y){var v,m,x,b=1/0;for(i=0,y=null;i<_;++i)(a=ku[i])&&(x=(v=(o=a.site)[0]-t)*v+(m=o[1]-e)*m)<b&&(b=x,y=a);if(y){var S=[t,e],w=[t,r],T=[n,r],k=[n,e];y.halfedges.push(Fu.push(iu(o=y.site,S,w))-1,Fu.push(iu(o,w,T))-1,Fu.push(iu(o,T,k))-1,Fu.push(iu(o,k,S))-1)}}for(i=0;i<_;++i)(a=ku[i])&&(a.halfedges.length||delete ku[i])}(o,l,s,u)}this.edges=Fu,this.cells=ku,Tu=zu=Fu=ku=null}function Nu(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Du(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Du(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==n.return||n.return()}finally{if(l)throw a}}}}function Du(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}Eu.prototype={constructor:Eu,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return uu(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,l=n.site,s=-1,u=e[i[a-1]],c=u.left===l?u.right:u.left;++s<a;)o=c,c=(u=e[i[s]]).left===l?u.right:u.left,o&&c&&r<o.index&&r<c.index&&Cu(l,o,c)<0&&t.push([l.data,o.data,c.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,l=a.cells.length;!(i=a.cells[o]);)if(++o>=l)return null;var s=t-i.site[0],u=e-i.site[1],c=s*s+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],l=r.left;if(l!==i.site&&l||(l=r.right)){var s=t-l[0],u=e-l[1],f=s*s+u*u;f<c&&(c=f,o=l.index)}}))}while(null!==o);return a._found=r,null==n||c<=n*n?i.site:null}};var Ou=function(t,e){var n=El(0,e);if(n.stat_={default:void 0},n.stat=function(t,e){return arguments.length?2==arguments.length?(n.stat_[t]=e,n):"string"==typeof t||t instanceof String?n.stat_[t]:(n.stat_=t.default?t:{default:t},n):n.stat_.default},n.statData_={default:$l(),color:$l(),size:$l(),v1:$l(),v2:$l()},n.statData=function(t,e){return arguments.length?1==arguments.length?n.statData_[t]:(n.statData_[t]=e,n):n.statData_.default},n.noDataText_="No data available",n.lg_="en",n.transitionDuration_=500,n.tooltip_.textFunction=Ru,n.filtersDefinitionFun_=void 0,n.callback_=void 0,n.legend_=void 0,n.legendObj_=void 0,["legend_","legendObj_","noDataText_","lg_","transitionDuration_","tooltipText_","filtersDefinitionFun_","callback_"].forEach((function(t){n[t.substring(0,t.length-1)]=function(e){return arguments.length?(n[t]=e,n):n[t]}})),t)for(var r in t)n[r]&&null!=t[r]&&n[r](t[r]);n.legend=function(t){return arguments.length?(n.legend_=t,n.legendObj_&&n.legendObj().update(),n):n.legend_},n.build=function(){if(n.projectionFunction_&&n.proj("4326"),n.buildMapTemplateBase(),n.filtersDefinitionFun_&&n.filtersDefinitionFun_(n.svg(),n.clnb_),n.legend()){n.legendObj(n.getLegendConstructor()(n,n.legend()));var t=n.legendObj();if(0==dt("#"+t.svgId).size()){var e=null==t.x?n.width()-100-t.boxPadding:t.x,r=null==t.y?t.boxPadding:t.y;n.svg().append("g").attr("class","legend").attr("transform","translate("+e+","+r+")").append("svg").attr("id",t.svgId)}t.build()}return n.updateGeoData(),n.updateStatData(),n};var i=function(){for(var t in n.stat_)if(!n.statData(t).isReady())return!1;return!0};return n.updateGeoData=function(){return n.updateGeoMT((function(){i()&&(n.updateStatValues(),n.callback()&&n.callback()(n))})),n},n.updateStatData=function(){for(var t in n.stat_){if(!n.stat(t)&&n.statData(t).get())return;"default"!=t||n.stat(t)||n.stat(t,{eurostatDatasetCode:"demo_r_d3dens",unitText:"inhab./km²"});var e=$l(n.stat(t));n.statData(t,e);var r=n.nutsLvl_;"mixed"==n.nutsLvl_&&(r=0),e.retrieveFromRemote(r,n.lg(),(function(){n.isGeoReady()&&i()&&(n.updateStatValues(),n.callback()&&n.callback()())}))}return n},n.updateStatValues=function(){return n.updateClassification(),n.updateStyle(),n.legendObj()&&n.legendObj().update(),n},n.updateClassification=function(){return console.log("Map updateClassification function not implemented"),n},n.updateStyle=function(){return console.log("Map updateStyle function not implemented"),n},n.getLegendConstructor=function(){return console.log("Map getLegendConstructor function not implemented"),Ql},n.getTime=function(){return n.statData("default").getTime()},n.setFromURL=function(){var t=Iu();return t.w&&n.width(t.w),t.h&&n.height(t.h),t.x&&t.y&&n.geoCenter([t.x,t.y]),t.z&&n.pixSize(t.z),t.s&&n.scale(t.s),t.lvl&&n.nutsLvl(t.lvl),t.time&&(n.filters_.time=t.time,delete n.filters_.lastTimePeriod),t.proj&&n.proj(t.proj),t.geo&&n.geo(t.geo),t.ny&&n.nutsYear(t.ny),t.lg&&n.lg(t.lg),t.clnb&&n.clnb(+t.clnb),n},n.exportMapToSVG=function(){var t=Pu(n.svg_.node()),e=URL.createObjectURL(t),r=document.createElement("a");return r.href=e,r.download="eurostatmap.svg",document.body.appendChild(r),r.click(),document.body.removeChild(r),n},n.exportMapToPNG=function(){var t,e,r,i,a;return(t=n.svg_.node(),i=new Promise((function(t,n){return e=t,r=n})),(a=new Image).onerror=r,a.onload=function(){var n=t.getBoundingClientRect(),r=document.createElement("canvas");r.width=n.width,r.height=n.height;var i=r.getContext("2d");i.drawImage(a,0,0,n.width,n.height),i.canvas.toBlob(e)},a.src=URL.createObjectURL(Pu(t)),i).then((function(t){var e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="eurostatmap.png",document.body.appendChild(n),n.click(),document.body.removeChild(n)})),n},n};function Pu(t){var e="http://www.w3.org/2000/xmlns/";t=t.cloneNode(!0);for(var n=window.location.href+"#",r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,null,!1);r.nextNode();){var i,a=Nu(r.currentNode.attributes);try{for(a.s();!(i=a.n()).done;){var o=i.value;o.value.includes(n)&&(o.value=o.value.replace(n,"#"))}}catch(t){a.e(t)}finally{a.f()}}t.setAttributeNS(e,"xmlns","http://www.w3.org/2000/svg"),t.setAttributeNS(e,"xmlns:xlink","http://www.w3.org/1999/xlink");var l=(new window.XMLSerializer).serializeToString(t);return new Blob([l],{type:"image/svg+xml"})}var Ru=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!==r.value&&!r.value)return n.push(e.noDataText_),n.join("");n.push(Fl(r.value));var i=e.statData("default").unitText();i&&n.push(" "+i);var a=r.status;if(a&&e.tooltip_.showFlags)if("short"===e.tooltip_.showFlags)n.push(" "+a);else{var o=wn[a];n.push(o?" ("+o+")":" "+a)}return n.join("")},Iu=function(){for(var t={},e=["w","h","x","y","z","s","lvl","time","proj","geo","ny","lg","sl","clnb"],n=0;n<e.length;n++)t[e[n]]=getURLParameterByName(e[n]);return t},Wu=function(t,e){var n=Ql(t);if(n.ascending=!0,n.shapeWidth=13,n.shapeHeight=15,n.sepLineLength=17,n.sepLineStroke="black",n.sepLineStrokeWidth=1,n.labelFontSize=12,n.labelDecNb=2,n.labelOffset=3,n.labelFormatter=null,n.labels=null,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];function i(t,e){var r=t.selectAll("#g_nutsrg").selectAll("[ecl='"+e+"']");r.style("fill",n.map.nutsrgSelFillSty()),r.attr("fill___",(function(){dt(this).attr("fill")}))}function a(t,e){t.selectAll("#g_nutsrg").selectAll("[ecl='"+e+"']").style("fill",(function(){dt(this).attr("fill___")}))}return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;if(t.legend_)for(var o in t.legend_)n[o]=t.legend_[o];r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.labelFormatter?n.labelFormatter:rn("."+n.labelDecNb+"f"),s=function(o){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+o*n.shapeHeight,u=n.ascending?t.clnb()-o-1:o;r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()(u,t.clnb())).on("mouseover",(function(){if(dt(this).style("fill",t.nutsrgSelFillSty()),i(e,u),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var a in r)if(Array.isArray(r[a]))for(var o=0;o<r[a].length;o++)if(Array.isArray(r[a][o]))for(var l=0;l<r[a][o].length;l++)r[a][o][l].svgId_!==n.svgId_&&i(r[a][o][l].svg(),u);else r[a][o].svgId_!==n.svgId_&&i(r[a][o].svg(),u);else r[a].svgId_!==n.svgId_&&i(r[a].svg(),u)}})).on("mouseout",(function(){if(dt(this).style("fill",t.classToFillStyle()(u,t.clnb())),a(e,u),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var i in r)if(Array.isArray(r[i]))for(var o=0;o<r[i].length;o++)if(Array.isArray(r[i][o]))for(var l=0;l<r[i][o].length;l++)r[i][o][l].svgId_!==n.svgId_&&a(r[i][o][l].svg(),u);else r[i][o].svgId_!==n.svgId_&&a(r[i][o].svg(),u);else r[i].svgId_!==n.svgId_&&a(r[i].svg(),u)}})),o>0&&r.append("line").attr("class","eurostatmap-legend-line").attr("x1",n.boxPadding).attr("y1",s).attr("x2",n.boxPadding+n.sepLineLength).attr("y2",s).attr("stroke",n.sepLineStroke).attr("stroke-width",n.sepLineStrokeWidth),o<t.clnb()-1&&r.append("text").attr("class","eurostatmap-legend-label").attr("x",n.boxPadding+Math.max(n.shapeWidth,n.sepLineLength)+n.labelOffset).attr("y",s+n.shapeHeight).attr("alignment-baseline","middle").text(n.labels?n.labels[o]:l(t.classifier().invertExtent(u)[n.ascending?0:1])).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<t.clnb();u++)s(u);if(n.noData){var c=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+t.clnb()*n.shapeHeight+n.boxPadding;r.append("rect").attr("x",n.boxPadding).attr("y",c).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){if(dt(this).style("fill",t.nutsrgSelFillSty()),i(e,"nd"),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var a in r)if(Array.isArray(r[a]))for(var o=0;o<r[a].length;o++)if(Array.isArray(r[a][o]))for(var l=0;l<r[a][o].length;l++)r[a][o][l].svgId_!==n.svgId_&&i(r[a][o][l].svg(),"nd");else r[a][o].svgId_!==n.svgId_&&i(r[a][o].svg(),"nd");else r[a].svgId_!==n.svgId_&&i(r[a].svg(),"nd")}})).on("mouseout",(function(){if(dt(this).style("fill",t.noDataFillStyle()),a(e,"nd"),n.map.insetTemplates_){var r=n.map.insetTemplates_;for(var i in r)if(Array.isArray(r[i]))for(var o=0;o<r[i].length;o++)if(Array.isArray(r[i][o]))for(var l=0;l<r[i][o].length;l++)r[i][o][l].svgId_!==n.svgId_&&a(r[i][o][l].svg(),"nd");else r[i][o].svgId_!==n.svgId_&&a(r[i][o].svg(),"nd");else r[i].svgId_!==n.svgId_&&a(r[i].svg(),"nd")}})),r.append("text").attr("class","eurostatmap-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",c+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},ju=function(t,e){return t=t||interpolateOrRd,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},Hu=bn(new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(xn)),Uu={draw:function(t,e){var n=Math.sqrt(e/Ms);t.moveTo(n,0),t.arc(0,0,n,0,Ls)}},Bu={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Gu=Math.sqrt(1/3),qu=2*Gu,Vu={draw:function(t,e){var n=Math.sqrt(e/qu),r=n*Gu;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},Yu=Math.sin(Ms/10)/Math.sin(7*Ms/10),Xu=Math.sin(Ls/10)*Yu,Ku=-Math.cos(Ls/10)*Yu,Ju={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=Xu*n,i=Ku*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=Ls*a/5,l=Math.cos(o),s=Math.sin(o);t.lineTo(s*n,-l*n),t.lineTo(l*r-s*i,s*r+l*i)}t.closePath()}},Zu={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},$u=Math.sqrt(3),Qu={draw:function(t,e){var n=-Math.sqrt(e/(3*$u));t.moveTo(0,2*n),t.lineTo(-$u*n,-n),t.lineTo($u*n,-n),t.closePath()}},tc=-.5,ec=Math.sqrt(3)/2,nc=1/Math.sqrt(12),rc=3*(nc/2+1),ic={draw:function(t,e){var n=Math.sqrt(e/rc),r=n/2,i=n*nc,a=r,o=n*nc+n,l=-a,s=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(l,s),t.lineTo(tc*r-ec*i,ec*r+tc*i),t.lineTo(tc*a-ec*o,ec*a+tc*o),t.lineTo(tc*l-ec*s,ec*l+tc*s),t.lineTo(tc*r+ec*i,tc*i-ec*r),t.lineTo(tc*a+ec*o,tc*o-ec*a),t.lineTo(tc*l+ec*s,tc*s-ec*l),t.closePath()}};function ac(){var t=xs(Uu),e=xs(64),n=null;function r(){var r;if(n||(n=r=ms()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:xs(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:xs(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r}sn({decimal:".",thousands:" ",grouping:[3],currency:["","€"]});var oc=function(t,e){var n=Ql(t);if(n.ascending=!1,n.legendSpacing=35,n.labelFontSize=12,n.sizeLegend={title:null,titleFontSize:12,titlePadding:5,values:void 0,cellNb:4,shapePadding:10,shapeOffset:{x:0,y:0},shapeFill:"white",labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0},n.colorLegend={title:null,titleFontSize:12,titlePadding:10,shapeWidth:13,shapeHeight:15,shapePadding:1,labelOffset:{x:25,y:0},labelDecNb:0,labelFormatter:void 0,noData:!0,noDataText:"No data",sepLineLength:17,sepLineStroke:"black",sepLineStrokeWidth:1},e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;if(t.legend_)for(var r in t.legend_)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])t.legend_[r][i]&&(n[r][i]=t.legend_[r][i]);else n[r]=t.legend_[r];e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),t.classifierSize_&&function(t,e,r){var i=r.labelFormatter||Fl;r.title&&e.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var a,o,l,s=function(){var t;if(n.map.psCustomSVG_)t=n.map.psCustomSVG_;else if(n.map.psCustomShape_)t=n.map.psCustomShape_;else if("bar"==n.map.psShape_){t=ac().type({draw:function(t,e){var r=Math.sqrt(e);t.moveTo(0,0),t.lineTo(0,r),t.lineTo(n.map.psBarWidth_,r),t.lineTo(n.map.psBarWidth_,0),t.lineTo(0,0),t.closePath()}})}else{var e=sc[n.map.psShape_]||sc.circle;t=ac().type(e)}return t}(),u=t.classifierSize_.domain()[1];n._sizeLegendHeight=0,r.values&&(r.cellNb=r.values.length);for(var c=0,f=function(f){var h=n.ascending?r.cellNb-f+1:f,p=r.values?r.values[h-1]:u/h,d=t.classifierSize_(p),g=void 0,_=void 0;if("bar"==n.map.psShape_)g=n.boxPadding+10,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;else if("custom"==n.map.psShape_){if(n._xOffset=t.classifierSize_(u),g=n.boxPadding+n._xOffset,a||(_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight,l=_,o=d,n._sizeLegendHeight=n._sizeLegendHeight+_),a){var y=a.node().getBBox();c+=y.height*o,_=l+c+r.shapePadding*(f-1),n._sizeLegendHeight=n._sizeLegendHeight+y.height+r.shapePadding,o=d}}else n._xOffset=t.classifierSize_(u)/1.5,g=n.boxPadding+n._xOffset,_=n.boxPadding+(r.title?n.titleFontSize+r.titlePadding:0)+n._sizeLegendHeight+d/2+r.shapePadding,n._sizeLegendHeight=n._sizeLegendHeight+d+r.shapePadding;if(n.map.psCustomSVG_)a=e.append("g").attr("transform","translate(".concat(g,",").concat(_,")")).attr("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("g").html(n.map.psCustomSVG_).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}));else{var v=s.size(d*d)();a=e.append("g").attr("transform","translate(".concat(g,",").concat(_,")")).style("fill",(function(e){return t.classifierColor_?r.shapeFill:t.psFill_})).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",t.psStrokeWidth()).attr("stroke","black").attr("stroke-width",.5).append("path").attr("d",v).attr("transform",(function(){return n.map.psCustomSVG_?"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,") scale(").concat(d,")"):"translate(".concat(r.shapeOffset.x,",").concat(r.shapeOffset.y,")")}))}var m=g+r.labelOffset.x,x=_+r.labelOffset.y;"bar"==n.map.psShape_?x+=d/2:"custom"==n.map.psShape_&&(x+=10*d),e.append("text").attr("x",m).attr("y",x).attr("alignment-baseline","middle").attr("class","eurostatmap-legend-label").text(i(p)).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},h=1;h<r.cellNb+1;h++)f(h)}(t,e,n.sizeLegend),t.classifierColor_&&function(t,e,r){var i=r.labelFormatter||Fl,a=t.svg();r.title&&e.append("text").attr("class","eurostatmap-legend-title").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.boxPadding+n.titleFontSize+n.legendSpacing+r.titlePadding).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);for(var o=n.boxPadding,l=t.psClasses_,s=function(s){var u=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+2*r.titlePadding:0)+s*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding,c=n.ascending?s:l-s-1;e.append("g").attr("transform","translate(".concat(o,",").concat(u,")")).attr("fill",t.psClassToFillStyle()(c,l)).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).style("stroke-width",1).attr("stroke","black").attr("stroke-width",.5).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=a.select("#g_ps").selectAll("[ecl='"+c+"']"),n=dt(this.parentNode).attr("fill");dt(this).attr("fill___",n),e.each((function(e,n){dt(this.childNodes[0]).style("fill",t.nutsrgSelFillSty())})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=a.select("#g_ps").selectAll("[ecl='"+c+"']"),n=dt(this).attr("fill___");e.each((function(t,e){dt(this.childNodes[0]).style("fill",n)})),dt(this).style("fill",t.psClassToFillStyle()(c,l))}));var f=(n.map.psShape_,u);s>0&&e.append("line").attr("x1",o).attr("y1",f).attr("x2",o+r.sepLineLength).attr("y2",f).attr("stroke",r.sepLineStroke).attr("stroke-width",r.sepLineStrokeWidth);var h=u+r.labelOffset.y+1.2*n.labelFontSize;s<l-1&&e.append("text").attr("class","eurostatmap-legend-label").attr("x",o+r.labelOffset.x).attr("y",h).attr("alignment-baseline","middle").text((function(e){return i(t.classifierColor_.invertExtent(n.ascending?c+1:c-1)[n.ascending?0:1])})).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)},u=0;u<l;u++)s(u);if(r.noData){var c=n._sizeLegendHeight+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+2*r.titlePadding:0)+t.psClasses_*(r.shapeHeight+r.shapePadding)+n.legendSpacing+r.shapePadding;e.append("g").attr("transform","translate(".concat(o,",").concat(c,")")).attr("fill",t.noDataFillStyle()).style("fill-opacity",t.psFillOpacity()).style("stroke",t.psStroke()).attr("stroke-width",1).append("rect").attr("width",r.shapeWidth).attr("height",r.shapeHeight).on("mouseover",(function(){var e=a.select("#g_ps").selectAll("[ecl='nd']"),n=dt(this.parentNode).attr("fill");dt(this).attr("fill___",n),e.each((function(e,n){dt(this.childNodes[0]).style("fill",t.noDataFillStyle())})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=a.select("#g_ps").selectAll("[ecl='nd']"),n=dt(this).attr("fill___");e.each((function(t,e){dt(this.childNodes[0]).style("fill",n)})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",o+r.labelOffset.x).attr("y",c+n.boxPadding).attr("alignment-baseline","middle").attr("class","eurostatmap-legend-label").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}}(t,e,n.colorLegend),n.setBoxDimension()},n},lc=function(t,e){return t=t||Hu,e?function(t,n){return e[t]}:function(e,n){return t(e/(n-1))}},sc={cross:Bu,square:Zu,diamond:Vu,triangle:Qu,star:Ju,wye:ic,circle:Uu},uc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("size").getArray()?e.statData("size"):e.statData(),i=r.get(t.properties.id);if(!i||0!=i.value&&!i.value)n.push(e.noDataText_);else{n.push(Fl(i.value));var a=r.unitText();a&&n.push(" "+a)}if(n.push("<br>"),e.statData("color").getArray()){var o=e.statData("color").get(t.properties.id);if(!o||0!=o.value&&!o.value)n.push(e.noDataText_);else{n.push(Fl(o.value));var l=e.statData("color").unitText();l&&n.push(" "+l)}}return n.join("")},cc=xn("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),fc=function(t,e){var n=Ql(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg,r=t.svg();e.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&e.append("text").attr("class","eurostat-map-legend-title").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);for(var i=t.classifier().domain(),a=function(a){var o=i[a],l=t.classifier()(o),s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+a*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.classToFillStyle()[o]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=dt(this);e.attr("fill___",(function(t){n.attr("fill")})),n.style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),n=dt(this);e.style("fill",(function(t){n.attr("fill___")})),n.style("fill",t.classToFillStyle()[l])})),e.append("text").attr("class","eurostat-map-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.classToText()?t.classToText()[o]:o).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']");e.style("fill",t.nutsrgSelFillSty());var n=dt(this);e.attr("fill___",(function(t){n.attr("fill")}))})).on("mouseout",(function(){var t=r.select("#g_nutsrg").selectAll("[ecl='"+l+"']"),e=dt(this);t.style("fill",(function(t){e.attr("fill___")}))}))},o=0;o<i.length;o++)a(o);if(n.noData){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i.length*(n.shapeHeight+n.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){var e=r.select("#g_nutsrg").selectAll("[ecl='nd']");e.style("fill",t.nutsrgSelFillSty()),e.attr("fill___",(function(t){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){r.select("#g_nutsrg").selectAll("[ecl='nd']").style("fill",(function(t){dt(this).attr("fill___")})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("class","eurostat-map-legend-label").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)}n.setBoxDimension()},n},hc=function(t){var e=Ou(t);return e.classToFillStyle_=void 0,e.classToText_=void 0,e.noDataFillStyle_="lightgray",e.tooltip_.textFunction=pc,e.classifier_=void 0,["classToFillStyle_","classToText_","noDataFillStyle_","tooltipText_","classifier_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["classToFillStyle","classToText","noDataFillStyle","tooltipText","classifier"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=e.statData().getUniqueValues(),n=r(Array(t.length).keys());return e.classifier(Bt().domain(t).range(n)),e.svg().selectAll("path.nutsrg").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifier()(isNaN(r)?r:+r):"nd"})),e},e.updateStyle=function(){if(!e.classToFillStyle()){for(var t={},n=e.classifier().domain(),r=0;r<n.length;r++)t[n[r]]=cc[r%12];e.classToFillStyle(t)}var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",a=e.svg().selectAll(i);return a.transition().duration(e.transitionDuration()).attr("fill",(function(){var t=dt(this).attr("ecl");return t&&"nd"!==t?e.classToFillStyle_[e.classifier().domain()[t]]||e.noDataFillStyle_||"gray":e.noDataFillStyle_||"gray"})).end().then((function(){a.on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())}))}),(function(t){})),e},e.getLegendConstructor=function(){return fc},e},pc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData().get(t.properties.id);if(!r||0!=r.value&&!r.value)return n.push(e.noDataText_),n.join("");var i=r.value;if(e.classToText_){var a=e.classToText_[i];return n.push(a||i),n.join("")}return n.push(i),n.join("")},dc=function(t,e){var n=Ql(t);if(n.squareSize=50,n.rotation=0,n.label1="Variable 1",n.label2="Variable 2",n.labelFontSize=12,n.breaks1=void 0,n.breaks2=void 0,n.noData=!0,n.noDataShapeSize=15,n.noDataText="No data",n.boxPadding=n.labelFontSize,n.noDataYOffset=0,n.arrowHeight=15,n.arrowWidth=14,e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg,i=t.clnb(),a=n.squareSize/i,o=0===n.rotation?0:.7071*n.squareSize+n.boxPadding;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("class","eurostat-map-legend-title").attr("x",o).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("text-anchor","middle").style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);for(var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0),s=r.append("g").attr("transform","translate("+(n.boxPadding+(0==n.rotation?n.arrowWidth/2+n.labelFontSize/2:0))+","+(o+l)+") rotate("+n.rotation+") translate("+n.boxPadding+",0)"),u=0;u<i;u++)for(var c=function(r){var o=i-u-1,l=i-r-1,c=t.classToFillStyle()(o,l);s.append("rect").attr("x",(i-1-u)*a).attr("y",r*a).attr("width",a).attr("height",a).attr("fill",c).on("mouseover",(function(){var r=("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[ecl1='"+o+"']").filter("[ecl2='"+l+"']");r.style("fill",t.nutsrgSelFillSty()),r.attr("fill___",(function(){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[ecl1='"+o+"']").filter("[ecl2='"+l+"']").style("fill",(function(){dt(this).attr("fill___")})),dt(this).style("fill",c)}))},f=0;f<i;f++)c(f);if(n.breaks1)for(var h=0;h<n.breaks1.length;h++)s.append("text").attr("x",a*(h+1)).attr("y",n.squareSize+n.labelFontSize).text(n.breaks1[h]).attr("text-anchor","middle").style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill);if(n.breaks2)for(var p=0;p<n.breaks2.length;p++)console.log("legend.breaks2 not yet implemented");s.append("text").attr("x",0).attr("y",n.squareSize+n.labelFontSize+n.arrowHeight/1.5+(n.breaks1?n.labelFontSize+2:0)).text(n.label1).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("text").attr("x",0==n.rotation?-n.squareSize:-n.labelFontSize+n.arrowWidth/2).attr("y",0==n.rotation?-n.arrowWidth/1.5:n.labelFontSize+n.arrowHeight/2).attr("transform",0==n.rotation?"rotate(-90) translate(0,"+-n.labelFontSize/2+")":"rotate(90) translate("+n.labelFontSize/2+",0)").text(n.label2).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill),s.append("rect").attr("x",0).attr("y",0).attr("width",n.squareSize).attr("height",n.squareSize).attr("fill","none").style("stroke","black").attr("stroke-width",.7),s.append("defs").append("marker").attr("viewBox","0 0 ".concat(n.arrowWidth," ").concat(n.arrowHeight)).attr("id","arrowhead").attr("refX",0).attr("refY",5).attr("markerWidth",n.arrowWidth).attr("markerHeight",n.arrowHeight).attr("orient","auto").append("path").attr("d","M 0 0 L 5 5 L 0 10").attr("marker-units","strokeWidth"),s.append("path").attr("d",Vs()([[0,n.squareSize+n.arrowHeight/2],[n.squareSize,n.squareSize+n.arrowHeight/2]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),s.append("path").attr("d",Vs()([[-n.arrowWidth/2,n.squareSize],[-n.arrowWidth/2,0]])).attr("stroke","black").attr("marker-end","url(#arrowhead)"),n.noData&&(n.noDataYOffset=0==n.rotation?n.noDataYOffset+n.squareSize/n.map.clnb_+n.arrowHeight/2:n.noDataYOffset,l=0==n.rotation?l+n.squareSize+n.noDataYOffset:l+1.4142*n.squareSize+2*n.boxPadding+n.noDataYOffset,r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.noDataShapeSize).attr("height",n.noDataShapeSize).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.7).on("mouseover",(function(){var r=("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[nd='nd']");r.style("fill",t.nutsrgSelFillSty()),r.attr("fill___",(function(t){dt(this).attr("fill")})),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){("mixed"==n.map.nutsLvl_?e.selectAll("#g_nutsrg"):e.select("#g_nutsrg")).selectAll("[nd='nd']").style("fill",(function(t){dt(this).attr("fill___")})),dt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.noDataShapeSize+n.boxPadding).attr("y",l+.5*n.noDataShapeSize).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill)),n.setBoxDimension()},n},gc=function(t,e){var n=[];t.properties.id?n.push("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):n.push("<b>"+t.properties.na+"</b><br>");var r=e.statData("v1").get(t.properties.id);if(!r||0!=r.value&&!r.value)n.push(e.noDataText_);else{n.push(r.value);var i=e.statData("v1").unitText();i&&n.push(" "+i)}n.push("<br>");var a=e.statData("v2").get(t.properties.id);if(!a||0!=a.value&&!a.value)n.push(e.noDataText_);else{n.push(a.value);var o=e.statData("v2").unitText();o&&n.push(" "+o)}return n.join("")},_c=xn("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),yc=function(t,e){var n=Ql(t);if(n.shapeWidth=13,n.shapeHeight=15,n.shapePadding=5,n.labelFontSize=12,n.labelOffset=5,n.noData=!0,n.noDataText="No data",e)for(var r in e)n[r]=e[r];return n.update=function(){var t=n.map,e=t.svg(),r=n.lgg;r.selectAll("*").remove(),n.makeBackgroundBox(),n.title&&r.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(n.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),r.style("font-family",t.fontFamily_);var i=0,a=t.catColors(),o=function(o){var l=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding),s=t.catColors()[o]||"lightgray";r.append("rect").attr("x",n.boxPadding).attr("y",l).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",a[o]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",s),dt(this).style("fill",s)})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",l+.5*n.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[o]||o).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var n=t.catColors()[o]||"lightgray";e.selectAll("pattern").selectAll("rect[code='"+o+"']").style("fill",n)})),i++};for(var l in a)o(l);if(n.noData){var s=n.boxPadding+(n.title?n.titleFontSize+n.boxPadding:0)+i*(n.shapeHeight+n.shapePadding);r.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",n.shapeWidth).attr("height",n.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()})),dt(this).style("fill",t.noDataFillStyle())})),r.append("text").attr("x",n.boxPadding+n.shapeWidth+n.labelOffset).attr("y",s+.5*n.shapeHeight).attr("alignment-baseline","middle").text(n.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){e.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}n.setBoxDimension()},n},vc=function(t,e){var n=Ql(t);if(n.legendSpacing=15,n.labelFontSize=12,n.titleFontSize=12,n.sizeLegend={title:null,titlePadding:15,values:null},n.colorLegend={title:null,labelOffset:5,shapeWidth:13,shapeHeight:15,shapePadding:5,noData:!0,noDataText:"No data"},n._sizeLegendHeight=0,e)for(var r in e)if("colorLegend"==r||"sizeLegend"==r)for(var i in n[r])e[r][i]&&(n[r][i]=e[r][i]);else n[r]=e[r];return n.update=function(){var t=n.map,e=n.lgg;e.selectAll("*").remove(),n.makeBackgroundBox(),e.style("font-family",t.fontFamily_),function(t,e,r){var i=t.sizeClassifier_.domain();r.values||(r.values=[Math.floor(i[1]),Math.floor(i[0])]),!r.title&&n.title&&(r.title=n.title),r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill);var a=t.sizeClassifier_(zt(r.values)),o=n.boxPadding+(r.title?n.titleFontSize+n.boxPadding+r.titlePadding:0)+2*a,l=e.append("g").attr("fill","black").attr("transform","translate(".concat(a+n.boxPadding,",").concat(o,")")).attr("text-anchor","right").selectAll("g").data(r.values).join("g");l.append("circle").attr("fill","none").attr("stroke","black").attr("cy",(function(e){return-t.sizeClassifier_(e)})).attr("r",t.sizeClassifier_),l.append("text").style("font-size",n.labelFontSize+"px").attr("y",(function(e,r){return-1-2*t.sizeClassifier_(e)-n.labelFontSize})).attr("x",30).attr("dy","1.2em").attr("xml:space","preserve").text((function(t){return t.toLocaleString("en").replace(/,/gi," ")})),l.append("line").style("stroke-dasharray",2).style("stroke","grey").attr("x1",2).attr("y1",(function(e,n){return-1-2*t.sizeClassifier_(e)})).attr("xml:space","preserve").attr("x2",30).attr("y2",(function(e,n){return-1-2*t.sizeClassifier_(e)})),n._sizeLegendHeight=o}(t,e,n.sizeLegend),function(t,e,r){var i=t.svg();r.title&&e.append("text").attr("x",n.boxPadding).attr("y",n._sizeLegendHeight+n.legendSpacing+n.boxPadding+n.titleFontSize).text(r.title).style("font-size",n.titleFontSize+"px").style("font-weight",n.titleFontWeight).style("font-family",t.fontFamily_).style("fill",n.fontFill),e.style("font-family",t.fontFamily_);var a=0,o=t.catColors(),l=function(l){var s=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+a*(r.shapeHeight+r.shapePadding),u=t.catColors()[l]||"lightgray";e.append("rect").attr("x",n.boxPadding).attr("y",s).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",o[l]).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.selectAll(".piechart").selectAll("path[code='"+l+"']").style("fill",u),dt(this).style("fill",u)})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",s+.5*r.shapeHeight).attr("alignment-baseline","middle").text(t.catLabels()[l]||l).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){var e=t.catColors()[l]||"lightgray";i.selectAll("pattern").selectAll("rect[code='"+l+"']").style("fill",e)})),a++};for(var s in o)l(s);if(r.noData){var u=n._sizeLegendHeight+n.legendSpacing+n.boxPadding+(r.title?n.titleFontSize+n.boxPadding:0)+a*(r.shapeHeight+r.shapePadding);e.append("rect").attr("x",n.boxPadding).attr("y",u).attr("width",r.shapeWidth).attr("height",r.shapeHeight).attr("fill",t.noDataFillStyle()).attr("stroke","black").attr("stroke-width",.5).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty()),dt(this).style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()})),dt(this).style("fill",t.noDataFillStyle())})),e.append("text").attr("x",n.boxPadding+r.shapeWidth+r.labelOffset).attr("y",u+.5*r.shapeHeight).attr("alignment-baseline","middle").text(r.noDataText).style("font-size",n.labelFontSize+"px").style("font-family",t.fontFamily_).style("fill",n.fontFill).on("mouseover",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",t.nutsrgSelFillSty())})).on("mouseout",(function(){i.select("#g_nutsrg").selectAll("[nd='nd']").style("fill",(function(e){t.noDataFillStyle()}))}))}}(t,e,n.colorLegend),n.setBoxDimension()},n},mc=function(t,e){return"ch"==t?function(t){var e=Ou(t);function n(t){var n=function(t){return r(Array(t).keys())};if("quantile"===e.classifMethod_){var i=e.statData().getArray(),a=n(e.clnb());e.classifier(yn().domain(i).range(a))}else if("equinter"===e.classifMethod_){var o=e.statData().getArray(),l=n(e.clnb());e.classifier(vn().domain([At(o),zt(o)]).range(l)),e.makeClassifNice_&&e.classifier().nice()}else if("threshold"===e.classifMethod_){e.clnb(e.threshold().length+1);var s=n(e.clnb());e.classifier(mn().domain(e.threshold()).range(s))}var u="WORLD"==t.geo_?"path.worldrg":"path.nutsrg";t.svg_&&(t.svg().selectAll(u).attr("ecl",(function(t,n,r,i,a){var o=e.statData().get(t.properties.id);if(o){var l=o.value;if(0==l||l)return":"==l?"nd":+e.classifier()(+l)}})),"mixed"==t.nutsLvl_&&t.svg().selectAll("path.nutsrg0").attr("ecl",(function(t){var n=e.statData().get(t.properties.id);if(n){var r=n.value;if(0==r||r)return":"==r?"nd":+e.classifier()(+r)}})))}function i(t){if(e.filtersDefinitionFun_?e.classToFillStyle((function(t){return"url(#pattern_"+t+")"})):e.classToFillStyle(ju(e.colorFun(),e.colors_)),t.svg_){var n="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",r=t.svg().selectAll(n);r.transition().duration(e.transitionDuration()).attr("fill",(function(n){if("WORLD"==t.geo_){var r=dt(this).attr("ecl");return r?"nd"===r?e.noDataFillStyle()||"gray":(0,e.classToFillStyle_)(r,e.clnb_)||e.cntrgFillStyle_:e.cntrgFillStyle_}if(e.countriesToShow_.includes(n.properties.id[0]+n.properties.id[1])){var i=dt(this).attr("ecl");return i?"nd"===i?e.noDataFillStyle()||"gray":e.classToFillStyle()(i,e.clnb_):e.nutsrgFillStyle_}return e.nutsrgFillStyle_})).end().then((function(){r.on("mouseover",(function(n){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(n.properties.id[0]+n.properties.id[1])){var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",t.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))}}else{var i=dt(this);i.attr("fill___",i.attr("fill")),i.attr("fill",t.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(n,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove(e.tooltip_.textFunction(t,e)):e._tooltip&&e._tooltip.mousemove(e.tooltip_.textFunction(t,e))})).on("mouseout",(function(){var e=dt(this);e.attr("fill"),e.attr("fill___")&&(e.attr("fill",e.attr("fill___")),t._tooltip&&t._tooltip.mouseout())}))}),(function(t){})),"mixed"==e.nutsLvl_&&t.svg().selectAll("path.nutsrg").style("display",(function(t){var n=dt(this).attr("ecl"),r=dt(this).attr("lvl");return n&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==r?"block":"none"})).style("stroke",(function(e){var n=dt(this).attr("lvl");if(dt(this).attr("ecl")&&"0"!==n)return t.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(e){var n=dt(this).attr("lvl");if(dt(this).attr("ecl")&&"0"!==n)return t.nutsbnStrokeWidth_[parseInt(n)]||.2})),e.labelsToShow_.includes("values")&&e.updateValuesLabels()}}return e.clnb_=7,e.classifMethod_="quantile",e.threshold_=[0],e.colors_=null,e.makeClassifNice_=!0,e.colorFun_=Sn,e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier_=void 0,["clnb_","classifMethod_","threshold_","makeClassifNice_","colorFun_","classToFillStyle_","noDataFillStyle_","classifier_","colors_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),e.colorFun=function(t){return arguments.length?(e.colorFun_=t,e.filtersDefinitionFun_?e.classToFillStyle((function(t){return"url(#pattern_"+t+")"})):e.classToFillStyle(ju(e.colorFun(),e.colors_)),e):e.colorFun_},e.threshold=function(t){return arguments.length?(e.threshold_=t,e.clnb(t.length+1),e):e.threshold_},e.filtersDefinitionFun=function(t){return arguments.length?(e.filtersDefinitionFun_=t,e.svg()&&e.filtersDefinitionFun_(e.svg(),e.clnb_),e):e.filtersDefinitionFun_},t&&["clnb","classifMethod","threshold","makeClassifNice","colorFun","classToFillStyle","noDataFillStyle","colors_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){if(e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var r=0;r<e.insetTemplates_[t].length;r++)if(Array.isArray(e.insetTemplates_[t][r]))for(var i=0;i<e.insetTemplates_[t][r].length;i++)e.insetTemplates_[t][r][i].svgId_!==e.svgId_&&n(e.insetTemplates_[t][r][i]);else e.insetTemplates_[t][r].svgId_!==e.svgId_&&n(e.insetTemplates_[t][r]);else e.insetTemplates_[t].svgId_!==e.svgId_&&n(e.insetTemplates_[t]);return n(e),e},e.updateStyle=function(){if(e.insetTemplates_)for(var t in e.insetTemplates_)if(Array.isArray(e.insetTemplates_[t]))for(var n=0;n<e.insetTemplates_[t].length;n++)if(Array.isArray(e.insetTemplates_[t][n]))for(var r=0;r<e.insetTemplates_[t][n].length;r++)e.insetTemplates_[t][n][r].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n][r]);else e.insetTemplates_[t][n].svgId_!==e.svgId_&&i(e.insetTemplates_[t][n]);else e.insetTemplates_[t].svgId_!==e.svgId_&&i(e.insetTemplates_[t]);return i(e),e},e.updateValuesLabels=function(){return e.svg_.selectAll("g.stat-label > *").remove(),e.svg().selectAll("g.stat-label").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e.labelShadow_&&e.svg().selectAll("g.stat-label-shadow").append("text").text((function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_){var n=e.statData().get(t.properties.id);if(!n||!n.value)return"";if(":"!==n.value)return n.value}})),e},e.getLegendConstructor=function(){return Wu},e}(e):"ct"==t?hc(e):"ps"==t?function(t){var e=Ou(t,!0);return e.psShape_="circle",e.psCustomShape_,e.psCustomSVG_,e.psOffset_={x:0,y:0},e.psMaxSize_=30,e.psMinSize_=5,e.psBarWidth_=10,e.psMaxValue_=void 0,e.psMinValue_=void 0,e.psFill_="#2d50a0",e.psFillOpacity_=.7,e.psStroke_="#000",e.psStrokeWidth_=.3,e.psClasses_=5,e.psColors_=null,e.psColorFun_=Hu,e.psClassToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.psThreshold_=[0],e.psClassifMethod_="quantile",e.makeClassifNice_=!0,e.classifierSize_=void 0,e.classifierColor_=void 0,e.tooltip_.textFunction=uc,["psMaxSize_","psMinSize_","psMaxValue_","psMinValue_","psFill_","psFillOpacity_","psStroke_","psStrokeWidth_","classifierSize_","classifierColor_","psShape_","psCustomShape_","psBarWidth_","psClassToFillStyle_","psColorFun_","noDataFillStyle_","psThreshold_","psColors_","psCustomSVG_","psOffset_","psClassifMethod_","psClasses_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["psMaxSize","psMinSize","psFill","psFillOpacity","psStroke","psStrokeWidth","classifierSize","classifierColor","psShape","psCustomShape","psBarWidth","psClassToFillStyle","psColorFun","noDataFillStyle","psThreshold","psColors","psCustomSVG","psOffset","psClassifMethod","psClasses"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.psColorFun=function(t){return arguments.length?(e.psColorFun_=t,e.psClassToFillStyle_=lc(e.psColorFun_,e.psColors_),e):e.psColorFun_},e.psThreshold=function(t){return arguments.length?(e.psThreshold_=t,e.psClasses(t.length+1),e):e.psThreshold_},e.updateClassification=function(){return function(){var t,n=function(t){return r(Array(t).keys())},i=e.statData("size").getArray(),a=e.psMinValue_?e.psMinValue_:e.statData("size").getMin(),o=e.psMaxValue_?e.psMaxValue_:e.statData("size").getMax();if(t=i?[a,o]:[e.statData().getMin(),e.statData().getMax()],e.classifierSize(_n().domain(t).range([e.psMinSize_,e.psMaxSize_])),e.statData("color").getArray())if("quantile"===e.psClassifMethod_){var l=e.statData("color").getArray(),s=n(e.psClasses_);e.classifierColor(yn().domain(l).range(s))}else if("equinter"===e.psClassifMethod_){var u=e.statData("color").getArray(),c=n(e.psClasses_);e.classifierColor(vn().domain([a(u),o(u)]).range(c)),e.makeClassifNice_&&e.classifierColor().nice()}else if("threshold"===e.psClassifMethod_){e.psClasses(e.psThreshold().length+1);var f=n(e.psClasses_);e.classifierColor(mn().domain(e.psThreshold()).range(f))}}(),e.svg()&&e.classifierColor_&&e.svg().selectAll(".symbol").attr("ecl",(function(t){var n=e.statData("color").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0==r||r?+e.classifierColor()(+r):"nd"})),e},e.updateStyle=function(){var t;e.psClassToFillStyle()||e.psClassToFillStyle(lc(e.psColorFun_,e.psColors_));var n=e.statData("size").getArray()?e.statData("size"):e.statData();if(e.svg()){e.svg_.selectAll("g.symbol > *").remove(),t=e.psCustomSVG_?e.svg().select("#g_ps").selectAll("g.symbol").append("g").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").html(e.psCustomSVG_).attr("transform",(function(t){var r=n.get(t.properties.id),i=e.classifierSize_(+r.value);if(i)return"translate(".concat(e.psOffset_.x*i,",").concat(e.psOffset_.y*i,") scale(").concat(i,")")})):"bar"==e.psShape_?e.svg().select("#g_ps").selectAll("g.symbol").append("rect").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("width",e.psBarWidth_).attr("height",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.classifierSize_(+r.value):0})).attr("transform",(function(){return this.getBoundingClientRect(),"translate(".concat(-this.getAttribute("width")/2)+", -".concat(this.getAttribute("height"),")")})).transition().duration(e.transitionDuration()):e.svg().selectAll("g.symbol").append("path").filter((function(t){var e=n.get(t.properties.id);if(e&&":"!==e.value)return t})).attr("class","ps").attr("d",(function(t){var n=e.statData("size")?e.statData("size"):e.statData();if(n){var r=n.get(t.properties.id);if(0==r||r){var i=e.classifierSize_(+r.value)||0;if(e.psCustomShape_)return e.psCustomShape_.size(i*i)();var a=sc[e.psShape_]||sc.circle;return ac().type(a).size(i*i)()}}}));var r="WORLD"==e.geo_?"path.worldrg":"path.nutsrg",i=e.svg().selectAll(r);"WORLD"!==e.geo_?("mixed"==e.nutsLvl_&&(e.svg().selectAll("g.symbol").style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&":"!=r.value?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_?"block":void 0:"none"})),i.style("display",(function(t){var r=n.get(t.properties.id);return r&&r.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"WORLD"==e.geo_?"block":void 0:"none"})),i.style("stroke",(function(t){var r=dt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"0"!==r?e.nutsbnStroke_[parseInt(r)]||"#777":void 0})).style("stroke-width",(function(t){var r=dt(this).attr("lvl"),i=n.get(t.properties.id);if(i&&i.value&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1]))return!e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&"WORLD"!=e.geo_||"0"===r?void 0:e.nutsbnStrokeWidth_[parseInt(r)]||"#777"}))),i.attr("fill",(function(t){return n.get(t.properties.id)?e.nutsrgFillStyle_:e.cntrgFillStyle_})).style("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_}))):i.attr("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})).style("fill",(function(t){var r=n.get(t.properties.id);return r&&r.value?e.nutsrgFillStyle_:e.worldFillStyle_})),t.style("fill-opacity",e.psFillOpacity()).style("stroke",e.psStroke()).style("stroke-width",e.psStrokeWidth()).style("fill",(function(){if(e.classifierColor_){var t=dt(this.parentNode).attr("ecl");return t&&"nd"!==t?e.psClassToFillStyle_(t,e.psClasses_):e.noDataFillStyle()||"gray"}return e.psFill()}))}return e},e.getLegendConstructor=function(){return oc},e}(e):"chbi"==t?function(t){var e=Ou(t);return e.clnb_=3,e.startColor_="#e8e8e8",e.color1_="#73ae80",e.color2_="#6c83b5",e.endColor_="#2a5a5b",e.classToFillStyle_=void 0,e.noDataFillStyle_="lightgray",e.classifier1_=void 0,e.classifier2_=void 0,e.tooltip_.textFunction=gc,["clnb_","startColor_","color1_","color2_","endColor_","classToFillStyle_","noDataFillStyle_","classifier1_","classifier2_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["clnb","startColor","color1","color2","endColor","classToFillStyle","noDataFillStyle"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.updateClassification=function(){var t=r(Array(e.clnb()).keys());if(e.classifier1_||e.classifier1(yn().domain(e.statData("v1").getArray()).range(t)),e.classifier2_||e.classifier2(yn().domain(e.statData("v2").getArray()).range(t)),e.svg()){if(e.svg().selectAll("path.nutsrg").attr("ecl1",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v1").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)}})).attr("ecl2",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}})).attr("nd",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=e.statData("v1").get(t.properties.id),r=e.statData("v2").get(t.properties.id);if(!n||!r)return"nd";var i=n.value;return 0!=i&&!i||":"==i||0!=(i=r.value)&&!i||":"==i?"nd":""}})),!e.classToFillStyle()){var n=function(t,e,n,r,i){for(var a=[],o=Te(e,n),l=Te(r,i),s=0;s<t;s++){for(var u=s/(t-1),c=Te(o(u),l(u)),f=[],h=0;h<t;h++)f.push(c(h/(t-1)));a.push(f)}return function(t,e){return a[t][e]}}(e.clnb(),e.startColor(),e.color1(),e.color2(),e.endColor());e.classToFillStyle(n)}"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg0").attr("ecl1",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier1_(+r)})).attr("ecl2",(function(t){var n=e.statData("v2").get(t.properties.id);if(!n)return"nd";var r=n.value;return 0!=r&&!r||":"==r?"nd":+e.classifier2_(+r)}))}return e},e.updateStyle=function(){if(e.svg()){e.svg().selectAll("path.nutsrg").transition().duration(e.transitionDuration()).attr("fill",(function(t){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this).attr("ecl1");if(!n)return;if("nd"===n)return e.noDataFillStyle()||"gray";var r=dt(this).attr("ecl2");if(!r)return;return"nd"===r?e.noDataFillStyle()||"gray":e.classToFillStyle()(+n,+r)}return e.nutsrgFillStyle_}));var t="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg().selectAll(t).on("mouseover",(function(t){if(e.countriesToShow_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),"mixed"==e.nutsLvl_&&e.svg().selectAll("path.nutsrg").style("display",(function(t){var n=dt(this).attr("ecl1"),r=dt(this).attr("ecl2"),i=dt(this).attr("lvl");return n&&r&&e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])||"0"==i?"block":"none"})).style("stroke",(function(t){var n=dt(this).attr("lvl"),r=dt(this).attr("ecl1"),i=dt(this).attr("ecl2");if(r&&i&&"0"!==n)return e.nutsbnStroke_[parseInt(n)]||"#777"})).style("stroke-width",(function(t){var n=dt(this).attr("lvl"),r=dt(this).attr("ecl1"),i=dt(this).attr("ecl2");if(r&&i&&"0"!==n)return e.nutsbnStrokeWidth_[parseInt(n)]||.2}))}return e},e.getLegendConstructor=function(){return dc},e}(e):"scomp"==t?function(t){var e=Ou(t);e.stripeWidth_=50,e.stripeOrientation_=0,e.catColors_=void 0,e.catLabels_=void 0,e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="lightgray",e.pieChartRadius_=40,e.pieChartInnerRadius_=15,["stripeWidth_","stripeOrientation_","catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieChartRadius_","pieChartInnerRadius_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["stripeWidth","stripeOrientation","catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieChartRadius","pieChartInnerRadius"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statComp=function(t,r,i,a,o){t.filters=t.filters||{};for(var l=0;l<i.length;l++){var s=i[l];t.filters[r]=s;var u={};for(var c in t)u[c]=t[c];for(var f in u.filters={},t.filters)u.filters[f]=t.filters[f];e.stat(s,u),o&&(e.catColors_=e.catColors_||{},e.catColors_[s]=o[l]),a&&(e.catLabels_=e.catLabels_||{},e.catLabels_[s]=a[l])}return n=i,e};var n=void 0,r=function(t){for(var r={},i=0,a=0;a<n.length;a++){var o=n[a],l=e.statData(o).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r[o]=l.value,i+=l.value}if(0!=i){for(var s=0;s<n.length;s++)r[n[s]]/=i;return r}};return e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}return e},e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=_c[t%10]}e.catLabels_=e.catLabels_||{},e.svg().selectAll("path.nutsrg").attr("fill",(function(t){var n=t.properties.id;if(!e.countriesToShow_.includes(n[0]+n[1]))return e.nutsrgFillStyle_;var i=r(n);if(!i)return e.noDataFillStyle()||"gray";var a=e.svg().append("pattern").attr("id","pattern_"+n).attr("x","0").attr("y","0").attr("width",e.stripeWidth()).attr("height",1).attr("patternUnits","userSpaceOnUse");e.stripeOrientation()&&a.attr("patternTransform","rotate("+e.stripeOrientation()+")"),a.append("rect").attr("x",0).attr("y",0).attr("width",e.stripeWidth()).attr("height",1).style("stroke","none").style("fill","lightgray");var o=0;for(var l in i){var s=i[l];if(s){s*=e.stripeWidth();var u=e.catColors()[l]||"lightgray";a.append("rect").attr("x",o).attr("y",0).attr("height",1).style("stroke","none").attr("code",l).style("fill",u).transition().duration(e.transitionDuration()).attr("width",s),o+=s}}return"url(#pattern_"+n+")"})).attr("nd",(function(t){return r(t.properties.id)?"":"nd"}));var i="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";return e.svg().selectAll(i).on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),e},e.getLegendConstructor=function(){return yc},e.tooltip_.textFunction=function(t,n){var i=dt("#tooltip_eurostat");i.html(""),i.selectAll("*").remove(),t.properties.id?i.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):i.append("div").html("<b>"+t.properties.na+"</b><br>");var a=[],o=r(t.properties.id);for(var l in o)a.push({code:l,value:o[l]});if(a&&0!=a.length){var s=e.pieChartRadius(),u=e.pieChartInnerRadius(),c=i.append("svg").attr("viewBox",[-s,-s,2*s,2*s]).attr("width",2*s),f=Js().sort(null).value((function(t){return t.value}));c.append("g").attr("stroke","darkgray").selectAll("path").data(f(a)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("d",Hs().innerRadius(u).outerRadius(s))}else i.append("div").html(e.noDataText())},e}(e):"pie"==t?function(t){var e=Ou(t,!0);e.pieMinRadius_=5,e.pieMaxRadius_=15,e.pieChartInnerRadius_=0,e.pieStrokeFill_="white",e.pieStrokeWidth_=.3,e.tooltipPieRadius_=40,e.tooltipPieInnerRadius_=0,e.catColors_=void 0,e.catLabels_=void 0,e.pieOtherColor_="#FFCC80",e.pieOtherText_="Other",e.showOnlyWhenComplete_=!1,e.noDataFillStyle_="darkgray",e.sizeClassifier_=null,e.statPie_=null,["catColors_","catLabels_","showOnlyWhenComplete_","noDataFillStyle_","pieMaxRadius_","pieMinRadius_","pieChartInnerRadius_","pieOtherColor_","pieOtherText_","pieStrokeFill_","pieStrokeWidth_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["catColors","catLabels","showOnlyWhenComplete","noDataFillStyle","pieMaxRadius","pieMinRadius","pieChartInnerRadius","pieOtherColor","pieOtherText","pieStrokeFill","pieStrokeWidth"].forEach((function(n){null!=t[n]&&e[n](t[n])}));var n=void 0,r=void 0;e.statPie=function(t,i,a,o,l,s){t.filters=t.filters||{};for(var u=0;u<a.length;u++){var c=a[u];t.filters[i]=c;var f={};for(var h in t)f[h]=t[h];for(var p in f.filters={},t.filters)f.filters[p]=t.filters[p];e.stat(c,f),l&&(e.catColors_=e.catColors_||{},e.catColors_[c]=l[u]),o&&(e.catLabels_=e.catLabels_||{},e.catLabels_[c]=o[u])}if(n=a,s){r=s,t.filters[i]=s;var d={};for(var g in t)d[g]=t[g];for(var _ in d.filters={},t.filters)d.filters[_]=t.filters[_];e.stat(s,d),e.catColors_.other=e.pieOtherColor_,e.catLabels_.other=e.pieOtherText_}return e};var i=function(t){for(var i={},a=0,o=0;o<n.length;o++){var l=n[o],s=e.statData(l).get(t);if(!s||0!=s.value&&!s.value||isNaN(s.value)){if(e.showOnlyWhenComplete())return}else i[l]=s.value,a+=s.value}if(r){var u=e.statData(r).get(t);u&&(a=u.value)}if(0!=a){for(var c=0;c<n.length;c++)i[n[c]]/=a;if(r){var f=0;for(var h in i)f+=i[h];i.other=1-f}return i}};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,i=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=a(e);n&&r.push(n)})),xt(r));return e.sizeClassifier_=_n().domain(i).range([e.pieMinRadius_,e.pieMaxRadius_]),e};var a=function(t){var i,a=0;if(r)!(i=e.statData(r).get(t))||0!=i.value&&!i.value||isNaN(i.value)?e.showOnlyWhenComplete()&&(a=void 0):a=i.value;else for(var o=0;o<n.length;o++){var l=n[o];if(!(i=e.statData(l).get(t))||0!=i.value&&!i.value||isNaN(i.value)){if(e.showOnlyWhenComplete())return}else a+=i.value}if(0!=a)return a};return e.updateStyle=function(){if(!e.catColors()){e.catColors({});for(var t=0;t<n.length;t++)e.catColors()[n[t]]=schemeCategory10[t%10]}e.catLabels_=e.catLabels_||{};var r=[];if(e.svg()){var o=e.svg().selectAll("#g_ps");if(o){o.selectAll("g.symbol").append("g").attr("id",(function(t){return r.push(t.properties.id),"pie_"+t.properties.id}));var l="WORLD"==e.geo_?"path.worldrg":"path.nutsrg";e.svg().selectAll(l).on("mouseover",(function(t){if(e.countriesToShow_&&"WORLD"!==e.geo_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else{var r=dt(this);r.attr("fill___",r.attr("fill")),r.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}})).on("mousemove",(function(t){e.countriesToShow_&&"WORLD"!==e.geo_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove()})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),r.forEach((function(t){var n=[],r=i(t);for(var o in r)n.push({code:o,value:r[o]});if(n&&0!=n.length){var l=e.svg().selectAll("#pie_"+t),s=e.sizeClassifier_(a(t)),u=e.pieChartInnerRadius_,c=Js().sort(null).value((function(t){return t.value}));l.append("g").attr("stroke",e.pieStrokeFill_).attr("stroke-width",e.pieStrokeWidth_+"px").attr("class","piechart").selectAll("path").data(c(n)).join("path").attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("code",(function(t){return t.data.code})).attr("d",Hs().innerRadius(u).outerRadius(s))}}))}}return e},e.getLegendConstructor=function(){return vc},e.tooltip_.textFunction=function(t,r){var o=dt("#tooltip_eurostat");o.html(""),o.selectAll("*").remove(),t.properties.id?o.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):o.append("div").html("<b>"+t.properties.na+"</b><br>");var l=[],s=i(t.properties.id);for(var u in s)l.push({code:u,value:s[u]});if(l&&0!=l.length){var c=Math.min(120,120)/2-25,f=o.append("svg").attr("width",120).attr("height",107.5).append("g").attr("transform","translate(60,60)"),h=Js().sort(null).value((function(t){return t.value})),p=Hs().innerRadius(0).outerRadius(.8*c),d=Hs().innerRadius(.9*c).outerRadius(.9*c),g=h(l);f.selectAll("allSlices").data(g).enter().append("path").attr("d",p).attr("fill",(function(t){return e.catColors()[t.data.code]||"lightgray"})).attr("stroke","white").style("stroke-width","1px").style("opacity",.7),f.selectAll("allPolylines").data(g).enter().append("polyline").attr("stroke","black").style("fill","none").attr("stroke-width",1).attr("points",(function(t){if(t.data.value>.02){var e=p.centroid(t),n=d.centroid(t),r=d.centroid(t),i=t.startAngle+(t.endAngle-t.startAngle)/2;return r[0]=.95*c*(i<Math.PI?1:-1),[e,n,r]}})),f.selectAll("allLabels").data(g).enter().append("text").text((function(t){if(t.data.value>.02){var e=(100*t.data.value).toFixed();if(!isNaN(e))return e+"%"}})).attr("transform",(function(t){var e=d.centroid(t),n=t.startAngle+(t.endAngle-t.startAngle)/2;return e[0]=.99*c*(n<Math.PI?1:-1),"translate("+e+")"})).style("text-anchor",(function(t){return t.startAngle+(t.endAngle-t.startAngle)/2<Math.PI?"start":"end"})).style("font-size","12px");var _=document.createElement("div");_.style.padding="10px",_.style.paddingTop="0px",_.style.fontSize="13px";for(var y=0;y<n.length;y++){var v=n[y],m=e.statData(v).get(t.properties.id);if(m&&m.value){var x="<strong>"+e.catLabels_[v]+"</strong>: "+m.value.toFixed()+"<br>";_.innerHTML=_.innerHTML+x}}var b=a(t.properties.id);_.innerHTML=_.innerHTML+"<hr><strong>Total</strong>: ".concat(b.toFixed()," <br>"),o.node().appendChild(_)}else o.append("div").html(e.noDataText())},e}(e):"spark"==t?function(t){var e=Ou(t,!0);e.sparkLineColor_="black",e.sparkAreaColor_="#41afaa",e.sparkLineWidth_=30,e.sparkLineHeight_=20,e.sparkLineStrokeWidth_=.4,e.sparkLineOpacity_=.6,e.sparkType_="line",e.sparkLineCircleRadius_=0,e.sparkTooltipChart_={width:100,height:50,margin:{left:60,right:40,top:40,bottom:40},circleRadius:1.5},e.showOnlyWhenComplete_=!1,e.statSpark_=null,e.sparkHeightClassifier_=null,["sparkLineColor_","showOnlyWhenComplete_","sparkType_","sparkLineWidth_","sparkLineHeight_","sparkLineStrokeWidth_","sparkLineOpacity_","sparkLineCircleRadius_","sparkLineAreaColor_","sparkTooltipChart_"].forEach((function(t){e[t.substring(0,t.length-1)]=function(n){return arguments.length?(e[t]=n,e):e[t]}})),t&&["sparkLineColor","showOnlyWhenComplete","sparkType","sparkLineWidth","sparkLineHeight","sparkLineStrokeWidth","sparkLineOpacity","sparkLineCircleRadius_","sparkLineAreaColor","sparkTooltipChart_"].forEach((function(n){null!=t[n]&&e[n](t[n])})),e.statSpark=function(t,r,i){t.filters=t.filters||{};for(var a=0;a<r.length;a++){var o=r[a];t.filters.time=o;var l={};for(var s in t)l[s]=t[s];for(var u in l.filters={},t.filters)l.filters[u]=t.filters[u];e.stat(o,l),i&&(e.catLabels_=e.catLabels_||{},e.catLabels_[o]=i[a])}return n=r,e};var n=void 0,r=function(t){for(var r=[],i=0,a=0;a<n.length;a++){var o=n[a],l=e.statData(o).get(t);if(!l||0!=l.value&&!l.value||isNaN(l.value)){if(e.showOnlyWhenComplete())return}else r.push({date:o,value:l.value}),i+=l.value}if(0!=i)return r};e.updateClassification=function(){if(!n){var t=(n=Object.keys(e.statData_)).indexOf("default");t>-1&&n.splice(t,1)}var r,a=(r=[],e.svg().selectAll("#g_ps").selectAll("g.symbol").data().forEach((function(t){var e=t.properties.id,n=i(e);n&&r.push(n)})),xt(r));return e.widthClassifier_=_n().domain(a).range([0,e.sparkLineWidth_]),e.heightClassifier_=_n().domain(a).range([0,e.sparkLineHeight_]),e},e.updateStyle=function(){var t=[],i=(e.svg().selectAll("#g_ps").selectAll("g.symbol").attr("id",(function(e){return t.push(e.properties.id),"spark_"+e.properties.id})),"WORLD"==e.geo_?"path.worldrg":"path.nutsrg");return e.svg().selectAll(i).on("mouseover",(function(t){if(r(t.properties.id))if(e.countriesToShow_){if(e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])){var n=dt(this);n.attr("fill___",n.attr("fill")),n.attr("fill",e.nutsrgSelFillSty_),e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))}}else e._tooltip&&e._tooltip.mouseover(e.tooltip_.textFunction(t,e))})).on("mousemove",(function(t){r(t.properties.id)&&(e.countriesToShow_?e.countriesToShow_.includes(t.properties.id[0]+t.properties.id[1])&&e._tooltip&&e._tooltip.mousemove():e._tooltip&&e._tooltip.mousemove())})).on("mouseout",(function(){var t=dt(this);t.attr("fill"),t.attr("fill___")&&(t.attr("fill",t.attr("fill___")),e._tooltip&&e._tooltip.mouseout())})),t.forEach((function(t){var i=e.svg().select("#spark_"+t),a=r(t);a&&function(t,r){var i,a,o,l,s=xt(r.map((function(t){return t.value})));"area"==e.sparkType_?(l=e.widthClassifier_(s[1]),o=e.heightClassifier_(s[1]),a=cn().domain(s).range([o-.5,0]),i=cn().domain([0,n.length-1]).range([.5,l-.5])):(l=e.sparkLineWidth_,o=e.sparkLineHeight_,a=cn().domain(s).range([e.sparkLineHeight_-.5,0]),i=cn().domain([0,n.length-1]).range([.5,e.sparkLineWidth_-.5])),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",kn(e.sparkAreaColor_)==Function?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("d",Ys().x((function(t,e){return i(e)})).y0(o).y1((function(t){return a(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")})),t.append("path").datum(r).attr("fill","none").attr("opacity",e.sparkLineOpacity_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",e.sparkLineStrokeWidth_+"px").attr("d",Vs().x((function(t,e){return i(e)})).y((function(t){return a(t.value)}))).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")})),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return i(e)})).attr("cy",(function(t){return a(t.value)})).attr("r",e.sparkLineCircleRadius_).attr("transform",(function(t){return"translate(0,-".concat(o/2,")")}))}(i,a)})),e};var i=function(t){for(var r,i=0,a=0;a<n.length;a++){var o=n[a];if(!(r=e.statData(o).get(t))||0!=r.value&&!r.value||isNaN(r.value)){if(e.showOnlyWhenComplete())return}else r.value>i&&(i=r.value)}if(0!=i)return i};return e.getLegendConstructor=function(){return Wu},e.tooltip_.textFunction=function(t,i){var a=dt("#tooltip_eurostat");a.html(""),a.selectAll("*").remove(),t.properties.id?a.append("div").html("<b>"+t.properties.na+"</b> ("+t.properties.id+") <br>"):a.append("div").html("<b>"+t.properties.na+"</b><br>");var o=e.sparkTooltipChart_.height,l=e.sparkTooltipChart_.width,s=e.sparkTooltipChart_.margin,u=r(t.properties.id);u&&function(t,r,i,a){var o,l=xt(r.map((function(t){return t.value}))),s=cn().domain(l).range([a-.5,0]),u=cn().domain([n[0],n[n.length-1]]).range([.5,i-.5]);t.append("g").attr("class","axis").attr("transform","translate(0,"+a+")").call((o=u,ss(3,o)).ticks(n.length).tickFormat(rn(".0f"))).selectAll("text").style("text-anchor","end").attr("dx","-.8em").attr("dy",".15em").attr("transform","rotate(-65)");var c=s.domain(),f=[c[0],((c[0]+c[1])/2).toFixed(1),c[1]];t.append("g").attr("class","axis").call(function(t){return ss(4,t)}(s).tickValues(f).tickFormat(rn(",.2r"))),"area"==e.sparkType_&&t.append("path").datum(r).attr("fill",kn(e.sparkAreaColor_)==Function?function(t,n){return e.sparkAreaColor_(t,n)}:e.sparkAreaColor_).attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",1).attr("opacity",e.sparkLineOpacity_).attr("fill-opacity",.3).attr("stroke","none").attr("stroke","none").attr("d",Ys().x((function(t,e){return u(t.date)})).y0(a).y1((function(t){return s(t.value)}))),t.append("path").datum(r).attr("fill","none").attr("stroke",kn(e.sparkLineColor_)==Function?function(t,n){return e.sparkLineColor_(t,n)}:e.sparkLineColor_).attr("stroke-width",1).attr("d",Vs().x((function(t,e){return u(t.date)})).y((function(t){return s(t.value)}))),t.selectAll("myCircles").data(r).enter().append("circle").attr("fill","red").attr("stroke","none").attr("cx",(function(t,e){return u(t.date)})).attr("cy",(function(t){return s(t.value)})).attr("r",e.sparkTooltipChart_.circleRadius)}(a.append("svg").attr("width",l+s.left+s.right).attr("height",o+s.top+s.bottom).append("g").attr("transform","translate("+s.left+","+s.top+")"),u,l,o)},e}(e):(console.log("Unexpected map type: "+t),Ou(e,!0))},xc=function(t){(t=t||{}).shape=t.shape||"circle";var e=t.patternSize||5,n=t.minSize||1,r=t.maxSize||5.5;return t.bckColor=t.bckColor||"white",t.symbColor=t.symbColor||"black",function(i,a){i.selectAll(".estatmapPattern").remove();for(var o=0;o<a;o++){var l=n+(r-n)*o/(a-1),s=i.append("pattern").attr("class","estatmapPattern").attr("id","pattern_"+o).attr("x","0").attr("y","0").attr("width",e).attr("height",e).attr("patternUnits","userSpaceOnUse");s.append("rect").attr("x",0).attr("y",0).attr("width",e).attr("height",e).style("stroke","none").style("fill",t.bckColor),"square"==t.shape?s.append("rect").attr("x",0).attr("y",0).attr("width",l).attr("height",l).style("stroke","none").style("fill",t.symbColor):s.append("circle").attr("cx",.5*e).attr("cy",.5*e).attr("r",.5*l).style("stroke","none").style("fill",t.symbColor)}}};return e}()}));