gridviz 2.0.2 → 2.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.gviz=e():t.gviz=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="build/",n(n.s=9)}({10:function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"App",(function(){return xo})),n.d(e,"Layer",(function(){return vr})),n.d(e,"Dataset",(function(){return cr})),n.d(e,"DatasetComponent",(function(){return rr})),n.d(e,"schemeCategory10",(function(){return _o})),n.d(e,"schemeAccent",(function(){return ko})),n.d(e,"schemeDark2",(function(){return Co})),n.d(e,"schemePaired",(function(){return Oo})),n.d(e,"schemePastel1",(function(){return Po})),n.d(e,"schemePastel2",(function(){return Mo})),n.d(e,"schemeSet1",(function(){return jo})),n.d(e,"schemeSet2",(function(){return Ao})),n.d(e,"schemeSet3",(function(){return Eo})),n.d(e,"schemeTableau10",(function(){return To})),n.d(e,"interpolateBrBG",(function(){return Fo})),n.d(e,"schemeBrBG",(function(){return zo})),n.d(e,"interpolatePRGn",(function(){return No})),n.d(e,"schemePRGn",(function(){return Io})),n.d(e,"interpolatePiYG",(function(){return Bo})),n.d(e,"schemePiYG",(function(){return Lo})),n.d(e,"interpolatePuOr",(function(){return Go})),n.d(e,"schemePuOr",(function(){return Do})),n.d(e,"interpolateRdBu",(function(){return Wo})),n.d(e,"schemeRdBu",(function(){return Zo})),n.d(e,"interpolateRdGy",(function(){return $o})),n.d(e,"schemeRdGy",(function(){return Uo})),n.d(e,"interpolateRdYlBu",(function(){return Vo})),n.d(e,"schemeRdYlBu",(function(){return Yo})),n.d(e,"interpolateRdYlGn",(function(){return Xo})),n.d(e,"schemeRdYlGn",(function(){return Ho})),n.d(e,"interpolateSpectral",(function(){return Ko})),n.d(e,"schemeSpectral",(function(){return qo})),n.d(e,"interpolateBuGn",(function(){return Qo})),n.d(e,"schemeBuGn",(function(){return Jo})),n.d(e,"interpolateBuPu",(function(){return ei})),n.d(e,"schemeBuPu",(function(){return ti})),n.d(e,"interpolateGnBu",(function(){return ri})),n.d(e,"schemeGnBu",(function(){return ni})),n.d(e,"interpolateOrRd",(function(){return ii})),n.d(e,"schemeOrRd",(function(){return oi})),n.d(e,"interpolatePuBuGn",(function(){return fi})),n.d(e,"schemePuBuGn",(function(){return ai})),n.d(e,"interpolatePuBu",(function(){return ui})),n.d(e,"schemePuBu",(function(){return ci})),n.d(e,"interpolatePuRd",(function(){return si})),n.d(e,"schemePuRd",(function(){return li})),n.d(e,"interpolateRdPu",(function(){return di})),n.d(e,"schemeRdPu",(function(){return hi})),n.d(e,"interpolateYlGnBu",(function(){return pi})),n.d(e,"schemeYlGnBu",(function(){return yi})),n.d(e,"interpolateYlGn",(function(){return vi})),n.d(e,"schemeYlGn",(function(){return bi})),n.d(e,"interpolateYlOrBr",(function(){return mi})),n.d(e,"schemeYlOrBr",(function(){return gi})),n.d(e,"interpolateYlOrRd",(function(){return xi})),n.d(e,"schemeYlOrRd",(function(){return wi})),n.d(e,"interpolateBlues",(function(){return _i})),n.d(e,"schemeBlues",(function(){return Si})),n.d(e,"interpolateGreens",(function(){return Ci})),n.d(e,"schemeGreens",(function(){return ki})),n.d(e,"interpolateGreys",(function(){return Pi})),n.d(e,"schemeGreys",(function(){return Oi})),n.d(e,"interpolatePurples",(function(){return ji})),n.d(e,"schemePurples",(function(){return Mi})),n.d(e,"interpolateReds",(function(){return Ei})),n.d(e,"schemeReds",(function(){return Ai})),n.d(e,"interpolateOranges",(function(){return Ri})),n.d(e,"schemeOranges",(function(){return Ti})),n.d(e,"interpolateCividis",(function(){return zi})),n.d(e,"interpolateCubehelixDefault",(function(){return Vi})),n.d(e,"interpolateRainbow",(function(){return Ki})),n.d(e,"interpolateWarm",(function(){return Hi})),n.d(e,"interpolateCool",(function(){return Xi})),n.d(e,"interpolateSinebow",(function(){return ea})),n.d(e,"interpolateTurbo",(function(){return na})),n.d(e,"interpolateViridis",(function(){return oa})),n.d(e,"interpolateMagma",(function(){return ia})),n.d(e,"interpolateInferno",(function(){return aa})),n.d(e,"interpolatePlasma",(function(){return fa})),n.d(e,"TiledGrid",(function(){return co})),n.d(e,"CSVGrid",(function(){return $r})),n.d(e,"ShapeColorSizeStyle",(function(){return ba})),n.d(e,"StrokeStyle",(function(){return Ca})),n.d(e,"JoyPlotStyle",(function(){return za})),n.d(e,"CompositionStyle",(function(){return Ua})),n.d(e,"SegmentStyle",(function(){return Qa})),n.d(e,"TextStyle",(function(){return uf})),n.d(e,"KernelSmoothingStyle",(function(){return gf})),n.d(e,"PillarStyle",(function(){return Pf})),n.d(e,"SideStyle",(function(){return If})),n.d(e,"DotDensityStyle",(function(){return Kf})),n.d(e,"TanakaStyle",(function(){return ac})),n.d(e,"LegoStyle",(function(){return vc})),n.d(e,"SquareColorWGLStyle2",(function(){return oc})),n.d(e,"SquareColorWGLStyle",(function(){return Pc})),n.d(e,"MosaicStyle",(function(){return Ic})),n.d(e,"LabelLayer",(function(){return ho})),n.d(e,"BoundaryLayer",(function(){return vo})),n.d(e,"ColorLegend",(function(){return eu})),n.d(e,"ColorCategoryLegend",(function(){return cu})),n.d(e,"SizeLegend",(function(){return pu})),n.d(e,"SegmentWidthLegend",(function(){return Su})),n.d(e,"goToStraight",(function(){return ku})),n.d(e,"zoomTo",(function(){return _u})),n.d(e,"sPow",(function(){return Cu})),n.d(e,"sPowRev",(function(){return Ou})),n.d(e,"sExp",(function(){return Pu})),n.d(e,"sExpRev",(function(){return Mu})),n.d(e,"sCircleLow",(function(){return ju})),n.d(e,"sCircleHigh",(function(){return Au})),n.d(e,"getEuronymeLabelLayer",(function(){return Yl})),n.d(e,"getEurostatBoundariesLayer",(function(){return Vl}));var o=function(t){return null==t?r:function(){return this.querySelector(t)}};function i(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function a(){return[]}var f=function(t){return null==t?a:function(){return this.querySelectorAll(t)}};var c=function(t){return function(){return this.matches(t)}};function u(t){return function(e){return e.matches(t)}}var l=Array.prototype.find;function s(){return this.firstElementChild}var h=Array.prototype.filter;function d(){return Array.from(this.children)}var y=function(t){return new Array(t.length)};function p(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}p.prototype={constructor:p,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 b=function(t){return function(){return t}};function v(t,e,n,r,o,i){for(var a,f=0,c=e.length,u=i.length;f<u;++f)(a=e[f])?(a.__data__=i[f],r[f]=a):n[f]=new p(t,i[f]);for(;f<c;++f)(a=e[f])&&(o[f]=a)}function g(t,e,n,r,o,i,a){var f,c,u,l=new Map,s=e.length,h=i.length,d=new Array(s);for(f=0;f<s;++f)(c=e[f])&&(d[f]=u=a.call(c,c.__data__,f,e)+"",l.has(u)?o[f]=c:l.set(u,c));for(f=0;f<h;++f)u=a.call(t,i[f],f,i)+"",(c=l.get(u))?(r[f]=c,c.__data__=i[f],l.delete(u)):n[f]=new p(t,i[f]);for(f=0;f<s;++f)(c=e[f])&&l.get(d[f])===c&&(o[f]=c)}function m(t){return t.__data__}function w(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function x(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var S="http://www.w3.org/1999/xhtml",_={svg:"http://www.w3.org/2000/svg",xhtml:S,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},k=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),_.hasOwnProperty(e)?{space:_[e],local:t}:t};function C(t){return function(){this.removeAttribute(t)}}function O(t){return function(){this.removeAttributeNS(t.space,t.local)}}function P(t,e){return function(){this.setAttribute(t,e)}}function M(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function j(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function A(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)}}var E=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function T(t){return function(){this.style.removeProperty(t)}}function R(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)||E(t).getComputedStyle(t,null).getPropertyValue(e)}function I(t){return function(){delete this[t]}}function N(t,e){return function(){this[t]=e}}function L(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function B(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=B(t.getAttribute("class")||"")}function Z(t,e){for(var n=D(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function W(t,e){for(var n=D(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function U(t){return function(){Z(this,t)}}function $(t){return function(){W(this,t)}}function Y(t,e){return function(){(e.apply(this,arguments)?Z:W)(this,t)}}G.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}};function V(){this.textContent=""}function H(t){return function(){this.textContent=t}}function X(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function K(t){return function(){this.innerHTML=t}}function J(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Q(){this.nextSibling&&this.parentNode.appendChild(this)}function tt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===S&&e.documentElement.namespaceURI===S?e.createElement(t):e.createElementNS(n,t)}}function nt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var rt=function(t){var e=k(t);return(e.local?nt:et)(e)};function ot(){return null}function it(){var t=this.parentNode;t&&t.removeChild(this)}function at(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ft(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ct(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 ut(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function lt(t,e,n){return function(){var r,o=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var a=0,f=o.length;a<f;++a)if((r=o[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function st(t,e,n){var r=E(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ht(t,e){return function(){return st(this,t,e)}}function dt(t,e){return function(){return st(this,t,e.apply(this,arguments))}}var yt=[null];function pt(t,e){this._groups=t,this._parents=e}function bt(){return new pt([[document.documentElement]],yt)}pt.prototype=bt.prototype={constructor:pt,select:function(t){"function"!=typeof t&&(t=o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,f,c=e[i],u=c.length,l=r[i]=new Array(u),s=0;s<u;++s)(a=c[s])&&(f=t.call(a,a.__data__,s,c))&&("__data__"in a&&(f.__data__=a.__data__),l[s]=f);return new pt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return i(t.apply(this,arguments))}}(t):f(t);for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var c,u=e[a],l=u.length,s=0;s<l;++s)(c=u[s])&&(r.push(t.call(c,c.__data__,s,u)),o.push(c));return new pt(r,o)},selectChild:function(t){return this.select(null==t?s:function(t){return function(){return l.call(this.children,t)}}("function"==typeof t?t:u(t)))},selectChildren:function(t){return this.selectAll(null==t?d:function(t){return function(){return h.call(this.children,t)}}("function"==typeof t?t:u(t)))},filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],f=a.length,u=r[o]=[],l=0;l<f;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new pt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,m);var n=e?g:v,r=this._parents,o=this._groups;"function"!=typeof t&&(t=b(t));for(var i=o.length,a=new Array(i),f=new Array(i),c=new Array(i),u=0;u<i;++u){var l=r[u],s=o[u],h=s.length,d=w(t.call(l,l&&l.__data__,u,r)),y=d.length,p=f[u]=new Array(y),x=a[u]=new Array(y),S=c[u]=new Array(h);n(l,s,p,x,S,d,e);for(var _,k,C=0,O=0;C<y;++C)if(_=p[C]){for(C>=O&&(O=C+1);!(k=x[O])&&++O<y;);_._next=k||null}}return(a=new pt(a,r))._enter=f,a._exit=c,a},enter:function(){return new pt(this._enter||this._groups.map(y),this._parents)},exit:function(){return new pt(this._exit||this._groups.map(y),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),c=0;c<a;++c)for(var u,l=n[c],s=r[c],h=l.length,d=f[c]=new Array(h),y=0;y<h;++y)(u=l[y]||s[y])&&(d[y]=u);for(;c<o;++c)f[c]=n[c];return new pt(f,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=x);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,f=n[i],c=f.length,u=o[i]=new Array(c),l=0;l<c;++l)(a=f[l])&&(u[l]=a);u.sort(e)}return new pt(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,f=i.length;a<f;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=k(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?O:C:"function"==typeof e?n.local?A:j:n.local?M:P)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?T:"function"==typeof e?z:R)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?I:"function"==typeof e?L:N)(t,e)):this.node()[t]},classed:function(t,e){var n=B(t+"");if(arguments.length<2){for(var r=D(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?Y:e?U:$)(n,e))},text:function(t){return arguments.length?this.each(null==t?V:("function"==typeof t?X:H)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?J:K)(t)):this.node().innerHTML},raise:function(){return this.each(Q)},lower:function(){return this.each(tt)},append:function(t){var e="function"==typeof t?t:rt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:rt(t),r=null==e?ot:"function"==typeof e?e:o(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(it)},clone:function(t){return this.select(t?ft:at)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=ct(t+""),a=i.length;if(!(arguments.length<2)){for(f=e?lt:ut,r=0;r<a;++r)this.each(f(i[r],e,n));return this}var f=this.node().__on;if(f)for(var c,u=0,l=f.length;u<l;++u)for(r=0,c=f[u];r<a;++r)if((o=i[r]).type===c.type&&o.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?dt:ht)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,o=t[e],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};var vt=bt,gt=function(t){return"string"==typeof t?new pt([[document.querySelector(t)]],[document.documentElement]):new pt([[t]],yt)},mt={value:()=>{}};function wt(){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 xt(r)}function xt(t){this._=t}function St(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 _t(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function kt(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=mt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}xt.prototype=wt.prototype={constructor:xt,on:function(t,e){var n,r=this._,o=St(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=kt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=kt(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=_t(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var Ct=wt;const Ot={capture:!0,passive:!1};var Pt=function(t){t.preventDefault(),t.stopImmediatePropagation()},Mt=function(t){var e=t.document.documentElement,n=gt(t).on("dragstart.drag",Pt,Ot);"onselectstart"in e?n.on("selectstart.drag",Pt,Ot):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function jt(t,e){var n=t.document.documentElement,r=gt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pt,Ot),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function At(t){return((t=Math.exp(t))+1/t)/2}var Et,Tt,Rt=function t(e,n,r){function o(t,o){var i,a,f=t[0],c=t[1],u=t[2],l=o[0],s=o[1],h=o[2],d=l-f,y=s-c,p=d*d+y*y;if(p<1e-12)a=Math.log(h/u)/e,i=function(t){return[f+t*d,c+t*y,u*Math.exp(e*t*a)]};else{var b=Math.sqrt(p),v=(h*h-u*u+r*p)/(2*u*n*b),g=(h*h-u*u-r*p)/(2*h*n*b),m=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(g*g+1)-g);a=(w-m)/e,i=function(t){var r,o=t*a,i=At(m),l=u/(n*b)*(i*(r=e*o+m,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[f+l*d,c+l*y,u*i/At(e*o+m)]}}return i.duration=1e3*a*e/Math.SQRT2,i}return o.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},o}(Math.SQRT2,2,4),zt=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]},Ft=0,It=0,Nt=0,Lt=0,Bt=0,Dt=0,Gt="object"==typeof performance&&performance.now?performance:Date,Zt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return Bt||(Zt(Ut),Bt=Gt.now()+Dt)}function Ut(){Bt=0}function $t(){this._call=this._time=this._next=null}function Yt(t,e,n){var r=new $t;return r.restart(t,e,n),r}function Vt(){Bt=(Lt=Gt.now())+Dt,Ft=It=0;try{!function(){Wt(),++Ft;for(var t,e=Et;e;)(t=Bt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ft}()}finally{Ft=0,function(){var t,e,n=Et,r=1/0;for(;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:Et=e);Tt=t,Xt(r)}(),Bt=0}}function Ht(){var t=Gt.now(),e=t-Lt;e>1e3&&(Dt-=e,Lt=t)}function Xt(t){Ft||(It&&(It=clearTimeout(It)),t-Bt>24?(t<1/0&&(It=setTimeout(Vt,t-Gt.now()-Dt)),Nt&&(Nt=clearInterval(Nt))):(Nt||(Lt=Gt.now(),Nt=setInterval(Ht,1e3)),Ft=1,Zt(Vt)))}$t.prototype=Yt.prototype={constructor:$t,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Tt===this||(Tt?Tt._next=this:Et=this,Tt=this),this._call=t,this._time=n,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var qt=function(t,e,n){var r=new $t;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r},Kt=Ct("start","end","cancel","interrupt"),Jt=[],Qt=function(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(c){var u,l,s,h;if(1!==n.state)return f();for(u in o)if((h=o[u]).name===n.name){if(3===h.state)return qt(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[u])}if(qt((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(s=n.tween.length),u=0,l=-1;u<s;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(f),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),f())}function f(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Yt((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:o,on:Kt,tween:Jt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})};function te(t,e){var n=ne(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ee(t,e){var n=ne(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ne(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var re,oe=function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).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 i[o]):a=!1;a&&delete t.__transition}},ie=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},ae=180/Math.PI,fe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ce=function(t,e,n,r,o,i){var a,f,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,c/=f),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*ae,skewX:Math.atan(c)*ae,scaleX:a,scaleY:f}};function ue(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var f=[],c=[];return i=t(i),a=t(a),function(t,r,o,i,a,f){if(t!==o||r!==i){var c=a.push("translate(",null,e,null,n);f.push({i:c-4,x:ie(t,o)},{i:c-2,x:ie(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,f,c),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:ie(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,f,c),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:ie(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,f,c),function(t,e,n,r,i,a){if(t!==n||e!==r){var f=i.push(o(i)+"scale(",null,",",null,")");a.push({i:f-4,x:ie(t,n)},{i:f-2,x:ie(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,f,c),i=a=null,function(t){for(var e,n=-1,r=c.length;++n<r;)f[(e=c[n]).i]=e.x(t);return f.join("")}}}var le=ue((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?fe:ce(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),se=ue((function(t){return null==t?fe:(re||(re=document.createElementNS("http://www.w3.org/2000/svg","g")),re.setAttribute("transform",t),(t=re.transform.baseVal.consolidate())?(t=t.matrix,ce(t.a,t.b,t.c,t.d,t.e,t.f)):fe)}),", ",")",")");function he(t,e){var n,r;return function(){var o=ee(this,t),i=o.tween;if(i!==n)for(var a=0,f=(r=n=i).length;a<f;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function de(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=ee(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},c=0,u=o.length;c<u;++c)if(o[c].name===e){o[c]=f;break}c===u&&o.push(f)}i.tween=o}}function ye(t,e,n){var r=t._id;return t.each((function(){var t=ee(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ne(t,r).value[e]}}var pe=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function be(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ve(){}var ge="\\s*([+-]?\\d+)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xe=/^#([0-9a-f]{3,8})$/,Se=new RegExp(`^rgb\\(${ge},${ge},${ge}\\)$`),_e=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),ke=new RegExp(`^rgba\\(${ge},${ge},${ge},${me}\\)$`),Ce=new RegExp(`^rgba\\(${we},${we},${we},${me}\\)$`),Oe=new RegExp(`^hsl\\(${me},${we},${we}\\)$`),Pe=new RegExp(`^hsla\\(${me},${we},${we},${me}\\)$`),Me={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 je(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=xe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Te(e):3===n?new Ie(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Re(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Re(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=Se.exec(t))?new Ie(e[1],e[2],e[3],1):(e=_e.exec(t))?new Ie(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ke.exec(t))?Re(e[1],e[2],e[3],e[4]):(e=Ce.exec(t))?Re(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Oe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,1):(e=Pe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,e[4]):Me.hasOwnProperty(t)?Te(Me[t]):"transparent"===t?new Ie(NaN,NaN,NaN,0):null}function Te(t){return new Ie(t>>16&255,t>>8&255,255&t,1)}function Re(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ie(t,e,n,r)}function ze(t){return t instanceof ve||(t=Ee(t)),t?new Ie((t=t.rgb()).r,t.g,t.b,t.opacity):new Ie}function Fe(t,e,n,r){return 1===arguments.length?ze(t):new Ie(t,e,n,null==r?1:r)}function Ie(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ne(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}`}function Le(){const t=Be(this.opacity);return`${1===t?"rgb(":"rgba("}${De(this.r)}, ${De(this.g)}, ${De(this.b)}${1===t?")":`, ${t})`}`}function Be(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function De(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ge(t){return((t=De(t))<16?"0":"")+t.toString(16)}function Ze(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,r)}function We(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof ve||(t=Ee(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,c=(i+o)/2;return f?(a=e===i?(n-r)/f+6*(n<r):n===i?(r-e)/f+2:(e-n)/f+4,f/=c<.5?i+o:2-i-o,a*=60):f=c>0&&c<1?0:a,new Ue(a,f,c,t.opacity)}function Ue(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(t){return(t=(t||0)%360)<0?t+360:t}function Ye(t){return Math.max(0,Math.min(1,t||0))}function Ve(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 He(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}pe(ve,Ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:je,formatHex:je,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return We(this).formatHsl()},formatRgb:Ae,toString:Ae}),pe(Ie,Fe,be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ie(De(this.r),De(this.g),De(this.b),Be(this.opacity))},displayable(){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:Ne,formatHex:Ne,formatHex8:function(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}${Ge(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Le,toString:Le})),pe(Ue,(function(t,e,n,r){return 1===arguments.length?We(t):new Ue(t,e,n,null==r?1:r)}),be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){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,o=2*n-r;return new Ie(Ve(t>=240?t-240:t+120,o,r),Ve(t,o,r),Ve(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new Ue($e(this.h),Ye(this.s),Ye(this.l),Be(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Be(this.opacity);return`${1===t?"hsl(":"hsla("}${$e(this.h)}, ${100*Ye(this.s)}%, ${100*Ye(this.l)}%${1===t?")":`, ${t})`}`}}));var Xe=t=>()=>t;function qe(t,e){return function(n){return t+n*e}}function Ke(t){return 1==(t=+t)?Je: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):Xe(isNaN(e)?n:e)}}function Je(t,e){var n=e-t;return n?qe(t,n):Xe(isNaN(t)?e:t)}var Qe=function t(e){var n=Ke(e);function r(t,e){var r=n((t=Fe(t)).r,(e=Fe(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=Je(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function tn(t){return function(e){var n,r,o=e.length,i=new Array(o),a=new Array(o),f=new Array(o);for(n=0;n<o;++n)r=Fe(e[n]),i[n]=r.r||0,a[n]=r.g||0,f[n]=r.b||0;return i=t(i),a=t(a),f=t(f),r.opacity=1,function(t){return r.r=i(t),r.g=a(t),r.b=f(t),r+""}}}var en=tn((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),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return He((n-r/e)*e,a,o,i,f)}})),nn=(tn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return He((n-r/e)*e,o,i,a,f)}})),/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g),rn=new RegExp(nn.source,"g");var on=function(t,e){var n,r,o,i=nn.lastIndex=rn.lastIndex=0,a=-1,f=[],c=[];for(t+="",e+="";(n=nn.exec(t))&&(r=rn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),f[a]?f[a]+=o:f[++a]=o),(n=n[0])===(r=r[0])?f[a]?f[a]+=r:f[++a]=r:(f[++a]=null,c.push({i:a,x:ie(n,r)})),i=rn.lastIndex;return i<e.length&&(o=e.slice(i),f[a]?f[a]+=o:f[++a]=o),f.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)f[(n=c[r]).i]=n.x(t);return f.join("")})},an=function(t,e){var n;return("number"==typeof e?ie:e instanceof Ee?Qe:(n=Ee(e))?(e=n,Qe):on)(t,e)};function fn(t){return function(){this.removeAttribute(t)}}function cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function un(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ln(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function sn(t,e,n){var r,o,i;return function(){var a,f,c=n(this);if(null!=c)return(a=this.getAttribute(t))===(f=c+"")?null:a===r&&f===o?i:(o=f,i=e(r=a,c));this.removeAttribute(t)}}function hn(t,e,n){var r,o,i;return function(){var a,f,c=n(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(f=c+"")?null:a===r&&f===o?i:(o=f,i=e(r=a,c));this.removeAttributeNS(t.space,t.local)}}function dn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function pn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yn(t,o)),n}return o._value=e,o}function bn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&dn(t,o)),n}return o._value=e,o}function vn(t,e){return function(){te(this,t).delay=+e.apply(this,arguments)}}function gn(t,e){return e=+e,function(){te(this,t).delay=e}}function mn(t,e){return function(){ee(this,t).duration=+e.apply(this,arguments)}}function wn(t,e){return e=+e,function(){ee(this,t).duration=e}}function xn(t,e){if("function"!=typeof e)throw new Error;return function(){ee(this,t).ease=e}}function Sn(t,e,n){var r,o,i=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)?te:ee;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}var _n=vt.prototype.constructor;function kn(t){return function(){this.style.removeProperty(t)}}function Cn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function On(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Cn(t,i,n)),r}return i._value=e,i}function Pn(t){return function(e){this.textContent=t.call(this,e)}}function Mn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Pn(r)),e}return r._value=t,r}var jn=0;function An(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function En(){return++jn}var Tn=vt.prototype;An.prototype=function(t){return vt().transition(t)}.prototype={constructor:An,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=o(t));for(var r=this._groups,i=r.length,a=new Array(i),f=0;f<i;++f)for(var c,u,l=r[f],s=l.length,h=a[f]=new Array(s),d=0;d<s;++d)(c=l[d])&&(u=t.call(c,c.__data__,d,l))&&("__data__"in c&&(u.__data__=c.__data__),h[d]=u,Qt(h[d],e,n,d,h,ne(c,n)));return new An(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,o=r.length,i=[],a=[],c=0;c<o;++c)for(var u,l=r[c],s=l.length,h=0;h<s;++h)if(u=l[h]){for(var d,y=t.call(u,u.__data__,h,l),p=ne(u,n),b=0,v=y.length;b<v;++b)(d=y[b])&&Qt(d,e,n,b,y,p);i.push(y),a.push(u)}return new An(i,a,e,n)},selectChild:Tn.selectChild,selectChildren:Tn.selectChildren,filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],f=a.length,u=r[o]=[],l=0;l<f;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new An(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,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var c,u=e[f],l=n[f],s=u.length,h=a[f]=new Array(s),d=0;d<s;++d)(c=u[d]||l[d])&&(h[d]=c);for(;f<r;++f)a[f]=e[f];return new An(a,this._parents,this._name,this._id)},selection:function(){return new _n(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=En(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,f=r[i],c=f.length,u=0;u<c;++u)if(a=f[u]){var l=ne(a,e);Qt(a,t,n,u,f,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new An(r,this._parents,t,n)},call:Tn.call,nodes:Tn.nodes,node:Tn.node,size:Tn.size,empty:Tn.empty,each:Tn.each,on:function(t,e){var n=this._id;return arguments.length<2?ne(this.node(),n).on.on(t):this.each(Sn(n,t,e))},attr:function(t,e){var n=k(t),r="transform"===n?se:an;return this.attrTween(t,"function"==typeof e?(n.local?hn:sn)(n,r,ye(this,"attr."+t,e)):null==e?(n.local?cn:fn)(n):(n.local?ln:un)(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=k(t);return this.tween(n,(r.local?pn:bn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?le:an;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=F(this,t),a=(this.style.removeProperty(t),F(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,kn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=F(this,t),f=n(this),c=f+"";return null==f&&(this.style.removeProperty(t),c=f=F(this,t)),a===c?null:a===r&&c===o?i:(o=c,i=e(r=a,f))}}(t,r,ye(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,f="end."+a;return function(){var c=ee(this,t),u=c.on,l=null==c.value[a]?i||(i=kn(e)):void 0;u===n&&o===l||(r=(n=u).copy()).on(f,o=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=F(this,t);return a===i?null:a===r?o:o=e(r=a,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,On(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}}(ye(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,Mn(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=ne(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?he:de)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?vn:gn)(e,t)):ne(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?mn:wn)(e,t)):ne(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(xn(e,t)):ne(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ee(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var f={value:a},c={value:function(){0==--o&&i()}};n.each((function(){var n=ee(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(f),e._.interrupt.push(f),e._.end.push(c)),n.on=e})),0===o&&i()}))},[Symbol.iterator]:Tn[Symbol.iterator]};var Rn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function zn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}vt.prototype.interrupt=function(t){return this.each((function(){oe(this,t)}))},vt.prototype.transition=function(t){var e,n;t instanceof An?(e=t._id,t=t._name):(e=En(),(n=Rn).time=Wt(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,f=r[i],c=f.length,u=0;u<c;++u)(a=f[u])&&Qt(a,t,e,u,f,n||zn(a,e));return new An(r,this._parents,t,e)};var Fn=t=>()=>t;function In(t,{sourceEvent:e,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Nn(t,e,n){this.k=t,this.x=e,this.y=n}Nn.prototype={constructor:Nn,scale:function(t){return 1===t?this:new Nn(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Nn(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 Ln=new Nn(1,0,0);function Bn(t){t.stopImmediatePropagation()}Nn.prototype;var Dn=function(t){t.preventDefault(),t.stopImmediatePropagation()};function Gn(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Zn(){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 Wn(){return this.__zoom||Ln}function Un(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $n(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yn(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var Vn=function(){var t,e,n,r=Gn,o=Zn,i=Yn,a=Un,f=$n,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,s=Rt,h=Ct("start","zoom","end"),d=0,y=10;function p(t){t.property("__zoom",Wn).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(f).on("touchstart.zoom",C).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new Nn(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new Nn(t.k,r,o)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,e,n,r){t.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,a=w(t,i).event(r),f=o.apply(t,i),c=null==n?g(f):"function"==typeof n?n.apply(t,i):n,u=Math.max(f[1][0]-f[0][0],f[1][1]-f[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,d=s(l.invert(c).concat(u/l.k),h.invert(c).concat(u/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=u/e[2];t=new Nn(n,c[0]-e[0]*n,c[1]-e[1]*n)}a.zoom(null,t)}}))}function w(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.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function S(t,...e){if(r.apply(this,arguments)){var n=w(this,e).event(t),o=this.__zoom,f=Math.max(c[0],Math.min(c[1],o.k*Math.pow(2,a.apply(this,arguments)))),l=zt(t);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=o.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(o.k===f)return;n.mouse=[l,o.invert(l)],oe(this),n.start()}Dn(t),n.wheel=setTimeout(s,150),n.zoom("mouse",i(v(b(o,f),n.mouse[0],n.mouse[1]),n.extent,u))}function s(){n.wheel=null,n.end()}}function _(t,...e){if(!n&&r.apply(this,arguments)){var o=t.currentTarget,a=w(this,e,!0).event(t),f=gt(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",y,!0),c=zt(t,o),l=t.clientX,s=t.clientY;Mt(t.view),Bn(t),a.mouse=[c,this.__zoom.invert(c)],oe(this),a.start()}function h(t){if(Dn(t),!a.moved){var e=t.clientX-l,n=t.clientY-s;a.moved=e*e+n*n>d}a.event(t).zoom("mouse",i(v(a.that.__zoom,a.mouse[0]=zt(t,o),a.mouse[1]),a.extent,u))}function y(t){f.on("mousemove.zoom mouseup.zoom",null),jt(t.view,a.moved),Dn(t),a.event(t).end()}}function k(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=zt(t.changedTouches?t.changedTouches[0]:t,this),f=n.invert(a),c=n.k*(t.shiftKey?.5:2),s=i(v(b(n,c),a,f),o.apply(this,e),u);Dn(t),l>0?gt(this).transition().duration(l).call(m,s,a,t):gt(this).call(p.transform,s,a,t)}}function C(n,...o){if(r.apply(this,arguments)){var i,a,f,c,u=n.touches,l=u.length,s=w(this,o,n.changedTouches.length===l).event(n);for(Bn(n),a=0;a<l;++a)f=u[a],c=[c=zt(f,this),this.__zoom.invert(c),f.identifier],s.touch0?s.touch1||s.touch0[2]===c[2]||(s.touch1=c,s.taps=0):(s.touch0=c,i=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(s.taps<2&&(e=c[0],t=setTimeout((function(){t=null}),500)),oe(this),s.start())}}function O(t,...e){if(this.__zooming){var n,r,o,a,f=w(this,e).event(t),c=t.changedTouches,l=c.length;for(Dn(t),n=0;n<l;++n)r=c[n],o=zt(r,this),f.touch0&&f.touch0[2]===r.identifier?f.touch0[0]=o:f.touch1&&f.touch1[2]===r.identifier&&(f.touch1[0]=o);if(r=f.that.__zoom,f.touch1){var s=f.touch0[0],h=f.touch0[1],d=f.touch1[0],y=f.touch1[1],p=(p=d[0]-s[0])*p+(p=d[1]-s[1])*p,g=(g=y[0]-h[0])*g+(g=y[1]-h[1])*g;r=b(r,Math.sqrt(p/g)),o=[(s[0]+d[0])/2,(s[1]+d[1])/2],a=[(h[0]+y[0])/2,(h[1]+y[1])/2]}else{if(!f.touch0)return;o=f.touch0[0],a=f.touch0[1]}f.zoom("touch",i(v(r,o,a),f.extent,u))}}function P(t,...r){if(this.__zooming){var o,i,a=w(this,r).event(t),f=t.changedTouches,c=f.length;for(Bn(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<c;++o)i=f[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=zt(i,this),Math.hypot(e[0]-i[0],e[1]-i[1])<y)){var u=gt(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return p.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",Wn),t!==o?m(t,e,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n,r){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n,r)},p.scaleTo=function(t,e,n,r){p.transform(t,(function(){var t=o.apply(this,arguments),r=this.__zoom,a=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,f=r.invert(a),c="function"==typeof e?e.apply(this,arguments):e;return i(v(b(r,c),a,f),t,u)}),n,r)},p.translateBy=function(t,e,n,r){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)}),null,r)},p.translateTo=function(t,e,n,r,a){p.transform(t,(function(){var t=o.apply(this,arguments),a=this.__zoom,f=null==r?g(t):"function"==typeof r?r.apply(this,arguments):r;return i(Ln.translate(f[0],f[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)}),r,a)},x.prototype={event:function(t){return t&&(this.sourceEvent=t),this},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){var e=gt(this.that).datum();h.call(t,this.that,new In(t,{sourceEvent:this.sourceEvent,target:p,type:t,transform:this.that.__zoom,dispatch:h}),e)}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Fn(+t),p):a},p.filter=function(t){return arguments.length?(r="function"==typeof t?t:Fn(!!t),p):r},p.touchable=function(t){return arguments.length?(f="function"==typeof t?t:Fn(!!t),p):f},p.extent=function(t){return arguments.length?(o="function"==typeof t?t:Fn([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):o},p.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],p):[c[0],c[1]]},p.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],p):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(l=+t,p):l},p.interpolate=function(t){return arguments.length?(s=t,p):s},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p.tapDistance=function(t){return arguments.length?(y=+t,p):y},p};function Hn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Xn(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 qn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Jn=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;qn(this,t),i=i||{},this.canvas=e,this.w=this.canvas.offsetWidth,this.h=this.canvas.offsetHeight,this.canvas.width=this.w,this.canvas.height=this.h;var a=this.canvas.getContext("2d");if(!a)throw"Impossible to create canvas 2D context";this.ctx=a,this.center=r||{x:.5*this.w,y:.5*this.h},this.zf=o,this.backgroundColor=i.backgroundColor||"white",this.onZoomStartFun=i.onZoomStartFun,this.onZoomEndFun=i.onZoomEndFun,this.extGeo={xMin:NaN,xMax:NaN,yMin:NaN,yMax:NaN},this.updateExtentGeo();var f=Ln,c=Vn().wheelDelta((function(t){return-t.deltaY*(1===t.deltaMode?.07:t.deltaMode?1:.004)})).on("zoom",(function(t){var e=t.transform,r=f.k/e.k;if(1==r){var o=f.x-e.x,i=f.y-e.y;n.pan(o*n.getZf(),-i*n.getZf())}else{var a=t.sourceEvent;if(a instanceof WheelEvent)n.zoom(r,n.pixToGeoX(t.sourceEvent.offsetX),n.pixToGeoY(t.sourceEvent.offsetY));else if(a instanceof TouchEvent){var c,u=0,l=0,s=Hn(a.targetTouches);try{for(s.s();!(c=s.n()).done;){var h=c.value;u+=h.clientX,l+=h.clientY}}catch(t){s.e(t)}finally{s.f()}u/=a.targetTouches.length,l/=a.targetTouches.length,n.zoom(r,n.pixToGeoX(u),n.pixToGeoY(l))}}f=e})).on("start",(function(t){n.canvasSave.c=document.createElement("canvas"),n.canvasSave.c.setAttribute("width",""+n.w),n.canvasSave.c.setAttribute("height",""+n.h),n.canvasSave.c.getContext("2d").drawImage(n.canvas,0,0),n.canvasSave.dx=0,n.canvasSave.dy=0,n.canvasSave.f=1,n.onZoomStartFun&&n.onZoomStartFun()})).on("end",(function(t){n.redraw(!0),n.canvasSave={c:null,dx:0,dy:0,f:1},n.onZoomEndFun&&n.onZoomEndFun()}));c(gt(this.canvas)),this.zfExtent=[0,1/0],this.canvasSave={c:null,dx:0,dy:0,f:1}}var e,n,r;return e=t,r=[{key:"getParameterByName",value:function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}}],(n=[{key:"setCenter",value:function(t){this.center=t}},{key:"getCenter",value:function(){return this.center}},{key:"setZf",value:function(t){this.zf=t,this.slider&&this.slider.attr("value",+this.zf)}},{key:"getZf",value:function(){return this.zf}},{key:"setZfExtent",value:function(t){this.zfExtent=t}},{key:"getZfExtent",value:function(){return this.zfExtent}},{key:"initCanvasTransform",value:function(){this.ctx.setTransform(1,0,0,1,0,0)}},{key:"setCanvasTransform",value:function(){var t=1/this.getZf(),e=-this.center.x/this.getZf()+.5*this.w,n=this.center.y/this.getZf()+.5*this.h;this.ctx.setTransform(t,0,0,-t,e,n)}},{key:"getWebGLTransform",value:function(){var t=2/(this.w*this.getZf()),e=2/(this.h*this.getZf());return[t,0,0,0,e,0,-t*this.center.x,-e*this.center.y,1]}},{key:"redraw",value:function(){throw new Error("Method redraw not implemented.")}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"white";this.ctx&&(this.ctx.fillStyle=t),this.ctx.fillRect(0,0,this.w,this.h)}},{key:"pan",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.center.x+=t,this.center.y+=e,this.updateExtentGeo(),this.canvasSave.c&&(this.canvasSave.dx-=t/this.getZf(),this.canvasSave.dy+=e/this.getZf(),this.clear(this.backgroundColor),this.ctx.drawImage(this.canvasSave.c,this.canvasSave.dx,this.canvasSave.dy))}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.center.x,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.center.y;if(!(this.zfExtent[0]==this.getZf()&&t<=1||this.zfExtent[1]==this.getZf()&&t>=1)){var r=t*this.getZf();r<this.zfExtent[0]&&(t=this.zfExtent[0]/this.getZf()),r>this.zfExtent[1]&&(t=this.zfExtent[1]/this.getZf()),this.setZf(t*this.getZf());var o=(e-this.center.x)*(1-t);this.center.x+=o;var i=(n-this.center.y)*(1-t);this.center.y+=i,this.updateExtentGeo(),this.canvasSave.c&&(this.clear(this.backgroundColor),this.canvasSave.f/=t,this.canvasSave.dx=this.geoToPixX(e)*(1-this.canvasSave.f),this.canvasSave.dy=this.geoToPixY(n)*(1-this.canvasSave.f),this.clear(this.backgroundColor),this.ctx.drawImage(this.canvasSave.c,this.canvasSave.dx,this.canvasSave.dy,this.canvasSave.f*this.canvasSave.c.width,this.canvasSave.f*this.canvasSave.c.height))}}},{key:"updateExtentGeo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this.extGeo={xMin:this.pixToGeoX(-t),xMax:this.pixToGeoX(this.w+t),yMin:this.pixToGeoY(this.h+t),yMax:this.pixToGeoY(-t)},this.extGeo}},{key:"toDraw",value:function(t){return!(t.x<this.extGeo.xMin||t.x>this.extGeo.xMax||t.y<this.extGeo.yMin||t.y>this.extGeo.yMax)}},{key:"geoToPixX",value:function(t){return(t-this.center.x)/this.getZf()+.5*this.w}},{key:"geoToPixY",value:function(t){return-(t-this.center.y)/this.getZf()+.5*this.h}},{key:"pixToGeoX",value:function(t){return(t-.5*this.w)*this.getZf()+this.center.x}},{key:"pixToGeoY",value:function(t){return-(t-.5*this.h)*this.getZf()+this.center.y}},{key:"setViewFromURL",value:function(){var e=t.getParameterByName("x"),n=t.getParameterByName("y"),r=t.getParameterByName("z"),o=this.getCenter();null==e||null==e||isNaN(+e)||(o.x=+e),null==n||null==n||isNaN(+n)||(o.y=+n),null==r||null==r||isNaN(+r)||this.setZf(+r)}},{key:"addZoomSlider",value:function(t,e){(e=e||{}).width=e.width||"30px",e.height=e.height||"300px";var n=gt("#"+t);if(n.empty())return console.error("Could not find div element to build zoom slider. Id: "+t),this;var r=this;return this.slider=n.append("input").attr("type","range").attr("min",this.getZfExtent()[0]).attr("max",this.getZfExtent()[1]).attr("value",this.getZf()).on("input",(function(t){if(this&&this.value){var e=+this.value;gt(this).attr("value",e),r.setZf(e),r.redraw()}})).style("width",e.width).style("height",e.height).style("opacity",.7).on("mouseover",(function(t){gt(this).style("opacity",1)})).on("mouseout",(function(t){gt(this).style("opacity",.7)})).style("-webkit-appearance","slider-vertical").style("writing-mode","bt-lr").attr("orient","vertical").style("background","lightgray").style("outline","none").style("-webkit-transition",".2s").style("transition","opacity .2s"),this}}])&&Kn(e.prototype,n),r&&Kn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function tr(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 er(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var rr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};er(this,t),r=r||{},this.url=e,this.resolution=n,this.preprocess=r.preprocess||function(){},this.cellsViewCache=[]}var e,n,r;return e=t,(n=[{key:"getData",value:function(t,e){throw new Error("Method getData not implemented.")}},{key:"updateViewCache",value:function(t){throw new Error("Method updateViewCache not implemented.")}},{key:"getCellFromPosition",value:function(t,e){var n,r=this.getResolution(),o=r*Math.floor(t.x/r),i=r*Math.floor(t.y/r),a=Qn(e);try{for(a.s();!(n=a.n()).done;){var f=n.value;if(f.x==o&&f.y==i)return f}}catch(t){a.e(t)}finally{a.f()}}},{key:"getResolution",value:function(){return this.resolution}},{key:"getViewCache",value:function(){return this.cellsViewCache}}])&&nr(e.prototype,n),r&&nr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function or(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ir(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function ir(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 ar(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var cr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(ar(this,t),r=r||{},this.datasetComponents=e,this.resolutions=n,this.datasetComponents.length>1&&this.datasetComponents.length!=this.resolutions.length)throw new Error("Uncompatible number of datasets and resolutions: "+this.datasetComponents.length+" "+this.resolutions.length);r.preprocess&&this.setPrepocesses(r.preprocess)}var e,n,r;return e=t,r=[{key:"make",value:function(e,n,r){var o,i=[],a=or(e);try{for(a.s();!(o=a.n()).done;){var f=o.value;i.push(n(f))}}catch(t){a.e(t)}finally{a.f()}return new t(i,e,r)}}],(n=[{key:"setPrepocesses",value:function(t){var e,n=or(this.datasetComponents);try{for(n.s();!(e=n.n()).done;)e.value.preprocess=t}catch(t){n.e(t)}finally{n.f()}return this}}])&&fr(e.prototype,n),r&&fr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ur(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var lr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.id=e.id,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.background=e.background||"none",this.padding=e.padding||"5px",this.border=e.border||"0px",this["border-radius"]=e["border-radius"]||"none",this["box-shadow"]=e["box-shadow"]||"none",this["font-family"]=e["font-family"]||"Helvetica, Arial, sans-serif",this.id&&(this.div=gt("#"+this.id)),this.div&&!this.div.empty()||(this.div=gt(document.createElement("div")),this.id&&this.div.attr("id",this.id)),this.div.style("background",this.background).style("padding",this.padding).style("border",this.border).style("border-radius",this["border-radius"]).style("box-shadow",this["box-shadow"]).style("font-family",this["font-family"])}var e,n,r;return e=t,(n=[{key:"update",value:function(t){console.error("Legend update not implemented yet.")}}])&&ur(e.prototype,n),r&&ur(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function sr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function hr(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 dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yr=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.offset=e.offset||function(t,e,n){return{dx:0,dy:0}},this.minZoom=e.minZoom||0,this.maxZoom=e.maxZoom||1/0,this.minZoom>=this.maxZoom)throw new Error("Unexpected zoom limits for layer. Zoom min should be smaller than zoom max.");this.legends=[]}var e,n,r;return e=t,r=[{key:"getStatistics",value:function(t,e,n){if(t&&0!=t.length){var r,o=1/0,i=-1/0,a=sr(t);try{for(a.s();!(r=a.n()).done;){var f=+e(r.value);n&&!f||(f<o&&(o=f),f>i&&(i=f))}}catch(t){a.e(t)}finally{a.f()}return{min:o,max:i}}}}],(n=[{key:"draw",value:function(t,e,n){throw new Error("Method draw not implemented.")}},{key:"getOffset",value:function(){return this.offset}},{key:"setOffset",value:function(t){return this.offset=t,this}},{key:"updateLegends",value:function(t){var e,n=sr(this.legends);try{for(n.s();!(e=n.n()).done;)e.value.update(t)}catch(t){n.e(t)}finally{n.f()}return this}}])&&dr(e.prototype,n),r&&dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var vr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(pr(this,t),r=r||{},this.dataset=e,this.styles=n,this.visible=0!=r.visible,this.minZoom=r.minZoom||0,this.maxZoom=r.maxZoom||1/0,this.minZoom>=this.maxZoom)throw new Error("Unexpected zoom limits for layer. Zoom min should be smaller than zoom max.");this.pixNb=r.pixNb||3,this.cellInfoHTML=r.cellInfoHTML||t.defaultCellInfoHTML}var e,n,r;return e=t,r=[{key:"defaultCellInfoHTML",value:function(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];"x"!==o&&"y"!==o&&e.push("<b>",o,"</b>"," : ",t[o],"<br>")}return e.join("")}}],(n=[{key:"getDatasetComponent",value:function(t){if(!(t<this.minZoom||t>this.maxZoom)){if(1==this.dataset.datasetComponents.length)return this.dataset.datasetComponents[0];for(var e=this.dataset.resolutions,n=0,r=e[n]/this.pixNb;r<t&&n<e.length;)r=e[++n]/this.pixNb;return n==e.length?this.dataset.datasetComponents[e.length-1]:this.dataset.datasetComponents[n]}}}])&&br(e.prototype,n),r&&br(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;gr(this,t),e=e||{},this.div=e.div||"tooltip_eurostat",this.maxWidth=e.maxWidth||"20em",this.fontSize=e.fontSize||"1.2em",this.background=e.background||"white",this.padding=e.padding||"5px",this.border=e.border||"0px",this["border-radius"]=e["border-radius"]||"5px",this["box-shadow"]=e["box-shadow"]||"5px 5px 5px grey",this["font-family"]=e["font-family"]||"Helvetica, Arial, sans-serif",this.transitionDuration=e.transitionDuration||100,this.xOffset=e.xOffset||30,this.yOffset=e.yOffset||20,this.tooltip=gt("#"+this.div),this.tooltip.empty()&&(this.tooltip=gt("body").append("div").attr("id",this.div)),this.tooltip.style("max-width",this.maxWidth),this.tooltip.style("overflow","hidden"),this.tooltip.style("font-size",this.fontSize),this.tooltip.style("background",this.background),this.tooltip.style("padding",this.padding),this.tooltip.style("border",this.border),this.tooltip.style("border-radius",this["border-radius"]),this.tooltip.style("box-shadow",this["box-shadow"]),this.tooltip.style("font-family",this["font-family"]),this.tooltip.style("position","absolute"),this.tooltip.style("pointer-events","none"),this.tooltip.style("opacity","0")}var e,n,r;return e=t,(n=[{key:"show",value:function(){this.tooltip.transition().duration(this.transitionDuration).style("opacity",1)}},{key:"hide",value:function(){this.tooltip.transition().duration(this.transitionDuration).style("opacity",0)}},{key:"html",value:function(t){this.tooltip.html(t)}},{key:"setPosition",value:function(t){this.tooltip.style("left",t.pageX+this.xOffset+"px").style("top",t.pageY-this.yOffset+"px")}},{key:"style",value:function(t,e){return 1==arguments.length?this.tooltip.style(t):(this.tooltip.style(t,e),this)}},{key:"attr",value:function(t,e){return 1==arguments.length?this.tooltip.attr(t):(this.tooltip.attr(t,e),this)}}])&&mr(e.prototype,n),r&&mr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),xr={},Sr={};function _r(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function kr(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 Cr(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Or(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Cr(-e,6):e>9999?"+"+Cr(e,6):Cr(e,4))+"-"+Cr(t.getUTCMonth()+1,2)+"-"+Cr(t.getUTCDate(),2)+(i?"T"+Cr(n,2)+":"+Cr(r,2)+":"+Cr(o,2)+"."+Cr(i,3)+"Z":o?"T"+Cr(n,2)+":"+Cr(r,2)+":"+Cr(o,2)+"Z":r||n?"T"+Cr(n,2)+":"+Cr(r,2)+"Z":"")}var Pr=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,o=[],i=t.length,a=0,f=0,c=i<=0,u=!1;function l(){if(c)return Sr;if(u)return u=!1,xr;var e,r,o=a;if(34===t.charCodeAt(o)){for(;a++<i&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=i?c=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,e-1).replace(/""/g,'"')}for(;a<i;){if(10===(r=t.charCodeAt(e=a++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(o,e)}return c=!0,t.slice(o,i)}for(10===t.charCodeAt(i-1)&&--i,13===t.charCodeAt(i-1)&&--i;(r=l())!==Sr;){for(var s=[];r!==xr&&r!==Sr;)s.push(r),r=l();e&&null==(s=e(s,f++))||o.push(s)}return o}function o(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function i(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?Or(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,o,i=r(t,(function(t,r){if(n)return n(t,r-1);o=t,n=e?function(t,e){var n=_r(t);return function(r,o){return e(n(r),o,t)}}(t,e):_r(t)}));return i.columns=o||[],i},parseRows:r,format:function(e,n){return null==n&&(n=kr(e)),[n.map(a).join(t)].concat(o(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kr(t)),o(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:a}},Mr=Pr(","),jr=Mr.parse,Ar=(Mr.parseRows,Mr.format,Mr.formatBody,Mr.formatRows,Mr.formatRow,Mr.formatValue,Pr("\t")),Er=Ar.parse;Ar.parseRows,Ar.format,Ar.formatBody,Ar.formatRows,Ar.formatRow,Ar.formatValue;function Tr(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Rr=function(t,e){return fetch(t,e).then(Tr)};function zr(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Rr(e,n).then((function(e){return t(e,r)}))}}var Fr=zr(jr);zr(Er);function Ir(t){return(Ir="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})(t)}function Nr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Lr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Lr(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 Br(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gr(t,e){return(Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Zr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ur(t);if(e){var o=Ur(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wr(this,n)}}function Wr(t,e){if(e&&("object"===Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ur(t){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gr(t,e)}(i,t);var e,n,r,o=Zr(i);function i(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Br(this,i),(n=o.call(this,t,e,r)).cells=[],n.infoLoadingStatus="notLoaded",n}return e=i,(n=[{key:"getData",value:function(t,e){var n=this;return"notLoaded"!=this.infoLoadingStatus||(this.infoLoadingStatus="loading",Fr(this.url).then((function(t){var r,o=Nr(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.x=+i.x,i.y=+i.y}}catch(t){o.e(t)}finally{o.f()}if(n.cells=t,n.preprocess){var a,f=Nr(n.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;n.preprocess(c)}}catch(t){f.e(t)}finally{f.f()}}e&&e(),n.infoLoadingStatus="loaded"})).catch((function(){n.infoLoadingStatus="failed",n.cells=[]}))),this}},{key:"updateViewCache",value:function(t){if(this.cells){this.cellsViewCache=[];var e,n=Nr(this.cells);try{for(n.s();!(e=n.n()).done;){var r=e.value;+r.x+this.resolution<t.xMin||+r.x-this.resolution>t.xMax||+r.y+this.resolution<t.yMin||+r.y-this.resolution>t.yMax||this.cellsViewCache.push(r)}}catch(t){n.e(t)}finally{n.f()}}}}])&&Dr(e.prototype,n),r&&Dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr);function Yr(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}var Vr=function(t,e){return fetch(t,e).then(Yr)};function Hr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Xr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Xr(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 qr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kr(t,e,n){return e&&qr(t.prototype,e),n&&qr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Jr=Kr((function t(e,n,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cells=e,this.x=n,this.y=r;var i=o.resolutionGeo,a=o.tileSizeCell;this.extGeo={xMin:o.originPoint.x+i*a*this.x,xMax:o.originPoint.x+i*a*(this.x+1),yMin:o.originPoint.y+i*a*this.y,yMax:o.originPoint.y+i*a*(this.y+1)};var f,c=Hr(this.cells);try{for(c.s();!(f=c.n()).done;){var u=f.value;u.x=this.extGeo.xMin+u.x*i,u.y=this.extGeo.yMin+u.y*i}}catch(t){c.e(t)}finally{c.f()}}));function Qr(t){return(Qr="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})(t)}function to(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return eo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function eo(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 no(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oo(t,e){return(oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function io(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fo(t);if(e){var o=fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ao(this,n)}}function ao(t,e){if(e&&("object"===Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var co=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)}(i,t);var e,n,r,o=io(i);function i(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return no(this,i),(n=o.call(this,t,0,r)).app=e,n.info=void 0,n.infoLoadingStatus="notLoaded",n.cache={},n}return e=i,(n=[{key:"loadInfo",value:function(t){var e=this;return this.info||"notLoaded"!==this.infoLoadingStatus?!t||"loaded"!==this.infoLoadingStatus&&"failed"!==this.infoLoadingStatus||t():(this.infoLoadingStatus="loading",Vr(this.url+"info.json").then((function(n){e.info=n,e.resolution=n.resolutionGeo,e.infoLoadingStatus="loaded",t&&t()})).catch((function(){e.infoLoadingStatus="failed"}))),this}},{key:"getTilingEnvelope",value:function(t){if(this.info){var e=this.info.originPoint,n=this.info.resolutionGeo,r=this.info.tileSizeCell;return{xMin:Math.floor((t.xMin-e.x)/(n*r)),xMax:Math.floor((t.xMax-e.x)/(n*r)),yMin:Math.floor((t.yMin-e.y)/(n*r)),yMax:Math.floor((t.yMax-e.y)/(n*r))}}this.loadInfo((function(){}))}},{key:"getData",value:function(t,e){var n=this;if(!this.info)return this;var r=this.getTilingEnvelope(t);if(!r)return this;for(var o=this.info.tilingBounds,i=function(t){for(var i=function(r){if(n.cache[t]||(n.cache[t]={}),n.cache[t][r])return"continue";n.cache[t][r]="loading",Fr(n.url+t+"/"+r+".csv").then((function(o){if(n.info){var i=new Jr(o,t,r,n.info);if(n.cache[t][r]=i,n.preprocess){var a,f=to(i.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;n.preprocess(c)}}catch(t){f.e(t)}finally{f.f()}}if(e){var u,l=!1,s=to(n.app.getActiveLayers());try{for(s.s();!(u=s.n()).done;)if(u.value.getDatasetComponent(n.app.getZoomFactor())==n){l=!0;break}}catch(t){s.e(t)}finally{s.f()}if(l){var h=n.app.updateExtentGeo(),d=i.extGeo;h.xMax<=d.xMin||h.xMin>=d.xMax||h.yMax<=d.yMin||h.yMin>=d.yMax||e()}}}else console.error("Tile info inknown")})).catch((function(){n.cache[t][r]="failed"}))},a=Math.max(r.yMin,o.yMin);a<=Math.min(r.yMax,o.yMax);a++)i(a)},a=Math.max(r.xMin,o.xMin);a<=Math.min(r.xMax,o.xMax);a++)i(a);return this}},{key:"updateViewCache",value:function(t){if(this.cellsViewCache=[],this.info){var e=this.getTilingEnvelope(t);if(e)for(var n=this.info.tilingBounds,r=Math.max(e.xMin,n.xMin);r<=Math.min(e.xMax,n.xMax);r++)if(this.cache[r])for(var o=Math.max(e.yMin,n.yMin);o<=Math.min(e.yMax,n.yMax);o++){var i=this.cache[r][o];if(i&&"string"!=typeof i){var a,f=to(i.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;+c.x+this.resolution<t.xMin||+c.x-this.resolution>t.xMax||+c.y+this.resolution<t.yMin||+c.y-this.resolution>t.yMax||this.cellsViewCache.push(c)}}catch(t){f.e(t)}finally{f.f()}}}}}}])&&ro(e.prototype,n),r&&ro(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr);function uo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return lo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function lo(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 so(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ho=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.url=e.url,this.style=e.style||function(){return"bold 1em Arial"},this.color=e.color||(e.dark?function(){return"#ddd"}:function(){return"#222"}),this.haloColor=e.haloColor||(e.dark?function(){return"#000000BB"}:function(){return"#FFFFFFBB"}),this.haloWidth=e.haloWidth||function(){return 4},this.textAlign=e.textAlign||"start",this.offsetPix=e.offsetPix||[5,5],this.preprocess=e.preprocess,this.labels,this.loadingStatus="notLoaded"}var e,n,r;return e=t,(n=[{key:"draw",value:function(t){if(this.labels){var e=t.getZf();t.ctx.textAlign=this.textAlign||"start",t.initCanvasTransform();var n,r=uo(this.labels);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=this.style(o,e);if(i&&(t.ctx.font=i,t.toDraw(o))){var a=t.geoToPixX(o.x)+this.offsetPix[0],f=t.geoToPixY(o.y)-this.offsetPix[1];if(this.haloColor&&this.haloWidth){var c=this.haloColor(o,e),u=this.haloWidth(o,e);c&&u&&u>0&&(t.ctx.strokeStyle=c,t.ctx.lineWidth=u,t.ctx.strokeText(o.name,a,f))}if(this.color){var l=this.color(o,e);l&&(t.ctx.fillStyle=l,t.ctx.fillText(o.name,a,f))}}}}catch(t){r.e(t)}finally{r.f()}}else this.load(t.redraw)}},{key:"load",value:function(t){var e=this;if(!this.url)return console.log("Failed loading labels: No URL specified. "+this.url),this.loadingStatus="failed",void(this.labels=[]);"notLoaded"===this.loadingStatus&&(this.loadingStatus="loading",Fr(this.url).then((function(n){if(e.preprocess){var r,o=uo(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.preprocess(i)}}catch(t){o.e(t)}finally{o.f()}}e.labels=n,e.loadingStatus="loaded",t&&t()})).catch((function(){console.log("Failed loading labels from "+e.url),e.labels=[],e.loadingStatus="failed"})))}},{key:"getUrl",value:function(){return this.url}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"getStyle",value:function(){return this.style}},{key:"setStyle",value:function(t){return this.style=t,this}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getHaloColor",value:function(){return this.haloColor}},{key:"setHaloColor",value:function(t){return this.haloColor=t,this}},{key:"getHaloWidth",value:function(){return this.haloWidth}},{key:"setHaloWidth",value:function(t){return this.haloWidth=t,this}},{key:"getPreprocess",value:function(){return this.preprocess}},{key:"setPreprocess",value:function(t){return this.preprocess=t,this}}])&&so(e.prototype,n),r&&so(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return po(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return po(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function po(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 bo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var vo=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.url=e,this.preprocess=n.preprocess,this.color=n.color||function(t,e){return"gray"},this.width=n.width||function(t,e){return 2},this.lineDash=n.lineDash||function(t,e){},this.fs,this.loadingStatus="notLoaded"}var e,n,r;return e=t,(n=[{key:"draw",value:function(t){if(this.fs){var e=t.getZf();t.setCanvasTransform();var n,r=yo(this.fs);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.geometry.coordinates;if(!(i.length<2)){var a=this.color(o,e);if(a&&"none"!=a){t.ctx.strokeStyle=a;var f=this.width(o,e);if(f&&!(f<0)){t.ctx.lineWidth=f*e;var c=this.lineDash(o,e);c&&t.ctx.setLineDash(c),t.ctx.beginPath(),t.ctx.moveTo(i[0][0],i[0][1]);for(var u=1;u<i.length;u++)t.ctx.lineTo(i[u][0],i[u][1]);t.ctx.stroke()}}}}}catch(t){r.e(t)}finally{r.f()}t.ctx.setLineDash([])}else this.load(t.redraw)}},{key:"load",value:function(t){var e=this;if(!this.url)return console.log("Failed loading boundaries: No URL specified. "+this.url),this.loadingStatus="failed",void(this.labels=[]);"notLoaded"===this.loadingStatus&&(this.loadingStatus="loading",Vr(this.url).then((function(n){if(n=n.features,e.preprocess){var r,o=yo(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.preprocess(i)}}catch(t){o.e(t)}finally{o.f()}}e.fs=n,e.loadingStatus="loaded",t&&t()})).catch((function(){console.log("Failed loading boundaries from "+e.url),e.fs=[],e.loadingStatus="failed"})))}},{key:"getUrl",value:function(){return this.url}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"getPreprocess",value:function(){return this.preprocess}},{key:"setPreprocess",value:function(t){return this.preprocess=t,this}}])&&bo(e.prototype,n),r&&bo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function go(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return mo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function mo(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 wo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var xo=function(){function t(e,n){var r=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.layers=[],e=e||document.getElementById("gridviz")){this.w=n.w||e.offsetWidth,this.h=n.h||e.offsetHeight;var o=document.createElement("canvas");o.setAttribute("width",""+this.w),o.setAttribute("height",""+this.h),e.appendChild(o),this.cg=new Jn(o),this.cg.redraw=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.legend&&t&&r.legend.selectAll("*").remove(),r.cg.initCanvasTransform(),r.cg.clear(r.cg.backgroundColor);var e,n=r.getZoomFactor(),o=go(r.layers);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(i.visible&&!(n>i.maxZoom||n<i.minZoom)){var a=i.getDatasetComponent(n);if(a){if(t&&a.getData(r.cg.updateExtentGeo(),(function(){r.cg.redraw()})),t&&a.updateViewCache(r.cg.extGeo),t){var f,c=go(i.styles);try{for(c.s();!(f=c.n()).done;){var u=f.value;n>u.maxZoom||(n<u.minZoom||u.draw(a.getViewCache(),a.getResolution(),r.cg))}}catch(t){c.e(t)}finally{c.f()}}if(r.legend&&t){var l,s=go(i.styles);try{for(s.s();!(l=s.n()).done;){var h=l.value;if(!(n>h.maxZoom)&&!(n<h.minZoom)){var d,y=go(h.legends);try{for(y.s();!(d=y.n()).done;){var p=d.value;r.legend.node().append(p.div.node())}}catch(t){y.e(t)}finally{y.f()}}}}catch(t){s.e(t)}finally{s.f()}}}}}}catch(t){o.e(t)}finally{o.f()}return r.showBoundaries&&r.boundaryLayer&&r.boundaryLayer.draw(r.cg),r.showLabels&&r.labelLayer&&r.labelLayer.draw(r.cg),r.canvasSave=null,r},this.labelLayer=void 0,this.showLabels=!0,this.boundaryLayer=void 0,this.showBoundaries=!0,this.legendDivId=n.legendDivId||"gvizLegend",this.legend=gt("#"+this.legendDivId),this.legend.empty()&&(this.legend=gt("body").append("div").attr("id",this.legendDivId).style("position","absolute").style("width","auto").style("height","auto").style("background","#FFFFFFCC").style("border","0px").style("border-radius","5px").style("box-shadow","5px 5px 5px grey").style("font-family","Helvetica, Arial, sans-serif").style("top","20px").style("right","20px")),this.tooltip=new wr;var i=function(t){var e={x:r.cg.pixToGeoX(t.clientX),y:r.cg.pixToGeoY(t.clientY)},n=r.getCellFocusInfo(e);n?(r.tooltip.setPosition(t),r.tooltip.show(),r.tooltip.html(n.html),r.canvasSave?r.cg.ctx.drawImage(r.canvasSave,0,0):(r.canvasSave=document.createElement("canvas"),r.canvasSave.setAttribute("width",""+r.w),r.canvasSave.setAttribute("height",""+r.h),r.canvasSave.getContext("2d").drawImage(r.cg.canvas,0,0)),r.cg.initCanvasTransform(),r.cg.ctx.strokeStyle=r.selectionRectangleColor,r.cg.ctx.lineWidth=r.selectionRectangleWidthPix,r.cg.ctx.beginPath(),r.cg.ctx.rect(r.cg.geoToPixX(n.cell.x)-r.selectionRectangleWidthPix/2,r.cg.geoToPixY(n.cell.y)+r.selectionRectangleWidthPix/2,n.resolution/r.getZoomFactor()+r.selectionRectangleWidthPix,-n.resolution/r.getZoomFactor()-r.selectionRectangleWidthPix),r.cg.ctx.stroke()):(r.tooltip.hide(),r.canvasSave&&r.cg.ctx.drawImage(r.canvasSave,0,0))};e.addEventListener("mouseover",(function(t){i(t)})),e.addEventListener("mousemove",(function(t){i(t)})),e.addEventListener("mouseout",(function(){r.tooltip.hide()})),this.cg.onZoomStartFun=function(){r.tooltip.hide()},this.canvasSave=null,this.selectionRectangleColor=n.selectionRectangleColor||"red",this.selectionRectangleWidthPix=n.selectionRectangleWidthPix||4}else console.error("Cannot find gridviz container element.")}var e,n,r;return e=t,(n=[{key:"getActiveLayers",value:function(){var t,e=[],n=this.getZoomFactor(),r=go(this.layers);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.visible&&o.getDatasetComponent(n)&&e.push(o)}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"hideAllLayers",value:function(){var t,e=go(this.layers);try{for(e.s();!(t=e.n()).done;)t.value.visible=!1}catch(t){e.e(t)}finally{e.f()}return this}},{key:"updateExtentGeo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this.cg.updateExtentGeo(t)}},{key:"getCellFocusInfo",value:function(t){var e=this.getActiveLayers(),n=e[e.length-1];if(n){var r=n.getDatasetComponent(this.getZoomFactor());if(r){var o=r.getCellFromPosition(t,r.getViewCache());if(o)return{cell:o,html:n.cellInfoHTML(o),resolution:r.getResolution()}}}}},{key:"getGeoCenter",value:function(){return this.cg.getCenter()}},{key:"setGeoCenter",value:function(t){return this.cg.setCenter(t),this}},{key:"getZoomFactor",value:function(){return this.cg.getZf()}},{key:"setZoomFactor",value:function(t){return this.cg.setZf(t),this}},{key:"getZoomFactorExtent",value:function(){return this.cg.getZfExtent()}},{key:"setZoomFactorExtent",value:function(t){return this.cg.setZfExtent(t),this}},{key:"getBackgroundColor",value:function(){return this.cg.backgroundColor}},{key:"setBackgroundColor",value:function(t){return this.cg.backgroundColor=t,this}},{key:"getBoundaryLayer",value:function(){return this.boundaryLayer}},{key:"setBoundaryLayer",value:function(t){return this.boundaryLayer=t,this}},{key:"getLabelLayer",value:function(){return this.labelLayer}},{key:"setLabelLayer",value:function(t){return this.labelLayer=t,this}},{key:"addLayerFromDataset",value:function(t,e,n){var r=new vr(t,e,n);return this.layers.push(r),this}},{key:"makeCSVGridDataset",value:function(t,e,n){var r=this;return new cr([new $r(t,e,n).getData(void 0,(function(){r.cg.redraw()}))],[],n)}},{key:"makeTiledCSVGridDataset",value:function(t,e){var n=this;return new cr([new co(t,this,e).loadInfo((function(){n.cg.redraw()}))],[],e)}},{key:"makeMultiScaleCSVGridDataset",value:function(t,e,n){var r=this;return cr.make(t,(function(t){return new $r(e(t),t,n).getData(void 0,(function(){r.cg.redraw()}))}),n)}},{key:"makeMultiScaleTiledCSVGridDataset",value:function(t,e,n){var r=this;return cr.make(t,(function(t){return new co(e(t),r,n).loadInfo((function(){r.cg.redraw()}))}),n)}},{key:"addCSVGridLayer",value:function(t,e,n,r){var o=this.makeCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addTiledCSVGridLayer",value:function(t,e,n){var r=this.makeTiledCSVGridDataset(t,n);return this.addLayerFromDataset(r,e,n)}},{key:"addMultiScaleCSVGridLayer",value:function(t,e,n,r){var o=this.makeMultiScaleCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addMultiScaleTiledCSVGridLayer",value:function(t,e,n,r){var o=this.makeMultiScaleTiledCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addZoomSlider",value:function(t,e){return this.cg.addZoomSlider(t,e),this}},{key:"setViewFromURL",value:function(){return this.cg.setViewFromURL(),this}}])&&wo(e.prototype,n),r&&wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),So=function(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},_o=So("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ko=So("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Co=So("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Oo=So("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Po=So("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Mo=So("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jo=So("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ao=So("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Eo=So("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),To=So("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),Ro=t=>en(t[t.length-1]),zo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(So),Fo=Ro(zo),Io=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(So),No=Ro(Io),Lo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(So),Bo=Ro(Lo),Do=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(So),Go=Ro(Do),Zo=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(So),Wo=Ro(Zo),Uo=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(So),$o=Ro(Uo),Yo=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(So),Vo=Ro(Yo),Ho=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(So),Xo=Ro(Ho),qo=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(So),Ko=Ro(qo),Jo=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(So),Qo=Ro(Jo),ti=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(So),ei=Ro(ti),ni=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(So),ri=Ro(ni),oi=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(So),ii=Ro(oi),ai=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(So),fi=Ro(ai),ci=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(So),ui=Ro(ci),li=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(So),si=Ro(li),hi=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(So),di=Ro(hi),yi=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(So),pi=Ro(yi),bi=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(So),vi=Ro(bi),gi=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(So),mi=Ro(gi),wi=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(So),xi=Ro(wi),Si=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(So),_i=Ro(Si),ki=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(So),Ci=Ro(ki),Oi=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(So),Pi=Ro(Oi),Mi=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(So),ji=Ro(Mi),Ai=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(So),Ei=Ro(Ai),Ti=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(So),Ri=Ro(Ti),zi=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"};const Fi=Math.PI/180,Ii=180/Math.PI;var Ni=-.29227,Li=1.97294,Bi=-.90649*Li,Di=1.78277*Li,Gi=-.6557636667999999;function Zi(t){if(t instanceof Ui)return new Ui(t.h,t.s,t.l,t.opacity);t instanceof Ie||(t=ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Gi*r+Bi*e-Di*n)/(Gi+Bi-Di),i=r-o,a=(Li*(n-o)-Ni*i)/-.90649,f=Math.sqrt(a*a+i*i)/(Li*o*(1-o)),c=f?Math.atan2(a,i)*Ii-120:NaN;return new Ui(c<0?c+360:c,f,o,t.opacity)}function Wi(t,e,n,r){return 1===arguments.length?Zi(t):new Ui(t,e,n,null==r?1:r)}function Ui(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $i(t){return function e(n){function r(e,r){var o=t((e=Wi(e)).h,(r=Wi(r)).h),i=Je(e.s,r.s),a=Je(e.l,r.l),f=Je(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=i(t),e.l=a(Math.pow(t,n)),e.opacity=f(t),e+""}}return n=+n,r.gamma=e,r}(1)}pe(Ui,Wi,be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ui(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ui(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Fi,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Ie(255*(e+n*(-.14861*r+1.78277*o)),255*(e+n*(Ni*r+-.90649*o)),255*(e+n*(Li*r)),this.opacity)}}));$i((function(t,e){var n=e-t;return n?qe(t,n>180||n<-180?n-360*Math.round(n/360):n):Xe(isNaN(t)?e:t)}));var Yi=$i(Je),Vi=Yi(Wi(300,.5,0),Wi(-240,.5,1)),Hi=Yi(Wi(-100,.75,.35),Wi(80,1.5,.8)),Xi=Yi(Wi(260,.75,.35),Wi(80,1.5,.8)),qi=Wi(),Ki=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return qi.h=360*t-100,qi.s=1.5-1.5*e,qi.l=.8-.9*e,qi+""},Ji=Fe(),Qi=Math.PI/3,ta=2*Math.PI/3,ea=function(t){var e;return t=(.5-t)*Math.PI,Ji.r=255*(e=Math.sin(t))*e,Ji.g=255*(e=Math.sin(t+Qi))*e,Ji.b=255*(e=Math.sin(t+ta))*e,Ji+""},na=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ra(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var oa=ra(So("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ia=ra(So("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),aa=ra(So("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fa=ra(So("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ca(t){return(ca="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})(t)}function ua(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return la(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return la(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function la(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 sa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ha(t,e){return(ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function da(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pa(t);if(e){var o=pa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ya(this,n)}}function ya(t,e){if(e&&("object"===ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pa(t){return(pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ba=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ha(t,e)}(i,t);var e,n,r,o=da(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.sizeCol=t.sizeCol,e.size=t.size,e.shape=t.shape||function(){return"square"},e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i=this,a=n.getZf();this.sizeCol&&(t.sort((function(t,e){return e[i.sizeCol]-t[i.sizeCol]})),r=yr.getStatistics(t,(function(t){return t[i.sizeCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[i.colorCol]}),!0)),n.setCanvasTransform();var f,c=ua(t);try{for(c.s();!(f=c.n()).done;){var u=f.value,l=this.color?this.color(u[this.colorCol],e,o):void 0;if(l&&"none"!==l){n.ctx.fillStyle=l;var s=this.shape?this.shape(u):"square";if("none"!==s){var h=(this.size||function(){return e})(u[this.sizeCol],e,r,a),d=this.offset(u,e,a);if("square"===s){var y=e*(1-h/e)*.5;n.ctx.fillRect(u.x+y+d.dx,u.y+y+d.dy,h,h)}else if("circle"===s)n.ctx.beginPath(),n.ctx.arc(u.x+.5*e+d.dx,u.y+.5*e+d.dy,.5*h,0,2*Math.PI,!1),n.ctx.fill();else{if("donut"!==s)throw new Error("Unexpected shape:"+s);var p=u.x+.5*e+d.dx,b=u.y+.5*e+d.dy;n.ctx.beginPath(),n.ctx.moveTo(p,b),n.ctx.arc(p,b,.5*e,0,2*Math.PI),n.ctx.arc(p,b,.5*(1-h/e)*e,0,2*Math.PI,!0),n.ctx.closePath(),n.ctx.fill()}}}}}catch(t){c.e(t)}finally{c.f()}this.updateLegends({style:this,r:e,zf:a,sSize:r,sColor:o})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(t){return this.size=t,this}},{key:"getShape",value:function(){return this.shape}},{key:"setShape",value:function(t){return this.shape=t,this}}])&&sa(e.prototype,n),r&&sa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function va(t){return(va="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})(t)}function ga(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ma(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ma(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function ma(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 wa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xa(t,e){return(xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ka(t);if(e){var o=ka(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _a(this,n)}}function _a(t,e){if(e&&("object"===va(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ka(t){return(ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ca=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xa(t,e)}(i,t);var e,n,r,o=Sa(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.strokeColorCol=t.strokeColorCol,e.strokeColor=t.strokeColor||function(){return"#666"},e.sizeCol=t.sizeCol,e.size=t.size,e.strokeWidthCol=t.strokeWidthCol,e.strokeWidth=t.strokeWidth,e.shape=t.shape||function(){return"square"},e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.strokeColorCol&&(r=yr.getStatistics(t,(function(t){return t[a.strokeColorCol]}),!0)),this.sizeCol&&(o=yr.getStatistics(t,(function(t){return t[a.sizeCol]}),!0)),this.strokeWidthCol&&(i=yr.getStatistics(t,(function(t){return t[a.strokeWidthCol]}),!0)),n.setCanvasTransform();var c,u=ga(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.strokeColor?this.strokeColor(l[this.strokeColorCol],e,r):void 0;if(s&&"none"!==s){n.ctx.strokeStyle=s;var h=(this.size||function(){return e})(l[this.sizeCol],e,o,f),d=this.strokeWidth?this.strokeWidth(l[this.strokeWidthCol],e,i,f):1*f;if(d&&!(d<=0)){n.ctx.lineWidth=d;var y=this.shape?this.shape(l):"square";if("none"!==y){var p=this.offset(l,e,f);if("square"===y){var b=e*(1-h/e)*.5;n.ctx.beginPath(),n.ctx.rect(l.x+b+p.dx,l.y+b+p.dy,h,h),n.ctx.stroke()}else if("circle"===y)n.ctx.beginPath(),n.ctx.arc(l.x+.5*e+p.dx,l.y+.5*e+p.dy,.5*h,0,2*Math.PI,!1),n.ctx.stroke();else{if("donut"!==y)throw new Error("Unexpected shape:"+y);console.error("Not implemented")}}}}}}catch(t){u.e(t)}finally{u.f()}}}])&&wa(e.prototype,n),r&&wa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Oa(t){return(Oa="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})(t)}function Pa(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ma(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Ma(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 ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Aa(t,e){return(Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ea(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ra(t);if(e){var o=Ra(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ta(this,n)}}function Ta(t,e){if(e&&("object"===Oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ra(t){return(Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var za=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(i,t);var e,n,r,o=Ea(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.heightCol=t.heightCol,e.height=t.height||function(t){return Math.sqrt(t)},e.lineColor=t.lineColor||"#BBB",e.lineWidth=t.lineWidth||1,e.fillColor=t.fillColor||"#c08c5968",e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf(),a=yr.getStatistics(t,(function(t){return t[o.heightCol]}),!0),f={},c=Pa(t);try{for(c.s();!(r=c.n()).done;){var u=r.value,l=f[u.y];l||(l={},f[u.y]=l),l[u.x]=this.height(u[this.heightCol],e,a,i)}}catch(t){c.e(t)}finally{c.f()}var s=n.extGeo;if(s){var h=Math.floor(s.xMin/e)*e,d=Math.floor(s.xMax/e)*e,y=Math.floor(s.yMin/e)*e,p=Math.floor(s.yMax/e)*e;n.ctx.strokeStyle=this.lineColor,n.ctx.lineWidth=this.lineWidth*i,n.ctx.fillStyle=this.fillColor,n.setCanvasTransform();for(var b=p;b>=y;b-=e){var v=f[b];if(v){n.ctx.beginPath(),n.ctx.moveTo(h-e/2,b);for(var g=void 0,m=h;m<=d;m+=e){var w=v[m];w||(w=0),w||g?n.ctx.lineTo(m+e/2,b+w):n.ctx.moveTo(m+e/2,b),g=w}g&&n.ctx.lineTo(d+e/2,b),this.fillColor&&n.ctx.fill(),this.lineColor&&this.lineWidth>0&&n.ctx.stroke()}}}}},{key:"getHeightCol",value:function(){return this.heightCol}},{key:"setHeightCol",value:function(t){return this.heightCol=t,this}},{key:"getHeight",value:function(){return this.height}},{key:"setHeight",value:function(t){return this.height=t,this}},{key:"getLineColor",value:function(){return this.lineColor}},{key:"setLineColor",value:function(t){return this.lineColor=t,this}},{key:"getLineWidth",value:function(){return this.lineWidth}},{key:"setLineWidth",value:function(t){return this.lineWidth=t,this}},{key:"getFillColor",value:function(){return this.fillColor}},{key:"setFillColor",value:function(t){return this.fillColor=t,this}}])&&ja(e.prototype,n),r&&ja(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Fa(t){return(Fa="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})(t)}function Ia(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,f=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){f=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(f)throw o}}return i}(t,e)||Na(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Na(t,e){if(t){if("string"==typeof t)return La(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)?La(t,e):void 0}}function La(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 Ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Da(t,e){return(Da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ga(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Wa(t);if(e){var o=Wa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Za(this,n)}}function Za(t,e){if(e&&("object"===Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wa(t){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ua=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Da(t,e)}(i,t);var e,n,r,o=Ga(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.color=t.color,e.type=t.type,e.sizeCol=t.sizeCol,e.size=t.size||function(t,e){return e},e.stripesOrientation=t.stripesOrientation||function(){return 0},e.pieChartInternalRadiusFactor=t.pieChartInternalRadiusFactor||0,e.offsetAngle=t.offsetAngle,e.agePyramidHeight=t.agePyramidHeight,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.sizeCol&&(t.sort((function(t,e){return e[o.sizeCol]-t[o.sizeCol]})),r=yr.getStatistics(t,(function(t){return t[o.sizeCol]}),!0));var a=Object.entries(this.color).length;n.setCanvasTransform();var f,c=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Na(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}(t);try{for(c.s();!(f=c.n()).done;){var u=f.value,l=(this.size||function(){return e})(u[this.sizeCol],e,r,i),s=this.offset(u,e,i),h=this.type?this.type(u):"flag",d=u.x+s.dx+("agepyramid"===h?0:.5*e),y=u.y+s.dy+("agepyramid"===h?0:.5*e);if("agepyramid"===h||"radar"===h||"halftone"===h){for(var p=-1/0,b=0,v=Object.keys(this.color);b<v.length;b++){var g=+u[v[b]];g>p&&(p=g)}var m=0;"agepyramid"===h&&this.agePyramidHeight&&(m=(e-this.agePyramidHeight(e))/2),"radar"!==h&&"halftone"!==h||(m=Math.PI/2+(this.offsetAngle?this.offsetAngle(u,e,i)*Math.PI/180:0));var w="agepyramid"===h?(this.agePyramidHeight?this.agePyramidHeight(e):e)/a:"radar"===h||"halftone"===h?2*Math.PI/a:void 0;if(void 0===w)throw new Error("Unexpected symbol type:"+h);for(var x=0,S=Object.entries(this.color);x<S.length;x++){var _=Ia(S[x],2),k=_[0],C=_[1];if("agepyramid"===h){n.ctx.fillStyle=C;var O=l*u[k]/p;n.ctx.fillRect(d+(e-O)/2,y+m,O,w),m+=w}else if("radar"===h){n.ctx.fillStyle=C;var P=u[k],M=l/2*Math.sqrt(P/p);n.ctx.beginPath(),n.ctx.moveTo(d,y),n.ctx.arc(d,y,M,m-w,m),n.ctx.lineTo(d,y),n.ctx.fill(),m+=w}else{if("halftone"!==h)throw new Error("Unexpected symbol type:"+h);n.ctx.fillStyle=C;var j=u[k],A=.333*l*Math.sqrt(j/p);n.ctx.beginPath(),n.ctx.arc(d+.25*e*Math.cos(m),y+.25*e*Math.sin(m),A,0,2*Math.PI),n.ctx.fill(),m+=w}}}else{for(var E=0,T=0,R=Object.keys(this.color);T<R.length;T++){var z=+u[R[T]];z&&(E+=z)}if(!E||isNaN(E))continue;for(var F=0,I=e*(1-l/e)*.5,N=0,L=Object.entries(this.color);N<L.length;N++){var B=Ia(L[N],2),D=B[0],G=B[1],Z=u[D]/E;if(Z&&!isNaN(Z)){if(n.ctx.fillStyle=G,"flag"===h)0==this.stripesOrientation(u[this.sizeCol],e,i)?n.ctx.fillRect(u.x+I+s.dx,u.y+I+F*l+s.dy,l,Z*l):n.ctx.fillRect(u.x+I+F*l+s.dx,u.y+I+s.dy,Z*l,l);else if("piechart"===h){var W=2*F*Math.PI,U=2*(F+Z)*Math.PI;n.ctx.beginPath(),n.ctx.moveTo(d,y),n.ctx.arc(d,y,.5*l,W,U),this.pieChartInternalRadiusFactor&&n.ctx.arc(d,y,.5*l*this.pieChartInternalRadiusFactor,W,U,!0),n.ctx.closePath(),n.ctx.fill()}else if("ring"===h)n.ctx.beginPath(),n.ctx.arc(d,y,Math.sqrt(1-F)*l*.5,0,2*Math.PI),n.ctx.fill();else{if("segment"!==h)throw new Error("Unexpected symbol type:"+h);var $=l*l/e;0==this.stripesOrientation(u[this.sizeCol],e,i)?n.ctx.fillRect(u.x+s.dx,u.y+(e-$)/2+F*$+s.dy,e,Z*$):n.ctx.fillRect(u.x+F*e+s.dx,u.y+(e-$)/2+s.dy,Z*e,$)}F+=Z}}}}}catch(t){c.e(t)}finally{c.f()}this.updateLegends({style:this,r:e,zf:i,sSize:r})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getType",value:function(){return this.type}},{key:"setType",value:function(t){return this.type=t,this}},{key:"getColSize",value:function(){return this.sizeCol}},{key:"setColSize",value:function(t){return this.sizeCol=t,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(t){return this.size=t,this}},{key:"getStripesOrientation",value:function(){return this.stripesOrientation}},{key:"setStripesOrientation",value:function(t){return this.stripesOrientation=t,this}},{key:"getPieChartInternalRadiusFactor",value:function(){return this.pieChartInternalRadiusFactor}},{key:"setPieChartInternalRadiusFactor",value:function(t){return this.pieChartInternalRadiusFactor=t,this}},{key:"getOffsetAngle",value:function(){return this.offsetAngle}},{key:"setOffsetAngle",value:function(t){return this.offsetAngle=t,this}},{key:"getAgePyramidHeight",value:function(){return this.agePyramidHeight}},{key:"sethAgePyramidHeight",value:function(t){return this.agePyramidHeight=t,this}}])&&Ba(e.prototype,n),r&&Ba(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function $a(t){return($a="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})(t)}function Ya(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Va(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Va(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Va(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 Ha(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xa(t,e){return(Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ja(t);if(e){var o=Ja(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ka(this,n)}}function Ka(t,e){if(e&&("object"===$a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ja(t){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xa(t,e)}(i,t);var e,n,r,o=qa(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.orientation=t.orientation,e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.lengthCol=t.lengthCol,e.length=t.length,e.widthCol=t.widthCol,e.width=t.width,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.lengthCol&&(t.sort((function(t,e){return e[a.lengthCol]-t[a.lengthCol]})),o=yr.getStatistics(t,(function(t){return t[a.lengthCol]}),!0)),this.widthCol&&(i=yr.getStatistics(t,(function(t){return t[a.widthCol]}),!0)),n.ctx.lineCap="butt";var c=Math.PI/180;n.setCanvasTransform();var u,l=Ya(t);try{for(l.s();!(u=l.n()).done;){var s=u.value,h=this.color?this.color(s[this.colorCol],e,r):void 0;if(h){var d=this.width?this.width(s[this.widthCol],e,i,f):void 0;if(d&&!(d<0)){var y=this.length?this.length(s[this.lengthCol],e,o,f):void 0;if(y&&!(y<0)){var p=this.orientation(s)*c;if(void 0!==p&&!isNaN(p)){var b=this.offset(s,e,f);n.ctx.strokeStyle=h,n.ctx.lineWidth=d;var v=s.x+e/2+b.dx,g=s.y+e/2+b.dy,m=.5*Math.cos(p)*y,w=.5*Math.sin(p)*y;n.ctx.beginPath(),n.ctx.moveTo(v-m,g-w),n.ctx.lineTo(v+m,g+w),n.ctx.stroke()}}}}}}catch(t){l.e(t)}finally{l.f()}this.updateLegends({style:this,r:e,zf:f,sColor:r,sLength:o,sWidth:i})}},{key:"getOrientation",value:function(){return this.orientation}},{key:"setOrientation",value:function(t){return this.orientation=t,this}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getLength",value:function(){return this.length}},{key:"setLength",value:function(t){return this.length=t,this}},{key:"getWidth",value:function(){return this.width}},{key:"setWidth",value:function(t){return this.width=t,this}}])&&Ha(e.prototype,n),r&&Ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function tf(t){return(tf="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})(t)}function ef(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return nf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function nf(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 rf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function of(t,e){return(of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function af(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cf(t);if(e){var o=cf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ff(this,n)}}function ff(t,e){if(e&&("object"===tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function cf(t){return(cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&of(t,e)}(i,t);var e,n,r,o=af(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.textCol=t.textCol,e.text=t.text||function(t,e,n,r){return"X"},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.fontSizeCol=t.fontSizeCol,e.fontSize=t.fontSize||function(t,e,n,r){return e-2},e.fontFamily=t.fontFamily||"Arial",e.fontWeight=t.fontWeight||"bold",e}return e=i,r=[{key:"getCharLegendFun",value:function(t){var e=t.length;return function(n){return 0==n?"":1==n?t[e-1]:t[Math.floor(n*e)]}}}],(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.textCol&&(r=yr.getStatistics(t,(function(t){return t[a.textCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.fontSizeCol&&(t.sort((function(t,e){return e[a.fontSizeCol]-t[a.fontSizeCol]})),i=yr.getStatistics(t,(function(t){return t[a.fontSizeCol]}),!0));var c,u=ef(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.text?this.text(l[this.textCol],e,r):void 0;if(s){var h=this.color?this.color(l[this.colorCol],e,o):void 0;if(h){n.ctx.fillStyle=h;var d=(this.fontSize||function(){return e/f-2})(l[this.fontSizeCol],e,i,f)/f,y=this.fontFamily||"Arial",p=this.fontWeight||"bold";n.ctx.font=p+" "+d+"px "+y;var b=this.offset(l,e,f);n.ctx.textAlign="center";var v=n.geoToPixX(l.x+.5*e+b.dx),g=n.geoToPixY(l.y+.5*e+b.dy)+.5*d;n.ctx.fillText(s,v,g)}}}}catch(t){u.e(t)}finally{u.f()}this.updateLegends({style:this,r:e,zf:f,sColor:o})}}])&&rf(e.prototype,n),r&&rf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function lf(t){return(lf="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})(t)}function sf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return hf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function hf(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 df(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yf(t,e){return(yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vf(t);if(e){var o=vf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bf(this,n)}}function bf(t,e){if(e&&("object"===lf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vf(t){return(vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yf(t,e)}(i,t);var e,n,r,o=pf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.value=t.value,e.sigma=t.sigma,e.styles=t.styles,e}return e=i,(n=[{key:"getKernelMatrix",value:function(t){for(var e,n,r=Math.floor(3*t),o=2*t*t,i=[],a=0;a<=r;a++){for(var f=[],c=0;c<=r;c++){var u=(e=a,n=c,Math.exp(-(e*e+n*n)/o));f.push({w:u,val:0})}i.push(f)}return i}},{key:"kernelSmoothing",value:function(t,e,n,r){var o,i=Math.floor(e.xMin/n)*n,a=Math.floor(e.xMax/n)*n,f=Math.floor(e.yMin/n)*n,c=Math.floor(e.yMax/n)*n,u=(a-i)/n+1,l=(c-f)/n+1,s=sf(t);try{for(s.s();!(o=s.n()).done;)o.value.ksmval=0}catch(t){s.e(t)}finally{s.f()}var h,d={},y=sf(t);try{for(y.s();!(h=y.n()).done;){var p=h.value,b=Math.floor((p.x-i)/n),v=Math.floor((p.y-f)/n);d[b]||(d[b]={}),d[b][v]=p}}catch(t){y.e(t)}finally{y.f()}for(var g=this.getKernelMatrix(r),m=g.length,w=0,x=Object.keys(d);w<x.length;w++)for(var S=x[w],_=+S,k=0,C=Object.keys(d[S]);k<C.length;k++){var O=+C[k],P=d[_][O];if(!P.notInputCell){var M=this.value(P);if(M){for(var j=0,A=0;A<m;A++)for(var E=0;E<m;E++){var T=g[A][E];T.val=T.w*M,j+=T.w}for(var R=function(t,e){return t>=0&&t<u&&e>=0&&e<l},z=function(t,e,r){var o=d[t]?d[t][e]:void 0;o?o.ksmval?o.ksmval+=r:o.ksmval=r:(d[t]||(d[t]={}),d[t][e]={x:i+t*n,y:f+e*n,ksmval:r,notInputCell:!0})},F=0;F<m;F++)for(var I=0;I<m;I++){var N=g[Math.abs(F)][Math.abs(I)];if(N){var L=N.val;L&&(L/=j)&&(R(_+F,O+I)&&z(_+F,O+I,L),0==F&&0==I||(R(_-F,O+I)&&z(_-F,O+I,L),0!=F&&(R(_+F,O-I)&&z(_+F,O-I,L),R(_-F,O-I)&&z(_-F,O-I,L))))}}}}}for(var B=[],D=0,G=Object.keys(d);D<G.length;D++)for(var Z=G[D],W=0,U=Object.keys(d[Z]);W<U.length;W++){var $=U[W];B.push(d[Z][$])}return B}},{key:"draw",value:function(t,e,n){if(t&&0!=t.length){var r=this.sigma(e,n.zf);t=this.kernelSmoothing(t,n.extGeo,e,r/e);var o,i=sf(this.styles);try{for(i.s();!(o=i.n()).done;)o.value.draw(t,e,n)}catch(t){i.e(t)}finally{i.f()}}}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getSigma",value:function(){return this.sigma}},{key:"setSigma",value:function(t){return this.sigma=t,this}},{key:"getStyles",value:function(){return this.styles}},{key:"setStyles",value:function(t){return this.styles=t,this}}])&&df(e.prototype,n),r&&df(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function mf(t){return(mf="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})(t)}function wf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return xf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function xf(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 Sf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _f(t,e){return(_f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Of(t);if(e){var o=Of(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cf(this,n)}}function Cf(t,e){if(e&&("object"===mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Of(t){return(Of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_f(t,e)}(i,t);var e,n,r,o=kf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.heightCol=t.heightCol,e.height=t.height,e.colorCol=t.colorCol,e.color=t.color||function(){return"#c08c59"},e.widthCol=t.widthCol,e.width=t.width||function(t,e){return.5*e},e.viewHeightFactor=5,e.shadowDirection=40.3*Math.PI/180,e.shadowFactor=.2,e.shadowColor="#00000033",e.viewSX=-.25,e.viewSY=-1.5,e.outlineCol="#FFFFFF",e.outlineWidthPix=.5,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.heightCol&&(r=yr.getStatistics(t,(function(t){return t[a.heightCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.widthCol&&(i=yr.getStatistics(t,(function(t){return t[a.widthCol]}),!0));var c=n.getCenter().x+this.viewSX*n.w*f,u=n.getCenter().y+this.viewSY*n.h*f,l=this.viewHeightFactor*(n.w+n.h)*.5*f;t.sort((function(t,e){return 1e8*(e.y-t.y)+t.x-e.x})),n.ctx.lineCap="round",n.setCanvasTransform(),n.ctx.strokeStyle=this.shadowColor;var s,h=wf(t);try{for(h.s();!(s=h.n()).done;){var d=s.value,y=this.width?this.width(d[this.widthCol],e,i,f):void 0;if(y&&!(y<0)){var p=this.height?this.height(d[this.heightCol],e,r,f):void 0;if(p&&!(p<0)){this.offset(d,e,f),n.ctx.lineWidth=y;var b=d.x+e/2,v=d.y+e/2,g=p*this.shadowFactor;n.ctx.beginPath(),n.ctx.moveTo(b,v),n.ctx.lineTo(b+g*Math.cos(this.shadowDirection),v+g*Math.sin(this.shadowDirection)),n.ctx.stroke(),n.ctx.fillStyle="gray",n.ctx.beginPath(),n.ctx.arc(b,v,.5*y,0,2*Math.PI,!1),n.ctx.fill()}}}}catch(t){h.e(t)}finally{h.f()}var m,w=wf(t);try{for(w.s();!(m=w.n()).done;){var x=m.value,S=this.color?this.color(x[this.colorCol],e,o):void 0;if(S){var _=this.width?this.width(x[this.widthCol],e,i,f):void 0;if(_&&!(_<0)){var k=this.height?this.height(x[this.heightCol],e,r,f):void 0;if(k&&!(k<0)){this.offset(x,e,f);var C=x.x+e/2,O=x.y+e/2,P=C-c,M=O-u,j=Math.atan2(M,P),A=Math.sqrt(P*P+M*M)*k/(l-k);n.ctx.strokeStyle=this.outlineCol,n.ctx.lineWidth=_+2*this.outlineWidthPix*f,n.ctx.beginPath(),n.ctx.moveTo(C,O),n.ctx.lineTo(C+A*Math.cos(j),O+A*Math.sin(j)),n.ctx.stroke(),n.ctx.strokeStyle=S,n.ctx.lineWidth=_,n.ctx.beginPath(),n.ctx.moveTo(C,O),n.ctx.lineTo(C+A*Math.cos(j),O+A*Math.sin(j)),n.ctx.stroke(),n.ctx.strokeStyle=this.outlineCol,n.ctx.lineWidth=this.outlineWidthPix*f,n.ctx.beginPath(),n.ctx.arc(C+A*Math.cos(j),O+A*Math.sin(j),.5*_,0,2*Math.PI,!1),n.ctx.stroke()}}}}}catch(t){w.e(t)}finally{w.f()}n.ctx.lineCap="butt",this.updateLegends({style:this,r:e,zf:f,sColor:o})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getHeight",value:function(){return this.height}},{key:"setHeight",value:function(t){return this.height=t,this}},{key:"getWidth",value:function(){return this.width}},{key:"setWidth",value:function(t){return this.width=t,this}}])&&Sf(e.prototype,n),r&&Sf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Mf(t){return(Mf="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})(t)}function jf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Af(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Af(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Af(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 Ef(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tf(t,e){return(Tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ff(t);if(e){var o=Ff(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zf(this,n)}}function zf(t,e){if(e&&("object"===Mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ff(t){return(Ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var If=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tf(t,e)}(i,t);var e,n,r,o=Rf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.valueCol=t.valueCol,e.value=t.value||function(t,e,n,r,o){return 1},e.color=t.color||function(){return"#EA6BAC"},e.width=t.width||function(t,e,n,r){return e*t.value/5},e.orientation=t.orientation,e.fillColor=t.fillColor,e}return e=i,r=[{key:"getSideStatistics",value:function(t,e){if(t&&0!=t.length){var n,r=1/0,o=-1/0,i=jf(t);try{for(i.s();!(n=i.n()).done;){var a=n.value.value;e&&!a||(a<r&&(r=a),a>o&&(o=a))}}catch(t){i.e(t)}finally{i.f()}return{min:r,max:o}}}}],(n=[{key:"draw",value:function(t,e,n){var r,o=this,a=n.getZf();this.valueCol&&(r=yr.getStatistics(t,(function(t){return t[o.valueCol]}),!0));var f=[];t.sort((function(t,e){return e.x==t.x?t.y-e.y:t.x-e.x}));for(var c=t[0],u=1;u<t.length;u++){var l=t[u];c.y+e==l.y&&c.x==l.x?f.push({x:c.x,y:l.y,or:"h",value:this.value(c[this.valueCol],l[this.valueCol],e,r,a)}):(f.push({x:c.x,y:c.y+e,or:"h",value:this.value(c[this.valueCol],void 0,e,r,a)}),f.push({x:l.x,y:l.y,or:"h",value:this.value(void 0,l[this.valueCol],e,r,a)})),c=l}t.sort((function(t,e){return e.y==t.y?t.x-e.x:t.y-e.y})),c=t[0];for(var s=1;s<t.length;s++){var h=t[s];c.x+e==h.x&&c.y==h.y?f.push({x:c.x+e,y:c.y,or:"v",value:this.value(c[this.valueCol],h[this.valueCol],e,r,a)}):(f.push({x:c.x+e,y:c.y,or:"v",value:this.value(c[this.valueCol],void 0,e,r,a)}),f.push({x:h.x,y:h.y,or:"v",value:this.value(void 0,h[this.valueCol],e,r,a)})),c=h}var d=i.getSideStatistics(f,!0);if(n.setCanvasTransform(),this.fillColor){var y,p=jf(t);try{for(p.s();!(y=p.n()).done;){var b=y.value,v=this.fillColor(b);v&&"none"!=v&&(n.ctx.fillStyle=v,n.ctx.fillRect(b.x,b.y,e,e))}}catch(t){p.e(t)}finally{p.f()}}n.ctx.lineCap="butt";for(var g=e/2,m=0,w=f;m<w.length;m++){var x=w[m],S=this.color?this.color(x,e,d):void 0;if(S){var _=this.width?this.width(x,e,d,a):void 0;!_||_<0||(n.ctx.strokeStyle=S,n.ctx.lineWidth=_,n.ctx.beginPath(),90==this.orientation?(n.ctx.moveTo(x.x+g,x.y+g),"h"===x.or?n.ctx.lineTo(x.x+g,x.y-g):n.ctx.lineTo(x.x-g,x.y+g)):(n.ctx.moveTo(x.x,x.y),n.ctx.lineTo(x.x+("h"===x.or?e:0),x.y+("v"===x.or?e:0))),n.ctx.stroke())}}this.updateLegends({style:this,r:e,zf:a})}}])&&Ef(e.prototype,n),r&&Ef(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr),Nf=function t(e){function n(t,n){var r,o;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=r)i=r,r=null;else do{r=2*e()-1,i=2*e()-1,o=r*r+i*i}while(!o||o>1);return t+n*i*Math.sqrt(-2*Math.log(o)/o)}}return n.source=t,n}(Math.random);function Lf(t,e){var n=document.createElement("canvas");n.setAttribute("width",t),n.setAttribute("height",e);var r=n.getContext("webgl");if(!r)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");return{canvas:n,gl:r}}function Bf(t){var e=t.createProgram();if(null==e)throw new Error("Cannot create webGL program");for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0,a=r;i<a.length;i++){var f=a[i];t.attachShader(e,f)}if(t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS))return e;throw new Error(t.getProgramInfoLog(e)||"Cannot create webGL program (2)")}function Df(t,e){var n=t.createShader(e);if(null==n)throw new Error("Cannot create webGL shader");for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];if(t.shaderSource(n,o.join("\n")),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))return n;throw new Error(t.getShaderInfoLog(n)||"Cannot create webGL shader (2)")}function Gf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Zf=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.sizePix=n||10,this.program=Bf(e,Df(e,e.VERTEX_SHADER,"\n attribute vec2 pos;\n uniform float sizePix;\n uniform mat3 mat;\n attribute vec4 color;\n varying vec4 vColor;\n void main() {\n gl_Position = vec4(mat * vec3(pos, 1.0), 1.0);\n gl_PointSize = sizePix;\n vColor = color;\n }\n "),Df(e,e.FRAGMENT_SHADER,"\n precision mediump float;\n varying vec4 vColor;\n void main(void) {\n vec4 vColor_ = vColor / 255.0;\n vColor_[3] = 255.0 * vColor_[3];\n gl_FragColor = vColor_;\n }")),e.useProgram(this.program),this.verticesBuffer=[],this.colorsBuffer=[]}var e,n,r;return e=t,(n=[{key:"addPointData",value:function(t,e,n){var r=Ee(n);r&&(this.verticesBuffer.push(t,e),this.colorsBuffer.push(r.r,r.g,r.b,r.opacity))}},{key:"addPointData2",value:function(t,e,n,r,o,i){this.verticesBuffer.push(t,e),this.colorsBuffer.push(n,r,o,i)}},{key:"draw",value:function(t){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,e.createBuffer()),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.verticesBuffer),e.STATIC_DRAW);var n=e.getAttribLocation(this.program,"pos");e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,e.createBuffer()),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.colorsBuffer),e.STATIC_DRAW);var r=e.getAttribLocation(this.program,"color");e.vertexAttribPointer(r,4,e.FLOAT,!1,0,0),e.enableVertexAttribArray(r),e.uniform1f(e.getUniformLocation(this.program,"sizePix"),1*this.sizePix),e.uniformMatrix3fv(e.getUniformLocation(this.program,"mat"),!1,new Float32Array(t)),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.POINTS,0,this.verticesBuffer.length/2)}}])&&Gf(e.prototype,n),r&&Gf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Wf(t){return(Wf="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})(t)}function Uf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function $f(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 Yf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vf(t,e){return(Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Hf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=qf(t);if(e){var o=qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xf(this,n)}}function Xf(t,e){if(e&&("object"===Wf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vf(t,e)}(i,t);var e,n,r,o=Hf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.col=t.col,e.nb=t.nb||function(t,e,n,r){return.3*e*e/(r*r)*t/n.max},e.color=t.color||function(){return"#FF5733"},e.dotSize=t.dotSize,e.sigma=t.sigma,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();if(this.col&&(r=yr.getStatistics(t,(function(t){return t[o.col]}),!0)),r){var a=this.dotSize?this.dotSize(e,i):2*i,f=this.sigma?this.sigma(e):.4*e,c=Nf(0,f);if(function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}()){var u=Lf(n.w+"",n.h+"");if(!u)return void console.error("No webGL");var l,s,h,d,y,p,b,v=new Zf(u.gl,a/i),g=e/2,m=Uf(t);try{for(m.s();!(b=m.n()).done;){var w=b.value;if((l=this.color(w))&&"none"!==l){if(s=this.offset(w,e,i),h=this.nb(w[this.col],e,r,i),d=w.x+s.dx+g,y=w.y+s.dy+g,!(p=Ee(l)))return;for(var x=0;x<=h;x++)v.addPointData2(d+c(),y+c(),p.r,p.g,p.b,p.opacity)}}}catch(t){m.e(t)}finally{m.f()}v.draw(n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(u.canvas,0,0)}else{n.setCanvasTransform();var S,_=Uf(t);try{for(_.s();!(S=_.n()).done;){var k=S.value,C=this.color(k);if(C&&"none"!==C){n.ctx.fillStyle=C;for(var O=this.offset(k,e,i),P=this.nb(k[this.col],e,r,i),M=k.x+O.dx+e/2,j=k.y+O.dy+e/2,A=0;A<=P;A++)n.ctx.fillRect(M+c(),j+c(),a,a)}}}catch(t){_.e(t)}finally{_.f()}}this.updateLegends({style:this,r:e,zf:i})}}}])&&Yf(e.prototype,n),r&&Yf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Jf(t){return(Jf="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})(t)}function Qf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tc(t,e){return(tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ec(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rc(t);if(e){var o=rc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nc(this,n)}}function nc(t,e){if(e&&("object"===Jf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rc(t){return(rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tc(t,e)}(i,t);var e,n,r,o=ec(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.size=t.size,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[o.colorCol]}),!0));var a=Lf(n.w+"",n.h+"");if(a){for(var f,c,u=this.size?this.size(e,i):e+.2*i,l=new Zf(a.gl,u/i),s=e/2,h=t.length,d=0;d<h;d++)c=t[d],(f=this.color?this.color(c[this.colorCol],e,r):void 0)&&"none"!==f&&l.addPointData(c.x+s,c.y+s,f);l.draw(n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(a.canvas,0,0),this.updateLegends({style:this,r:e,zf:i,sColor:r})}else console.error("No webGL")}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}}])&&Qf(e.prototype,n),r&&Qf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ac=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"get",value:function(t,e){(e=e||{}).colors=e.colors||["#a9bb9e","#c9dcaa","#f0f1af","#fde89f","#f9a579","#eb444b"],e.breaks=e.breaks,e.valueStretch=e.valueStretch,e.colDark=e.colDark||"#111",e.colBright=e.colBright||"#ddd",e.widthFactor=e.widthFactor||.1;var n=function(t){if(e.breaks){for(var n=0;n<e.breaks.length;n++)if(t<e.breaks[n])return n;return e.breaks.length}if(e.valueStretch){for(var r=t,o=e.colors.length,i=0;i<o-1;i++)if(r<=(i+1)/o)return i;return o-1}return NaN};return[new oc({colorCol:t,color:function(t,r,o,i){if(0!=t||!e.valueStretch||!isNaN(e.valueStretch(t,r,o,i)))return e.colors[n(e.valueStretch?e.valueStretch(t,r,o,i):t)]},size:function(t,e){return t+.5*e}}),new If({valueCol:t,value:function(t,r,o,i,a){var f=e.valueStretch?e.valueStretch(t,o,i,a):t,c=e.valueStretch?e.valueStretch(r,o,i,a):r;return f&&!isNaN(f)||c&&!isNaN(c)?!f||isNaN(f)?n(c):!c||isNaN(c)?-n(f):n(c)-n(f):0},color:function(t,n,r,o){if(0!==t.value)return"v"===t.or?t.value>0?e.colBright:e.colDark:t.value>0?e.colDark:e.colBright},width:function(t,n,r,o){return e.widthFactor*n*Math.abs(t.value)*("v"===t.or?.5:1)}})]}}],(n=null)&&ic(e.prototype,n),r&&ic(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fc(t){return(fc="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})(t)}function cc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return uc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uc(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function uc(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 lc(t,e){return(lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dc(t);if(e){var o=dc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hc(this,n)}}function hc(t,e){if(e&&("object"===fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dc(t){return(dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function yc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bc(t,e,n){return e&&pc(t.prototype,e),n&&pc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var vc=function(){function t(){yc(this,t)}return bc(t,null,[{key:"get",value:function(t,e){(e=e||{}).colors=e.colors||["#00852b","#afd246","#fac80a","#d67923","#bb805a","#cb4e29","#b40000","#720012"],e.breaks=e.breaks,e.valueStretch=e.valueStretch,e.colDark=e.colDark||"#333",e.colBright=e.colBright||"#aaa",e.widthFactor=e.widthFactor||.05;var n=function(t){if(e.breaks){for(var n=0;n<e.breaks.length;n++)if(t<e.breaks[n])return n;return e.breaks.length}if(e.valueStretch){for(var r=t,o=e.colors.length,i=0;i<o-1;i++)if(r<=(i+1)/o)return i;return o-1}return NaN};return[new oc({colorCol:t,color:function(t,r,o,i){if(0!=t||!e.valueStretch||!isNaN(e.valueStretch(t,r,o,i)))return e.colors[n(e.valueStretch?e.valueStretch(t,r,o,i):t)]}}),new If({valueCol:t,value:function(t,r,o,i,a){var f=e.valueStretch?e.valueStretch(t,o,i,a):t,c=e.valueStretch?e.valueStretch(r,o,i,a):r;return f&&!isNaN(f)||c&&!isNaN(c)?!f||isNaN(f)?n(c):!c||isNaN(c)?-n(f):n(c)-n(f):0},color:function(t,n,r,o){return 0===t.value?e.colDark:"v"===t.or?t.value>0?e.colBright:e.colDark:t.value>0?e.colDark:e.colBright},width:function(t,n,r,o){return 0==t.value?.75*o:e.widthFactor*n*Math.abs(t.value)*("v"===t.or?.5:1)}}),new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lc(t,e)}(r,t);var n=sc(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return yc(this,r),n.call(this,t)}return bc(r,[{key:"draw",value:function(t,n,r){r.ctx.lineWidth=.6*r.getZf(),r.ctx.strokeStyle=e.colDark;var o,i=cc(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;r.ctx.beginPath(),r.ctx.arc(a.x+.5*n,a.y+.5*n,.55*n*.5,Math.PI/4,-Math.PI*(3/4),!0),r.ctx.stroke()}}catch(t){i.e(t)}finally{i.f()}r.ctx.strokeStyle=e.colBright;var f,c=cc(t);try{for(c.s();!(f=c.n()).done;){var u=f.value;r.ctx.beginPath(),r.ctx.arc(u.x+.5*n,u.y+.5*n,.55*n*.5,Math.PI/4,-Math.PI*(3/4),!1),r.ctx.stroke()}}catch(t){c.e(t)}finally{c.f()}}}]),r}(yr))]}}]),t}();function gc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wc=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;gc(this,t),this.gl=e;var i=Df(e,e.VERTEX_SHADER,"\n attribute vec2 pos;\n uniform float sizePix;\n uniform mat3 mat;\n\n attribute float t;\n varying float vt;\n\n void main() {\n gl_Position = vec4(mat * vec3(pos, 1.0), 1.0);\n gl_PointSize = sizePix;\n vt = t;\n }\n "),a="\n precision mediump float;\n varying float vt;\n uniform float deformationFactor;"+function(){for(var t=[],e=0;e<n.length;e++)t.push("uniform vec4 c"+e+";");return t.join("")}()+"void main(void) {\n float t = pow(vt, deformationFactor);";2==n.length?a+="\n vec4 cI=c0;\n vec4 cF=c1;":3==n.length?a+="\n vec4 cI;\n vec4 cF;\n if(t<0.5) { cI=c0; cF=c1; t=t*2.0; }\n else { cI=c1; cF=c2; t=(t-0.5)*2.0; }":4==n.length?a+="\n vec4 cI;\n vec4 cF;\n if(t<1.0/3.0) { cI=c0; cF=c1; t=t*3.0; }\n else if(t<2.0/3.0) { cI=c1; cF=c2; t=(t-1.0/3.0)*3.0; }\n else { cI=c2; cF=c3; t=(t-2.0/3.0)*3.0; }":5==n.length&&(a+="\n vec4 cI;\n vec4 cF;\n if(t<0.25) { cI=c0; cF=c1; t=t*4.0; }\n else if(t<0.5) { cI=c1; cF=c2; t=(t-0.25)*4.0; }\n else if(t<0.75) { cI=c2; cF=c3; t=(t-0.5)*4.0; }\n else { cI=c3; cF=c4; t=(t-0.75)*4.0; }"),1==n.length?a+="gl_FragColor = vec4(c0[0], c0[1], c0[2], c0[3]);}":n.length<=5&&n.length>1?a+="gl_FragColor = mix(cI, cF, t);}":a+="gl_FragColor = vec4(0.5, 0.5, 0.5, 1.0);}";var f=Df(e,e.FRAGMENT_SHADER,a);this.program=Bf(e,i,f),e.useProgram(this.program),e.uniform1f(e.getUniformLocation(this.program,"sizePix"),1*o),e.uniform1f(e.getUniformLocation(this.program,"deformationFactor"),1*r);for(var c=0;c<n.length;c++){var u=Ee(n[c]);e.uniform4fv(e.getUniformLocation(this.program,"c"+c),[+u.r/255,+u.g/255,+u.b/255,+u.opacity])}}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=this.gl,o=this.program;r.bindBuffer(r.ARRAY_BUFFER,r.createBuffer()),r.bufferData(r.ARRAY_BUFFER,new Float32Array(t),r.STATIC_DRAW);var i=r.getAttribLocation(o,"pos");r.vertexAttribPointer(i,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(i),r.bindBuffer(r.ARRAY_BUFFER,r.createBuffer()),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e),r.STATIC_DRAW);var a=r.getAttribLocation(o,"t");r.vertexAttribPointer(a,1,r.FLOAT,!1,0,0),r.enableVertexAttribArray(a),r.uniformMatrix3fv(r.getUniformLocation(o,"mat"),!1,new Float32Array(n)),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.POINTS,0,t.length/2)}}])&&mc(e.prototype,n),r&&mc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xc(t){return(xc="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})(t)}function Sc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _c(t,e){return(_c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Oc(t);if(e){var o=Oc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cc(this,n)}}function Cc(t,e){if(e&&("object"===xc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Oc(t){return(Oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_c(t,e)}(i,t);var e,n,r,o=kc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.tFun=t.tFun||function(t,e,n){return t/n.max},e.deformationFactor=t.deformationFactor||1,e.colors=t.colors||["rgb(158, 1, 66)","rgb(248, 142, 83)","rgb(251, 248, 176)","rgb(137, 207, 165)","rgb(94, 79, 162)"].reverse(),t.color&&(e.colors=[t.color(0),t.color(.25),t.color(.5),t.color(.75),t.color(1)]),e.size=t.size,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r=this,o=n.getZf(),i=yr.getStatistics(t,(function(t){return t[r.colorCol]}),!0);if(i){var a=Lf(n.w+"",n.h+"");if(a){for(var f,c=e/2,u=t.length,l=[],s=[],h=0;h<u;h++){f=t[h];var d=this.tFun(f[this.colorCol],e,i);null!=d&&null!=d&&(l.push(f.x+c,f.y+c),s.push(d))}var y=this.size?this.size(e,o):e+.2*o;new wc(a.gl,this.colors,this.deformationFactor,y/o).draw(l,s,n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(a.canvas,0,0),this.updateLegends({style:this,r:e,zf:o,sColor:i})}else console.error("No webGL")}}}])&&Sc(e.prototype,n),r&&Sc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Mc(t){return(Mc="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})(t)}function jc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ac(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ac(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Ac(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 Ec(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tc(t,e){return(Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fc(t);if(e){var o=Fc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zc(this,n)}}function zc(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fc(t){return(Fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ic=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tc(t,e)}(i,t);var e,n,r,o=Rc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.mosaicFactor=t.mosaicFactor||.15,e.shadowFactor=t.shadowFactor||.2,e.shadowColor=t.shadowColor||"#555",e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[o.colorCol]}),!0)),n.ctx.strokeStyle=this.shadowColor,n.ctx.lineWidth=this.shadowFactor*e,n.ctx.lineJoin="round",n.ctx.lineCap="butt";var a=e*this.mosaicFactor,f=function(){return{x:Math.random()*a,y:Math.random()*a}};n.setCanvasTransform();var c,u=jc(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.color?this.color(l[this.colorCol],e,r):void 0;if(s&&"none"!==s){n.ctx.fillStyle=s;var h=this.offset(l,e,i),d=f(),y=f(),p=f(),b=f();n.ctx.beginPath(),n.ctx.moveTo(l.x+h.dx+d.x,l.y+h.dy+d.y),n.ctx.lineTo(l.x+h.dx+e-p.x,l.y+h.dy+p.y),n.ctx.lineTo(l.x+h.dx+e-b.x,l.y+h.dy+e-b.y),n.ctx.stroke(),n.ctx.beginPath(),n.ctx.moveTo(l.x+h.dx+d.x,l.y+h.dy+d.y),n.ctx.lineTo(l.x+h.dx+e-p.x,l.y+h.dy+p.y),n.ctx.lineTo(l.x+h.dx+e-b.x,l.y+h.dy+e-b.y),n.ctx.lineTo(l.x+h.dx+y.x,l.y+h.dy+e-y.y),n.ctx.fill()}}}catch(t){u.e(t)}finally{u.f()}this.updateLegends({style:this,r:e,zf:i,sColor:r})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}}])&&Ec(e.prototype,n),r&&Ec(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Nc(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)]}var Lc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(t){if(!(e=Lc.exec(t)))throw new Error("invalid format: "+t);var e;return new Dc({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 Dc(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+""}Bc.prototype=Dc.prototype,Dc.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 Gc,Zc,Wc,Uc=function(t,e){var n=Nc(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},$c={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Uc(100*t,e),r:Uc,s:function(t,e){var n=Nc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Gc=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Nc(t,Math.max(0,e+i-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)},Yc=function(t){return t},Vc=Array.prototype.map,Hc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xc(t){return(Xc="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})(t)}function qc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kc(t,e){return(Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tu(t);if(e){var o=tu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qc(this,n)}}function Qc(t,e){if(e&&("object"===Xc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tu(t){return(tu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Zc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Yc:(e=Vc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var o=t.length,i=[],a=0,f=e[0],c=0;o>0&&f>0&&(c+f+1>r&&(f=Math.max(1,r-c)),i.push(t.substring(o-=f,o+f)),!((c+=f+1)>r));)f=e[a=(a+1)%e.length];return i.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",f=void 0===t.numerals?Yc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Vc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function s(t){var e=(t=Bc(t)).fill,n=t.align,s=t.sign,h=t.symbol,d=t.zero,y=t.width,p=t.comma,b=t.precision,v=t.trim,g=t.type;"n"===g?(p=!0,g="g"):$c[g]||(void 0===b&&(b=12),v=!0,g="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var m="$"===h?o:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===h?i:/[%p]/.test(g)?c:"",x=$c[g],S=/[defgprs%]/.test(g);function _(t){var o,i,c,h=m,_=w;if("c"===g)_=x(t)+_,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),b),v&&(t=function(t){t:for(var e,n=t.length,r=1,o=-1;r<n;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;default:if(!+t[r])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==s&&(k=!1),h=(k?"("===s?s:u:"-"===s||"("===s?"":s)+h,_=("s"===g?Hc[8+Gc/3]:"")+_+(k&&"("===s?")":""),S)for(o=-1,i=t.length;++o<i;)if(48>(c=t.charCodeAt(o))||c>57){_=(46===c?a+t.slice(o+1):t.slice(o))+_,t=t.slice(0,o);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+_.length,O=C<y?new Array(y-C+1).join(e):"";switch(p&&d&&(t=r(O+t,O.length?y-_.length:1/0),O=""),n){case"<":t=h+t+_+O;break;case"=":t=h+O+t+_;break;case"^":t=O.slice(0,C=O.length>>1)+h+t+_+O.slice(C);break;default:t=O+h+t+_}return f(t)}return b=void 0===b?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),_.toString=function(){return t+""},_}return{format:s,formatPrefix:function(t,e){var n,r=s(((t=Bc(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=Nc(Math.abs(n)))?n[1]:NaN)/3)))),i=Math.pow(10,-o),a=Hc[8+o/3];return function(t){return r(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Wc=Zc.format,Zc.formatPrefix;var eu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kc(t,e)}(i,t);var e,n,r,o=Jc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorRamp=t.colorRamp,e.fun=t.fun,e.title=t.title,e.tickSize=t.tickSize||6,e.width=t.width||300,e.height=t.height||15,e.margin=t.margin||5,e.ticks=t.ticks||Math.floor(e.width/50),e.tickFormat=t.tickFormat||".0f",e.tickUnit=t.tickUnit,e.fontSize=t.fontSize||"0.8em",e.invert=t.invert,e}return e=i,(n=[{key:"update",value:function(t){if(t.sColor){this.div.selectAll("*").remove();var e=this.width+2*this.margin,n=this.height+3*this.margin+12+this.tickSize+10,r=this.div.append("svg").attr("width",e).attr("height",n);r.append("text").attr("x",this.margin).attr("y",this.margin).style("font-size","0.8em").style("font-weight","bold").style("alignment-baseline","top").style("dominant-baseline","hanging").style("pointer-events","none").text(this.title);for(var o=r.append("g").attr("transform","translate("+this.margin+" "+(2*this.margin+12)+")"),i=this.width,a=this.height,f=0;f<i;f+=5){var c=f/(i-1);this.invert&&(c=1-c),o.append("rect").attr("x",f).attr("y",0).attr("width",5).attr("height",a).style("fill",this.colorRamp(c))}for(var u=0;u<this.ticks;u++){var l=u/(this.ticks-1);o.append("line").attr("x1",i*l).attr("y1",0).attr("x2",i*l).attr("y2",a+this.tickSize).style("stroke","black"),o.append("text").attr("id","ticklabel_"+u).attr("x",i*l).attr("y",a+this.tickSize+2).style("font-size",this.fontSize).style("text-anchor",0==u?"start":u==this.ticks-1?"end":"middle").style("alignment-baseline","top").style("dominant-baseline","hanging").style("pointer-events","none")}for(var s=this.tickFormat&&"text"!=this.tickFormat?Wc(this.tickFormat):function(t){return t},h=0;h<this.ticks;h++){var d=h/(this.ticks-1),y=this.fun(d,t.r,t.sColor),p=(y?s(y):"0")+(this.tickUnit?this.tickUnit:"");this.div.select("#ticklabel_"+h).text(p)}}}}])&&qc(e.prototype,n),r&&qc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function nu(t){return(nu="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})(t)}function ru(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ou(t,e){return(ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fu(t);if(e){var o=fu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return au(this,n)}}function au(t,e){if(e&&("object"===nu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fu(t){return(fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ou(t,e)}(i,t);var e,n,r,o=iu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colCat=t.colCat||[["gray","-"]],e.shape=t.shape||"circle",e.dimension=t.dimension||{r:8},e.strokeColor=t.strokeColor||"gray",e.strokeWidth=t.strokeWidth||1,e.title=t.title,e.titleFontSize=t.titleFontSize||"0.8em",e.titleFontWeight=t.titleFontWeight||"bold",e.labelFontSize=t.labelFontSize||"0.8em",e}return e=i,(n=[{key:"update",value:function(t){this.div.selectAll("*").remove(),this.title&&this.div.append("div").style("font-size",this.titleFontSize).style("font-weight",this.titleFontWeight).style("margin-bottom","7px").text(this.title);var e=this.colCat.length;if(0!=e)for(var n=0;n<e;n++){var r=this.colCat[n],o=this.div.append("div"),i=this.strokeWidth;if("square"===this.shape)o.append("svg").attr("width",(this.dimension.w||20)+2*i).attr("height",(this.dimension.h||15)+2*i).append("rect").attr("x",i).attr("y",i).attr("width",(this.dimension.w||20)+2*i).attr("height",(this.dimension.h||15)+2*i).style("fill",r[0]).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth);else{if("circle"!==this.shape)throw new Error("Unexpected shape:"+this.shape);var a=this.dimension.r||8;o.append("svg").attr("width",2*a+2*i).attr("height",2*a+2*i).append("circle").attr("cx",a+i).attr("cy",a+i).attr("r",a).style("fill",r[0]).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth)}o.append("div").style("float","right").style("padding-left","5px").style("font-size",this.labelFontSize).text(r[1])}}}])&&ru(e.prototype,n),r&&ru(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function uu(t){return(uu="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})(t)}function lu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function su(t,e){return(su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yu(t);if(e){var o=yu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return du(this,n)}}function du(t,e){if(e&&("object"===uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yu(t){return(yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(i,t);var e,n,r,o=hu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.exaggerationFactor=t.exaggerationFactor||.8,e.shape=t.shape||"circle",e.fillColor=t.fillColor||"none",e.strokeColor=t.strokeColor||"gray",e.strokeWidth=t.strokeWidth||1,e.labelFontSize=t.labelFontSize||"0.8em",e.labelUnitText=t.labelUnitText||"",e.labelFormat=t.labelFormat||",.2r",e}return e=i,(n=[{key:"update",value:function(t){if(t.sSize){this.div.selectAll("*").remove();var e=t.sSize.max*this.exaggerationFactor,n=Math.log10(e);n=Math.floor(n);var r=Math.pow(10,n);8*r<=e?r*=8:6*r<=e?r*=6:5*r<=e?r*=5:4*r<=e?r*=4:2.5*r<=e?r*=2.5:2*r<=e&&(r*=2);var o=t.style.getSize()(r,t.r,t.sSize,t.zf)/t.zf,i=this.div.append("svg").attr("width",o+this.strokeWidth+2).attr("height",o+this.strokeWidth+2).style("","inline-block");if("square"===this.shape)i.append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",o).style("fill",this.fillColor).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth);else if("circle"===this.shape){var a=.5*(o+this.strokeWidth);i.append("circle").attr("cx",a+1).attr("cy",a+1).attr("r",a).style("fill",this.fillColor).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth)}else if("donut"!==this.shape)throw new Error("Unexpected shape:"+this.shape);var f=Wc(this.labelFormat)(r);this.div.append("div").style("display","inline-block").style("left","4px").style("font-size",this.labelFontSize).text(f+(this.labelUnitText?" ":"")+this.labelUnitText)}}}])&&lu(e.prototype,n),r&&lu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function bu(t){return(bu="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})(t)}function vu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gu(t,e){return(gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xu(t);if(e){var o=xu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wu(this,n)}}function wu(t,e){if(e&&("object"===bu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xu(t){return(xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Su=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gu(t,e)}(i,t);var e,n,r,o=mu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.exaggerationFactor=t.exaggerationFactor||.5,e.color=t.color||"gray",e.orientation=t.orientation||0,e.labelFontSize=t.labelFontSize||"0.8em",e.labelUnitText=t.labelUnitText||"",e.div.style("text-align","center"),e}return e=i,(n=[{key:"update",value:function(t){if(t.sWidth){this.div.selectAll("*").remove();var e=t.sWidth.max*this.exaggerationFactor,n=Math.log10(e);n=Math.floor(n);var r=Math.pow(10,n);8*r<=e?r*=8:6*r<=e?r*=6:5*r<=e?r*=5:4*r<=e?r*=4:2.5*r<=e?r*=2.5:2*r<=e&&(r*=2);var o=t.style.getWidth()(r,t.r,t.sWidth,t.zf)/t.zf,i=1*t.r/t.zf;this.div.append("svg").attr("width",i).attr("height",o).style("","inline-block").append("line").attr("x1",0).attr("y1",o/2).attr("x2",i).attr("y2",o/2).style("stroke",this.color).style("stroke-width",o);var a=Wc(",.2r")(r);this.div.append("div").style("font-size",this.labelFontSize).style("","inline-block").text(a+(this.labelUnitText?" ":"")+this.labelUnitText)}}}])&&vu(e.prototype,n),r&&vu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function _u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1.01,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(n=n||1.01)<1&&console.error("Unexpected value for factor: "+n+". Set to default value 1.01");var a=t.getZoomFactor();if(e!=a){e<a&&(n=1/n);var f=a,c=setInterval((function(){f=t.getZoomFactor()*n,e>a&&f>e&&(f=e),e<a&&f<e&&(f=e),t.setZoomFactor(f),t.cg.redraw(),f==e&&(clearInterval(c),o&&setTimeout((function(){o()}),i))}),r);return c}}function ku(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,c=t.getZoomFactor(),u=t.getGeoCenter();e=isNaN(e)?u.x:e,n=isNaN(n)?u.y:n,r=isNaN(r)?c:r;var l=e-u.x,s=n-u.y,h=Math.hypot(l,s),d=o*c*l/h,y=o*c*s/h,p=r/c,b=h/(o*c),v=h>0?Math.pow(p,1/b):Math.pow(p,.1),g=setInterval((function(){if(h>0){var o=t.getGeoCenter(),i=o.x+d,c=o.y+y;i<e&&e<o.x&&(i=e),o.x<e&&e<i&&(i=e),c<n&&n<o.y&&(c=n),o.y<n&&n<c&&(c=n),t.setGeoCenter({x:i,y:c}),i==e&&c==n&&(h=0)}if(1!=p){var u=t.getZoomFactor(),l=v*u;l<r&&r<u&&(l=r),u<r&&r<l&&(l=r),t.setZoomFactor(l),l==r&&(p=1)}t.cg.redraw(),0==h&&1==p&&(console.log("OK !"),clearInterval(g),a&&setTimeout((function(){a()}),f))}),i);return g}var Cu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Math.pow(t,e)},Ou=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 1-Math.pow(1-t,1/e)},Pu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 0==e?t:(Math.exp(t*e)-1)/(Math.exp(e)-1)},Mu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 0==e?t:1-1/e*Math.log(Math.exp(e)*(1-t)+t)},ju=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.8;if(0==e)return t;if(1==e)return Math.sqrt(2*t-t*t);var n=e/(1-e);return Math.sqrt(1/(n*n)+2*t/n+2*t-t*t)-1/n},Au=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.8;return ju(1-t,e)},Eu=1e-6,Tu=Math.PI,Ru=Tu/2,zu=Tu/4,Fu=2*Tu,Iu=180/Tu,Nu=Tu/180,Lu=Math.abs,Bu=Math.atan,Du=Math.atan2,Gu=Math.cos,Zu=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),Wu=Math.sign||function(t){return t>0?1:t<0?-1:0},Uu=Math.sqrt;Math.tan;function $u(t){return t>1?Ru:t<-1?-Ru:Math.asin(t)}function Yu(){}var Vu=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Yu,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},Hu=function(t,e){return Lu(t[0]-e[0])<Eu&&Lu(t[1]-e[1])<Eu};function Xu(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var qu=function(t,e,n,r,o){var i,a,f=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Hu(r,a)){if(!r[2]&&!a[2]){for(o.lineStart(),i=0;i<e;++i)o.point((r=t[i])[0],r[1]);return void o.lineEnd()}a[0]+=2*Eu}f.push(n=new Xu(r,t,null,!0)),c.push(n.o=new Xu(r,null,n,!1)),f.push(n=new Xu(a,t,null,!1)),c.push(n.o=new Xu(a,null,n,!0))}})),f.length){for(c.sort(e),Ku(f),Ku(c),i=0,a=c.length;i<a;++i)c[i].e=n=!n;for(var u,l,s=f[0];;){for(var h=s,d=!0;h.v;)if((h=h.n)===s)return;u=h.z,o.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(i=0,a=u.length;i<a;++i)o.point((l=u[i])[0],l[1]);else r(h.x,h.n.x,1,o);h=h.n}else{if(d)for(u=h.p.z,i=u.length-1;i>=0;--i)o.point((l=u[i])[0],l[1]);else r(h.x,h.p.x,-1,o);h=h.p}u=(h=h.o).z,d=!d}while(!h.v);o.lineEnd()}}};function Ku(t){if(e=t.length){for(var e,n,r=0,o=t[0];++r<e;)o.n=n=t[r],n.p=o,o=n;o.n=n=t[0],n.p=o}}class Ju{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const o=e[r],i=t+o,a=Math.abs(t)<Math.abs(o)?t-(i-o):o-(i-t);a&&(e[n++]=a),t=i}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,o=this._n,i=0;if(o>0){for(i=t[--o];o>0&&(e=i,n=t[--o],i=e+n,r=n-(i-e),!r););o>0&&(r<0&&t[o-1]<0||r>0&&t[o-1]>0)&&(n=2*r,e=i+n,n==e-i&&(i=e))}return i}}function Qu(t){return[Du(t[1],t[0]),$u(t[2])]}function tl(t){var e=t[0],n=t[1],r=Gu(n);return[r*Gu(e),r*Zu(e),Zu(n)]}function el(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function nl(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 rl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ol(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function il(t){var e=Uu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function al(t){return Lu(t[0])<=Tu?t[0]:Wu(t[0])*((Lu(t[0])+Tu)%Fu-Tu)}function fl(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var cl=function(t,e,n,r){return function(o){var i,a,f,c=e(o),u=Vu(),l=e(u),s=!1,h={point:d,lineStart:p,lineEnd:b,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=m,a=[],i=[]},polygonEnd:function(){h.point=d,h.lineStart=p,h.lineEnd=b,a=fl(a);var t=function(t,e){var n=al(e),r=e[1],o=Zu(r),i=[Zu(n),-Gu(n),0],a=0,f=0,c=new Ju;1===o?r=Ru+Eu:-1===o&&(r=-Ru-Eu);for(var u=0,l=t.length;u<l;++u)if(h=(s=t[u]).length)for(var s,h,d=s[h-1],y=al(d),p=d[1]/2+zu,b=Zu(p),v=Gu(p),g=0;g<h;++g,y=w,b=S,v=_,d=m){var m=s[g],w=al(m),x=m[1]/2+zu,S=Zu(x),_=Gu(x),k=w-y,C=k>=0?1:-1,O=C*k,P=O>Tu,M=b*S;if(c.add(Du(M*C*Zu(O),v*_+M*Gu(O))),a+=P?k+C*Fu:k,P^y>=n^w>=n){var j=nl(tl(d),tl(m));il(j);var A=nl(i,j);il(A);var E=(P^k>=0?-1:1)*$u(A[2]);(r>E||r===E&&(j[0]||j[1]))&&(f+=P^k>=0?1:-1)}}return(a<-Eu||a<Eu&&c<-1e-12)^1&f}(i,r);a.length?(s||(o.polygonStart(),s=!0),qu(a,ll,t,n,o)):t&&(s||(o.polygonStart(),s=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),s&&(o.polygonEnd(),s=!1),a=i=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function d(e,n){t(e,n)&&o.point(e,n)}function y(t,e){c.point(t,e)}function p(){h.point=y,c.lineStart()}function b(){h.point=d,c.lineEnd()}function v(t,e){f.push([t,e]),l.point(t,e)}function g(){l.lineStart(),f=[]}function m(){v(f[0][0],f[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),h=u.result(),d=h.length;if(f.pop(),i.push(f),f=null,d)if(1&c){if((e=(n=h[0]).length-1)>0){for(s||(o.polygonStart(),s=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ul))}return h}};function ul(t){return t.length>1}function ll(t,e){return((t=t.x)[0]<0?t[1]-Ru-Eu:Ru-t[1])-((e=e.x)[0]<0?e[1]-Ru-Eu:Ru-e[1])}var sl=cl((function(){return!0}),(function(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,a){var f=i>0?Tu:-Tu,c=Lu(i-n);Lu(c-Tu)<Eu?(t.point(n,r=(r+a)/2>0?Ru:-Ru),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(f,r),t.point(i,r),e=0):o!==f&&c>=Tu&&(Lu(n-o)<Eu&&(n-=o*Eu),Lu(i-f)<Eu&&(i-=f*Eu),r=function(t,e,n,r){var o,i,a=Zu(t-n);return Lu(a)>Eu?Bu((Zu(e)*(i=Gu(r))*Zu(n)-Zu(r)*(o=Gu(e))*Zu(t))/(o*i*a)):(e+r)/2}(n,r,i,a),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(f,r),e=0),t.point(n=i,r=a),o=f},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var o;if(null==t)o=n*Ru,r.point(-Tu,o),r.point(0,o),r.point(Tu,o),r.point(Tu,0),r.point(Tu,-o),r.point(0,-o),r.point(-Tu,-o),r.point(-Tu,0),r.point(-Tu,o);else if(Lu(t[0]-e[0])>Eu){var i=t[0]<e[0]?Tu:-Tu;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}),[-Tu,-Ru]);var hl=function(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 dl(t,e){return[Lu(t)>Tu?t+Math.round(-t/Fu)*Fu:t,e]}function yl(t,e,n){return(t%=Fu)?e||n?hl(bl(t),vl(e,n)):bl(t):e||n?vl(e,n):dl}function pl(t){return function(e,n){return[(e+=t)>Tu?e-Fu:e<-Tu?e+Fu:e,n]}}function bl(t){var e=pl(t);return e.invert=pl(-t),e}function vl(t,e){var n=Gu(t),r=Zu(t),o=Gu(e),i=Zu(e);function a(t,e){var a=Gu(e),f=Gu(t)*a,c=Zu(t)*a,u=Zu(e),l=u*n+f*r;return[Du(c*o-l*i,f*n-u*r),$u(l*o+c*i)]}return a.invert=function(t,e){var a=Gu(e),f=Gu(t)*a,c=Zu(t)*a,u=Zu(e),l=u*o-c*i;return[Du(c*o+u*i,f*n+l*r),$u(l*n-f*r)]},a}dl.invert=dl;function gl(t,e,n,r,o,i){if(n){var a=Gu(e),f=Zu(e),c=r*n;null==o?(o=e+r*Fu,i=e-c/2):(o=ml(a,o),i=ml(a,i),(r>0?o<i:o>i)&&(o+=r*Fu));for(var u,l=o;r>0?l>i:l<i;l-=c)u=Qu([a,-f*Gu(l),-f*Zu(l)]),t.point(u[0],u[1])}}function ml(t,e){(e=tl(e))[0]-=t,il(e);var n,r=(n=-e[1])>1?0:n<-1?Tu:Math.acos(n);return((-e[2]<0?-r:r)+Fu-Eu)%Fu}var wl=function(t){var e=Gu(t),n=6*Nu,r=e>0,o=Lu(e)>Eu;function i(t,n){return Gu(t)*Gu(n)>e}function a(t,n,r){var o=[1,0,0],i=nl(tl(t),tl(n)),a=el(i,i),f=i[0],c=a-f*f;if(!c)return!r&&t;var u=e*a/c,l=-e*f/c,s=nl(o,i),h=ol(o,u);rl(h,ol(i,l));var d=s,y=el(h,d),p=el(d,d),b=y*y-p*(el(h,h)-1);if(!(b<0)){var v=Uu(b),g=ol(d,(-y-v)/p);if(rl(g,h),g=Qu(g),!r)return g;var m,w=t[0],x=n[0],S=t[1],_=n[1];x<w&&(m=w,w=x,x=m);var k=x-w,C=Lu(k-Tu)<Eu;if(!C&&_<S&&(m=S,S=_,_=m),C||k<Eu?C?S+_>0^g[1]<(Lu(g[0]-w)<Eu?S:_):S<=g[1]&&g[1]<=_:k>Tu^(w<=g[0]&&g[0]<=x)){var O=ol(d,(-y+v)/p);return rl(O,h),[g,Qu(O)]}}}function f(e,n){var o=r?t:Tu-t,i=0;return e<-o?i|=1:e>o&&(i|=2),n<-o?i|=4:n>o&&(i|=8),i}return cl(i,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(s,h){var d,y=[s,h],p=i(s,h),b=r?p?0:f(s,h):p?f(s+(s<0?Tu:-Tu),h):0;if(!e&&(u=c=p)&&t.lineStart(),p!==c&&(!(d=a(e,y))||Hu(e,d)||Hu(y,d))&&(y[2]=1),p!==c)l=0,p?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&r^p){var v;b&n||!(v=a(y,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!p||e&&Hu(e,y)||t.point(y[0],y[1]),e=y,c=p,n=b},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,o,i){gl(i,t,n,o,e,r)}),r?[0,-t]:[-Tu,t-Tu])};function xl(t,e,n,r){function o(o,i){return t<=o&&o<=n&&e<=i&&i<=r}function i(o,i,f,u){var l=0,s=0;if(null==o||(l=a(o,f))!==(s=a(i,f))||c(o,i)<0^f>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+f+4)%4)!==s);else u.point(i[0],i[1])}function a(r,o){return Lu(r[0]-t)<Eu?o>0?0:3:Lu(r[0]-n)<Eu?o>0?2:1:Lu(r[1]-e)<Eu?o>0?1:0:o>0?3:2}function f(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(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(a){var c,u,l,s,h,d,y,p,b,v,g,m=a,w=Vu(),x={point:S,lineStart:function(){x.point=_,u&&u.push(l=[]);v=!0,b=!1,y=p=NaN},lineEnd:function(){c&&(_(s,h),d&&b&&w.rejoin(),c.push(w.result()));x.point=S,b&&m.lineEnd()},polygonStart:function(){m=w,c=[],u=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,o=u.length;n<o;++n)for(var i,a,f=u[n],c=1,l=f.length,s=f[0],h=s[0],d=s[1];c<l;++c)i=h,a=d,s=f[c],h=s[0],d=s[1],a<=r?d>r&&(h-i)*(r-a)>(d-a)*(t-i)&&++e:d<=r&&(h-i)*(r-a)<(d-a)*(t-i)&&--e;return e}(),n=g&&e,o=(c=fl(c)).length;(n||o)&&(a.polygonStart(),n&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&qu(c,f,e,i,a),a.polygonEnd());m=a,c=u=l=null}};function S(t,e){o(t,e)&&m.point(t,e)}function _(i,a){var f=o(i,a);if(u&&l.push([i,a]),v)s=i,h=a,d=f,v=!1,f&&(m.lineStart(),m.point(i,a));else if(f&&b)m.point(i,a);else{var c=[y=Math.max(-1e9,Math.min(1e9,y)),p=Math.max(-1e9,Math.min(1e9,p))],w=[i=Math.max(-1e9,Math.min(1e9,i)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,o,i){var a,f=t[0],c=t[1],u=0,l=1,s=e[0]-f,h=e[1]-c;if(a=n-f,s||!(a>0)){if(a/=s,s<0){if(a<u)return;a<l&&(l=a)}else if(s>0){if(a>l)return;a>u&&(u=a)}if(a=o-f,s||!(a<0)){if(a/=s,s<0){if(a>l)return;a>u&&(u=a)}else if(s>0){if(a<u)return;a<l&&(l=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<l&&(l=a)}else if(h>0){if(a>l)return;a>u&&(u=a)}if(a=i-c,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<l&&(l=a)}return u>0&&(t[0]=f+u*s,t[1]=c+u*h),l<1&&(e[0]=f+l*s,e[1]=c+l*h),!0}}}}}(c,w,t,e,n,r)?f&&(m.lineStart(),m.point(i,a),g=!1):(b||(m.lineStart(),m.point(c[0],c[1])),m.point(w[0],w[1]),f||m.lineEnd(),g=!1)}y=i,p=a,b=f}return x}}var Sl=t=>t;function _l(t){return function(e){var n=new kl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function kl(){}function Cl(t,e){t&&Pl.hasOwnProperty(t.type)&&Pl[t.type](t,e)}kl.prototype={constructor:kl,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 Ol={Feature:function(t,e){Cl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)Cl(n[r].geometry,e)}},Pl={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,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ml(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Ml(n[r],e,0)},Polygon:function(t,e){jl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)jl(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)Cl(n[r],e)}};function Ml(t,e,n){var r,o=-1,i=t.length-n;for(e.lineStart();++o<i;)r=t[o],e.point(r[0],r[1],r[2]);e.lineEnd()}function jl(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ml(t[n],e,1);e.polygonEnd()}var Al=1/0,El=Al,Tl=-Al,Rl=Tl;var zl={point:function(t,e){t<Al&&(Al=t);t>Tl&&(Tl=t);e<El&&(El=e);e>Rl&&(Rl=e)},lineStart:Yu,lineEnd:Yu,polygonStart:Yu,polygonEnd:Yu,result:function(){var t=[[Al,El],[Tl,Rl]];return Tl=Rl=-(El=Al=1/0),t}};function Fl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),function(t,e){t&&Ol.hasOwnProperty(t.type)?Ol[t.type](t,e):Cl(t,e)}(n,t.stream(zl)),e(zl.result()),null!=r&&t.clipExtent(r),t}function Il(t,e,n){return Fl(t,(function(n){var r=e[1][0]-e[0][0],o=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,f=+e[0][1]+(o-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,f])}),n)}var Nl=Gu(30*Nu),Ll=function(t,e){return+e?function(t,e){function n(r,o,i,a,f,c,u,l,s,h,d,y,p,b){var v=u-r,g=l-o,m=v*v+g*g;if(m>4*e&&p--){var w=a+h,x=f+d,S=c+y,_=Uu(w*w+x*x+S*S),k=$u(S/=_),C=Lu(Lu(S)-1)<Eu||Lu(i-s)<Eu?(i+s)/2:Du(x,w),O=t(C,k),P=O[0],M=O[1],j=P-r,A=M-o,E=g*j-v*A;(E*E/m>e||Lu((v*j+g*A)/m-.5)>.3||a*h+f*d+c*y<Nl)&&(n(r,o,i,a,f,c,P,M,C,w/=_,x/=_,S,p,b),b.point(P,M),n(P,M,C,w,x,S,u,l,s,h,d,y,p,b))}}return function(e){var r,o,i,a,f,c,u,l,s,h,d,y,p={point:b,lineStart:v,lineEnd:m,polygonStart:function(){e.polygonStart(),p.lineStart=w},polygonEnd:function(){e.polygonEnd(),p.lineStart=v}};function b(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,p.point=g,e.lineStart()}function g(r,o){var i=tl([r,o]),a=t(r,o);n(l,s,u,h,d,y,l=a[0],s=a[1],u=r,h=i[0],d=i[1],y=i[2],16,e),e.point(l,s)}function m(){p.point=b,e.lineEnd()}function w(){v(),p.point=x,p.lineEnd=S}function x(t,e){g(r=t,e),o=l,i=s,a=h,f=d,c=y,p.point=g}function S(){n(l,s,u,h,d,y,o,i,r,a,f,c,16,e),p.lineEnd=m,m()}return p}}(t,e):function(t){return _l({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var Bl=_l({point:function(t,e){this.stream.point(t*Nu,e*Nu)}});function Dl(t,e,n,r,o,i){if(!i)return function(t,e,n,r,o){function i(i,a){return[e+t*(i*=r),n-t*(a*=o)]}return i.invert=function(i,a){return[(i-e)/t*r,(n-a)/t*o]},i}(t,e,n,r,o);var a=Gu(i),f=Zu(i),c=a*t,u=f*t,l=a/t,s=f/t,h=(f*n-a*e)/t,d=(f*e+a*n)/t;function y(t,i){return[c*(t*=r)-u*(i*=o)+e,n-u*t-c*i]}return y.invert=function(t,e){return[r*(l*t-s*e+h),o*(d-s*t-l*e)]},y}function Gl(t){return function(t){var e,n,r,o,i,a,f,c,u,l,s=150,h=480,d=250,y=0,p=0,b=0,v=0,g=0,m=0,w=1,x=1,S=null,_=sl,k=null,C=Sl,O=.5;function P(t){return c(t[0]*Nu,t[1]*Nu)}function M(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Iu,t[1]*Iu]}function j(){var t=Dl(s,0,0,w,x,m).apply(null,e(y,p)),r=Dl(s,h-t[0],d-t[1],w,x,m);return n=yl(b,v,g),f=hl(e,r),c=hl(n,f),a=Ll(f,O),A()}function A(){return u=l=null,P}return P.stream=function(t){return u&&l===t?u:u=Bl(function(t){return _l({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(a(C(l=t)))))},P.preclip=function(t){return arguments.length?(_=t,S=void 0,A()):_},P.postclip=function(t){return arguments.length?(C=t,k=r=o=i=null,A()):C},P.clipAngle=function(t){return arguments.length?(_=+t?wl(S=t*Nu):(S=null,sl),A()):S*Iu},P.clipExtent=function(t){return arguments.length?(C=null==t?(k=r=o=i=null,Sl):xl(k=+t[0][0],r=+t[0][1],o=+t[1][0],i=+t[1][1]),A()):null==k?null:[[k,r],[o,i]]},P.scale=function(t){return arguments.length?(s=+t,j()):s},P.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],j()):[h,d]},P.center=function(t){return arguments.length?(y=t[0]%360*Nu,p=t[1]%360*Nu,j()):[y*Iu,p*Iu]},P.rotate=function(t){return arguments.length?(b=t[0]%360*Nu,v=t[1]%360*Nu,g=t.length>2?t[2]%360*Nu:0,j()):[b*Iu,v*Iu,g*Iu]},P.angle=function(t){return arguments.length?(m=t%360*Nu,j()):m*Iu},P.reflectX=function(t){return arguments.length?(w=t?-1:1,j()):w<0},P.reflectY=function(t){return arguments.length?(x=t?-1:1,j()):x<0},P.precision=function(t){return arguments.length?(a=Ll(f,O=t*t),A()):Uu(O)},P.fitExtent=function(t,e){return Il(P,t,e)},P.fitSize=function(t,e){return function(t,e,n){return Il(t,[[0,0],e],n)}(P,t,e)},P.fitWidth=function(t,e){return function(t,e,n){return Fl(t,(function(n){var r=+e,o=r/(n[1][0]-n[0][0]),i=(r-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([i,a])}),n)}(P,t,e)},P.fitHeight=function(t,e){return function(t,e,n){return Fl(t,(function(n){var r=+e,o=r/(n[1][1]-n[0][1]),i=-o*n[0][0],a=(r-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([i,a])}),n)}(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&M,j()}}((function(){return t}))()}var Zl,Wl,Ul=(Zl=function(t){return Uu(2/(1+t))},function(t,e){var n=Gu(t),r=Gu(e),o=Zl(n*r);return o===1/0?[2,0]:[o*r*Zu(t),o*Zu(e)]});Ul.invert=(Wl=function(t){return 2*$u(t/2)},function(t,e){var n=Uu(t*t+e*e),r=Wl(n),o=Zu(r),i=Gu(r);return[Du(t*o,n*i),$u(n&&e*o/n)]});var $l=function(){return Gl(Ul).scale(124.75).clipAngle(179.999)},Yl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"EUR",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0,r=(n=n||{}).ex||1.2;return n.style=n.style||function(t,e){if(!(t.rs<r*e))return t.r1<r*e?"1em Arial":"1.5em Arial"},n.proj=n.proj||$l().rotate([-10,-52]).reflectX(!1).reflectY(!0).scale(6378137).translate([4321e3,321e4]),n.preprocess=function(t){var e=n.proj([t.lon,t.lat]);t.x=e[0],t.y=e[1],delete t.lon,delete t.lat},n.url="https://raw.githubusercontent.com/eurostat/euronym/main/pub/v1/"+e+"/"+t+".csv",new ho(n)},Vl=function(t){var e=(t=t||{}).nutsYear||"2021",n=t.crs||"3035",r=t.scale||"03M",o=t.nutsLevel||"3",i="#888";return t.color=t.color||function(t,e){var n=t.properties;return"T"===n.co||e<400?i:e<1e3?n.lvl>=3?"":i:e<2e3?n.lvl>=2?"":i:n.lvl>=1?"":i},t.width=t.width||function(t,e){var n=t.properties;return"T"===n.co?.5:e<400?3==n.lvl||2==n.lvl||1==n.lvl?2.2:4:e<1e3?2==n.lvl||1==n.lvl?1.8:2.5:e<2e3?1==n.lvl?1.8:2.5:1.2},t.lineDash=t.lineDash||function(t,e){var n=t.properties;return"T"===n.co?[]:e<400?3==n.lvl?[2*e,2*e]:2==n.lvl||1==n.lvl?[5*e,2*e]:[10*e,3*e]:e<1e3?2==n.lvl||1==n.lvl?[5*e,2*e]:[10*e,3*e]:e<2e3&&1==n.lvl?[5*e,2*e]:[10*e,3*e]},new vo("https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/"+e+"/"+n+"/"+r+"/nutsbn_"+o+".json",t)}},9:function(t,e,n){t.exports=n(10)}})}));
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.gviz=e():t.gviz=e()}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="build/",n(n.s=9)}({10:function(t,e,n){"use strict";function r(){}n.r(e),n.d(e,"App",(function(){return xo})),n.d(e,"Layer",(function(){return vr})),n.d(e,"Dataset",(function(){return cr})),n.d(e,"DatasetComponent",(function(){return rr})),n.d(e,"schemeCategory10",(function(){return _o})),n.d(e,"schemeAccent",(function(){return ko})),n.d(e,"schemeDark2",(function(){return Co})),n.d(e,"schemePaired",(function(){return Oo})),n.d(e,"schemePastel1",(function(){return Po})),n.d(e,"schemePastel2",(function(){return Mo})),n.d(e,"schemeSet1",(function(){return jo})),n.d(e,"schemeSet2",(function(){return Ao})),n.d(e,"schemeSet3",(function(){return Eo})),n.d(e,"schemeTableau10",(function(){return To})),n.d(e,"interpolateBrBG",(function(){return Fo})),n.d(e,"schemeBrBG",(function(){return zo})),n.d(e,"interpolatePRGn",(function(){return No})),n.d(e,"schemePRGn",(function(){return Io})),n.d(e,"interpolatePiYG",(function(){return Bo})),n.d(e,"schemePiYG",(function(){return Lo})),n.d(e,"interpolatePuOr",(function(){return Go})),n.d(e,"schemePuOr",(function(){return Do})),n.d(e,"interpolateRdBu",(function(){return Wo})),n.d(e,"schemeRdBu",(function(){return Zo})),n.d(e,"interpolateRdGy",(function(){return $o})),n.d(e,"schemeRdGy",(function(){return Uo})),n.d(e,"interpolateRdYlBu",(function(){return Vo})),n.d(e,"schemeRdYlBu",(function(){return Yo})),n.d(e,"interpolateRdYlGn",(function(){return Xo})),n.d(e,"schemeRdYlGn",(function(){return Ho})),n.d(e,"interpolateSpectral",(function(){return Ko})),n.d(e,"schemeSpectral",(function(){return qo})),n.d(e,"interpolateBuGn",(function(){return Qo})),n.d(e,"schemeBuGn",(function(){return Jo})),n.d(e,"interpolateBuPu",(function(){return ei})),n.d(e,"schemeBuPu",(function(){return ti})),n.d(e,"interpolateGnBu",(function(){return ri})),n.d(e,"schemeGnBu",(function(){return ni})),n.d(e,"interpolateOrRd",(function(){return ii})),n.d(e,"schemeOrRd",(function(){return oi})),n.d(e,"interpolatePuBuGn",(function(){return fi})),n.d(e,"schemePuBuGn",(function(){return ai})),n.d(e,"interpolatePuBu",(function(){return ui})),n.d(e,"schemePuBu",(function(){return ci})),n.d(e,"interpolatePuRd",(function(){return si})),n.d(e,"schemePuRd",(function(){return li})),n.d(e,"interpolateRdPu",(function(){return di})),n.d(e,"schemeRdPu",(function(){return hi})),n.d(e,"interpolateYlGnBu",(function(){return pi})),n.d(e,"schemeYlGnBu",(function(){return yi})),n.d(e,"interpolateYlGn",(function(){return vi})),n.d(e,"schemeYlGn",(function(){return bi})),n.d(e,"interpolateYlOrBr",(function(){return mi})),n.d(e,"schemeYlOrBr",(function(){return gi})),n.d(e,"interpolateYlOrRd",(function(){return xi})),n.d(e,"schemeYlOrRd",(function(){return wi})),n.d(e,"interpolateBlues",(function(){return _i})),n.d(e,"schemeBlues",(function(){return Si})),n.d(e,"interpolateGreens",(function(){return Ci})),n.d(e,"schemeGreens",(function(){return ki})),n.d(e,"interpolateGreys",(function(){return Pi})),n.d(e,"schemeGreys",(function(){return Oi})),n.d(e,"interpolatePurples",(function(){return ji})),n.d(e,"schemePurples",(function(){return Mi})),n.d(e,"interpolateReds",(function(){return Ei})),n.d(e,"schemeReds",(function(){return Ai})),n.d(e,"interpolateOranges",(function(){return Ri})),n.d(e,"schemeOranges",(function(){return Ti})),n.d(e,"interpolateCividis",(function(){return zi})),n.d(e,"interpolateCubehelixDefault",(function(){return Vi})),n.d(e,"interpolateRainbow",(function(){return Ki})),n.d(e,"interpolateWarm",(function(){return Hi})),n.d(e,"interpolateCool",(function(){return Xi})),n.d(e,"interpolateSinebow",(function(){return ea})),n.d(e,"interpolateTurbo",(function(){return na})),n.d(e,"interpolateViridis",(function(){return oa})),n.d(e,"interpolateMagma",(function(){return ia})),n.d(e,"interpolateInferno",(function(){return aa})),n.d(e,"interpolatePlasma",(function(){return fa})),n.d(e,"TiledGrid",(function(){return co})),n.d(e,"CSVGrid",(function(){return $r})),n.d(e,"ShapeColorSizeStyle",(function(){return ba})),n.d(e,"StrokeStyle",(function(){return Ca})),n.d(e,"JoyPlotStyle",(function(){return za})),n.d(e,"CompositionStyle",(function(){return Ua})),n.d(e,"SegmentStyle",(function(){return Qa})),n.d(e,"TextStyle",(function(){return uf})),n.d(e,"KernelSmoothingStyle",(function(){return gf})),n.d(e,"PillarStyle",(function(){return Pf})),n.d(e,"SideStyle",(function(){return If})),n.d(e,"DotDensityStyle",(function(){return Kf})),n.d(e,"TanakaStyle",(function(){return ac})),n.d(e,"LegoStyle",(function(){return vc})),n.d(e,"SquareColorWGLStyle2",(function(){return oc})),n.d(e,"SquareColorWGLStyle",(function(){return Pc})),n.d(e,"MosaicStyle",(function(){return Ic})),n.d(e,"LabelLayer",(function(){return ho})),n.d(e,"BoundaryLayer",(function(){return vo})),n.d(e,"ColorLegend",(function(){return eu})),n.d(e,"ColorCategoryLegend",(function(){return cu})),n.d(e,"SizeLegend",(function(){return pu})),n.d(e,"SegmentWidthLegend",(function(){return Su})),n.d(e,"goToStraight",(function(){return ku})),n.d(e,"zoomTo",(function(){return _u})),n.d(e,"sPow",(function(){return Cu})),n.d(e,"sPowRev",(function(){return Ou})),n.d(e,"sExp",(function(){return Pu})),n.d(e,"sExpRev",(function(){return Mu})),n.d(e,"sCircleLow",(function(){return ju})),n.d(e,"sCircleHigh",(function(){return Au})),n.d(e,"getEuronymeLabelLayer",(function(){return Yl})),n.d(e,"getEurostatBoundariesLayer",(function(){return Vl}));var o=function(t){return null==t?r:function(){return this.querySelector(t)}};function i(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function a(){return[]}var f=function(t){return null==t?a:function(){return this.querySelectorAll(t)}};var c=function(t){return function(){return this.matches(t)}};function u(t){return function(e){return e.matches(t)}}var l=Array.prototype.find;function s(){return this.firstElementChild}var h=Array.prototype.filter;function d(){return Array.from(this.children)}var y=function(t){return new Array(t.length)};function p(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}p.prototype={constructor:p,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 b=function(t){return function(){return t}};function v(t,e,n,r,o,i){for(var a,f=0,c=e.length,u=i.length;f<u;++f)(a=e[f])?(a.__data__=i[f],r[f]=a):n[f]=new p(t,i[f]);for(;f<c;++f)(a=e[f])&&(o[f]=a)}function g(t,e,n,r,o,i,a){var f,c,u,l=new Map,s=e.length,h=i.length,d=new Array(s);for(f=0;f<s;++f)(c=e[f])&&(d[f]=u=a.call(c,c.__data__,f,e)+"",l.has(u)?o[f]=c:l.set(u,c));for(f=0;f<h;++f)u=a.call(t,i[f],f,i)+"",(c=l.get(u))?(r[f]=c,c.__data__=i[f],l.delete(u)):n[f]=new p(t,i[f]);for(f=0;f<s;++f)(c=e[f])&&l.get(d[f])===c&&(o[f]=c)}function m(t){return t.__data__}function w(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function x(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var S="http://www.w3.org/1999/xhtml",_={svg:"http://www.w3.org/2000/svg",xhtml:S,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},k=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),_.hasOwnProperty(e)?{space:_[e],local:t}:t};function C(t){return function(){this.removeAttribute(t)}}function O(t){return function(){this.removeAttributeNS(t.space,t.local)}}function P(t,e){return function(){this.setAttribute(t,e)}}function M(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function j(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function A(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)}}var E=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function T(t){return function(){this.style.removeProperty(t)}}function R(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)||E(t).getComputedStyle(t,null).getPropertyValue(e)}function I(t){return function(){delete this[t]}}function N(t,e){return function(){this[t]=e}}function L(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function B(t){return t.trim().split(/^|\s+/)}function D(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=B(t.getAttribute("class")||"")}function Z(t,e){for(var n=D(t),r=-1,o=e.length;++r<o;)n.add(e[r])}function W(t,e){for(var n=D(t),r=-1,o=e.length;++r<o;)n.remove(e[r])}function U(t){return function(){Z(this,t)}}function $(t){return function(){W(this,t)}}function Y(t,e){return function(){(e.apply(this,arguments)?Z:W)(this,t)}}G.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}};function V(){this.textContent=""}function H(t){return function(){this.textContent=t}}function X(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function q(){this.innerHTML=""}function K(t){return function(){this.innerHTML=t}}function J(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Q(){this.nextSibling&&this.parentNode.appendChild(this)}function tt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function et(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===S&&e.documentElement.namespaceURI===S?e.createElement(t):e.createElementNS(n,t)}}function nt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var rt=function(t){var e=k(t);return(e.local?nt:et)(e)};function ot(){return null}function it(){var t=this.parentNode;t&&t.removeChild(this)}function at(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ft(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ct(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 ut(t){return function(){var e=this.__on;if(e){for(var n,r=0,o=-1,i=e.length;r<i;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?e.length=o:delete this.__on}}}function lt(t,e,n){return function(){var r,o=this.__on,i=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(o)for(var a=0,f=o.length;a<f;++a)if((r=o[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=e);this.addEventListener(t.type,i,n),r={type:t.type,name:t.name,value:e,listener:i,options:n},o?o.push(r):this.__on=[r]}}function st(t,e,n){var r=E(t),o=r.CustomEvent;"function"==typeof o?o=new o(e,n):(o=r.document.createEvent("Event"),n?(o.initEvent(e,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(e,!1,!1)),t.dispatchEvent(o)}function ht(t,e){return function(){return st(this,t,e)}}function dt(t,e){return function(){return st(this,t,e.apply(this,arguments))}}var yt=[null];function pt(t,e){this._groups=t,this._parents=e}function bt(){return new pt([[document.documentElement]],yt)}pt.prototype=bt.prototype={constructor:pt,select:function(t){"function"!=typeof t&&(t=o(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,f,c=e[i],u=c.length,l=r[i]=new Array(u),s=0;s<u;++s)(a=c[s])&&(f=t.call(a,a.__data__,s,c))&&("__data__"in a&&(f.__data__=a.__data__),l[s]=f);return new pt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return i(t.apply(this,arguments))}}(t):f(t);for(var e=this._groups,n=e.length,r=[],o=[],a=0;a<n;++a)for(var c,u=e[a],l=u.length,s=0;s<l;++s)(c=u[s])&&(r.push(t.call(c,c.__data__,s,u)),o.push(c));return new pt(r,o)},selectChild:function(t){return this.select(null==t?s:function(t){return function(){return l.call(this.children,t)}}("function"==typeof t?t:u(t)))},selectChildren:function(t){return this.selectAll(null==t?d:function(t){return function(){return h.call(this.children,t)}}("function"==typeof t?t:u(t)))},filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],f=a.length,u=r[o]=[],l=0;l<f;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new pt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,m);var n=e?g:v,r=this._parents,o=this._groups;"function"!=typeof t&&(t=b(t));for(var i=o.length,a=new Array(i),f=new Array(i),c=new Array(i),u=0;u<i;++u){var l=r[u],s=o[u],h=s.length,d=w(t.call(l,l&&l.__data__,u,r)),y=d.length,p=f[u]=new Array(y),x=a[u]=new Array(y),S=c[u]=new Array(h);n(l,s,p,x,S,d,e);for(var _,k,C=0,O=0;C<y;++C)if(_=p[C]){for(C>=O&&(O=C+1);!(k=x[O])&&++O<y;);_._next=k||null}}return(a=new pt(a,r))._enter=f,a._exit=c,a},enter:function(){return new pt(this._enter||this._groups.map(y),this._parents)},exit:function(){return new pt(this._exit||this._groups.map(y),this._parents)},join:function(t,e,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(o=e(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,o=n.length,i=r.length,a=Math.min(o,i),f=new Array(o),c=0;c<a;++c)for(var u,l=n[c],s=r[c],h=l.length,d=f[c]=new Array(h),y=0;y<h;++y)(u=l[y]||s[y])&&(d[y]=u);for(;c<o;++c)f[c]=n[c];return new pt(f,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,o=t[e],i=o.length-1,a=o[i];--i>=0;)(r=o[i])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=x);for(var n=this._groups,r=n.length,o=new Array(r),i=0;i<r;++i){for(var a,f=n[i],c=f.length,u=o[i]=new Array(c),l=0;l<c;++l)(a=f[l])&&(u[l]=a);u.sort(e)}return new pt(o,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var o,i=e[n],a=0,f=i.length;a<f;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this},attr:function(t,e){var n=k(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?O:C:"function"==typeof e?n.local?A:j:n.local?M:P)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?T:"function"==typeof e?z:R)(t,e,null==n?"":n)):F(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?I:"function"==typeof e?L:N)(t,e)):this.node()[t]},classed:function(t,e){var n=B(t+"");if(arguments.length<2){for(var r=D(this.node()),o=-1,i=n.length;++o<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof e?Y:e?U:$)(n,e))},text:function(t){return arguments.length?this.each(null==t?V:("function"==typeof t?X:H)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?q:("function"==typeof t?J:K)(t)):this.node().innerHTML},raise:function(){return this.each(Q)},lower:function(){return this.each(tt)},append:function(t){var e="function"==typeof t?t:rt(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:rt(t),r=null==e?ot:"function"==typeof e?e:o(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(it)},clone:function(t){return this.select(t?ft:at)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,o,i=ct(t+""),a=i.length;if(!(arguments.length<2)){for(f=e?lt:ut,r=0;r<a;++r)this.each(f(i[r],e,n));return this}var f=this.node().__on;if(f)for(var c,u=0,l=f.length;u<l;++u)for(r=0,c=f[u];r<a;++r)if((o=i[r]).type===c.type&&o.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?dt:ht)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,o=t[e],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};var vt=bt,gt=function(t){return"string"==typeof t?new pt([[document.querySelector(t)]],[document.documentElement]):new pt([[t]],yt)},mt={value:()=>{}};function wt(){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 xt(r)}function xt(t){this._=t}function St(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 _t(t,e){for(var n,r=0,o=t.length;r<o;++r)if((n=t[r]).name===e)return n.value}function kt(t,e,n){for(var r=0,o=t.length;r<o;++r)if(t[r].name===e){t[r]=mt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}xt.prototype=wt.prototype={constructor:xt,on:function(t,e){var n,r=this._,o=St(t+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++i<a;)if(n=(t=o[i]).type)r[n]=kt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=kt(r[n],t.name,null);return this}for(;++i<a;)if((n=(t=o[i]).type)&&(n=_t(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new xt(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=0,n=(r=this._[t]).length;i<n;++i)r[i].value.apply(e,o)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],o=0,i=r.length;o<i;++o)r[o].value.apply(e,n)}};var Ct=wt;const Ot={capture:!0,passive:!1};var Pt=function(t){t.preventDefault(),t.stopImmediatePropagation()},Mt=function(t){var e=t.document.documentElement,n=gt(t).on("dragstart.drag",Pt,Ot);"onselectstart"in e?n.on("selectstart.drag",Pt,Ot):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function jt(t,e){var n=t.document.documentElement,r=gt(t).on("dragstart.drag",null);e&&(r.on("click.drag",Pt,Ot),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function At(t){return((t=Math.exp(t))+1/t)/2}var Et,Tt,Rt=function t(e,n,r){function o(t,o){var i,a,f=t[0],c=t[1],u=t[2],l=o[0],s=o[1],h=o[2],d=l-f,y=s-c,p=d*d+y*y;if(p<1e-12)a=Math.log(h/u)/e,i=function(t){return[f+t*d,c+t*y,u*Math.exp(e*t*a)]};else{var b=Math.sqrt(p),v=(h*h-u*u+r*p)/(2*u*n*b),g=(h*h-u*u-r*p)/(2*h*n*b),m=Math.log(Math.sqrt(v*v+1)-v),w=Math.log(Math.sqrt(g*g+1)-g);a=(w-m)/e,i=function(t){var r,o=t*a,i=At(m),l=u/(n*b)*(i*(r=e*o+m,((r=Math.exp(2*r))-1)/(r+1))-function(t){return((t=Math.exp(t))-1/t)/2}(m));return[f+l*d,c+l*y,u*i/At(e*o+m)]}}return i.duration=1e3*a*e/Math.SQRT2,i}return o.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},o}(Math.SQRT2,2,4),zt=function(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var o=e.getBoundingClientRect();return[t.clientX-o.left-e.clientLeft,t.clientY-o.top-e.clientTop]}}return[t.pageX,t.pageY]},Ft=0,It=0,Nt=0,Lt=0,Bt=0,Dt=0,Gt="object"==typeof performance&&performance.now?performance:Date,Zt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Wt(){return Bt||(Zt(Ut),Bt=Gt.now()+Dt)}function Ut(){Bt=0}function $t(){this._call=this._time=this._next=null}function Yt(t,e,n){var r=new $t;return r.restart(t,e,n),r}function Vt(){Bt=(Lt=Gt.now())+Dt,Ft=It=0;try{!function(){Wt(),++Ft;for(var t,e=Et;e;)(t=Bt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Ft}()}finally{Ft=0,function(){var t,e,n=Et,r=1/0;for(;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:Et=e);Tt=t,Xt(r)}(),Bt=0}}function Ht(){var t=Gt.now(),e=t-Lt;e>1e3&&(Dt-=e,Lt=t)}function Xt(t){Ft||(It&&(It=clearTimeout(It)),t-Bt>24?(t<1/0&&(It=setTimeout(Vt,t-Gt.now()-Dt)),Nt&&(Nt=clearInterval(Nt))):(Nt||(Lt=Gt.now(),Nt=setInterval(Ht,1e3)),Ft=1,Zt(Vt)))}$t.prototype=Yt.prototype={constructor:$t,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Wt():+n)+(null==e?0:+e),this._next||Tt===this||(Tt?Tt._next=this:Et=this,Tt=this),this._call=t,this._time=n,Xt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Xt())}};var qt=function(t,e,n){var r=new $t;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r},Kt=Ct("start","end","cancel","interrupt"),Jt=[],Qt=function(t,e,n,r,o,i){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,o=t.__transition;function i(c){var u,l,s,h;if(1!==n.state)return f();for(u in o)if((h=o[u]).name===n.name){if(3===h.state)return qt(i);4===h.state?(h.state=6,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete o[u]):+u<e&&(h.state=6,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete o[u])}if(qt((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(s=n.tween.length),u=0,l=-1;u<s;++u)(h=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=h);r.length=l+1}}function a(e){for(var o=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(f),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(t,o);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),f())}function f(){for(var r in n.state=6,n.timer.stop(),delete o[e],o)return;delete t.__transition}o[e]=n,n.timer=Yt((function(t){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=t&&i(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:o,on:Kt,tween:Jt,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})};function te(t,e){var n=ne(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function ee(t,e){var n=ne(t,e);if(n.state>3)throw new Error("too late; already running");return n}function ne(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var re,oe=function(t,e){var n,r,o,i=t.__transition,a=!0;if(i){for(o in e=null==e?null:e+"",i)(n=i[o]).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 i[o]):a=!1;a&&delete t.__transition}},ie=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},ae=180/Math.PI,fe={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ce=function(t,e,n,r,o,i){var a,f,c;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(f=Math.sqrt(n*n+r*r))&&(n/=f,r/=f,c/=f),t*r<e*n&&(t=-t,e=-e,c=-c,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(e,t)*ae,skewX:Math.atan(c)*ae,scaleX:a,scaleY:f}};function ue(t,e,n,r){function o(t){return t.length?t.pop()+" ":""}return function(i,a){var f=[],c=[];return i=t(i),a=t(a),function(t,r,o,i,a,f){if(t!==o||r!==i){var c=a.push("translate(",null,e,null,n);f.push({i:c-4,x:ie(t,o)},{i:c-2,x:ie(r,i)})}else(o||i)&&a.push("translate("+o+e+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,f,c),function(t,e,n,i){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),i.push({i:n.push(o(n)+"rotate(",null,r)-2,x:ie(t,e)})):e&&n.push(o(n)+"rotate("+e+r)}(i.rotate,a.rotate,f,c),function(t,e,n,i){t!==e?i.push({i:n.push(o(n)+"skewX(",null,r)-2,x:ie(t,e)}):e&&n.push(o(n)+"skewX("+e+r)}(i.skewX,a.skewX,f,c),function(t,e,n,r,i,a){if(t!==n||e!==r){var f=i.push(o(i)+"scale(",null,",",null,")");a.push({i:f-4,x:ie(t,n)},{i:f-2,x:ie(e,r)})}else 1===n&&1===r||i.push(o(i)+"scale("+n+","+r+")")}(i.scaleX,i.scaleY,a.scaleX,a.scaleY,f,c),i=a=null,function(t){for(var e,n=-1,r=c.length;++n<r;)f[(e=c[n]).i]=e.x(t);return f.join("")}}}var le=ue((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?fe:ce(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),se=ue((function(t){return null==t?fe:(re||(re=document.createElementNS("http://www.w3.org/2000/svg","g")),re.setAttribute("transform",t),(t=re.transform.baseVal.consolidate())?(t=t.matrix,ce(t.a,t.b,t.c,t.d,t.e,t.f)):fe)}),", ",")",")");function he(t,e){var n,r;return function(){var o=ee(this,t),i=o.tween;if(i!==n)for(var a=0,f=(r=n=i).length;a<f;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}o.tween=r}}function de(t,e,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=ee(this,t),a=i.tween;if(a!==r){o=(r=a).slice();for(var f={name:e,value:n},c=0,u=o.length;c<u;++c)if(o[c].name===e){o[c]=f;break}c===u&&o.push(f)}i.tween=o}}function ye(t,e,n){var r=t._id;return t.each((function(){var t=ee(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return ne(t,r).value[e]}}var pe=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function be(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ve(){}var ge="\\s*([+-]?\\d+)\\s*",me="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",we="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",xe=/^#([0-9a-f]{3,8})$/,Se=new RegExp(`^rgb\\(${ge},${ge},${ge}\\)$`),_e=new RegExp(`^rgb\\(${we},${we},${we}\\)$`),ke=new RegExp(`^rgba\\(${ge},${ge},${ge},${me}\\)$`),Ce=new RegExp(`^rgba\\(${we},${we},${we},${me}\\)$`),Oe=new RegExp(`^hsl\\(${me},${we},${we}\\)$`),Pe=new RegExp(`^hsla\\(${me},${we},${we},${me}\\)$`),Me={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 je(){return this.rgb().formatHex()}function Ae(){return this.rgb().formatRgb()}function Ee(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=xe.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Te(e):3===n?new Ie(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?Re(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?Re(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=Se.exec(t))?new Ie(e[1],e[2],e[3],1):(e=_e.exec(t))?new Ie(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ke.exec(t))?Re(e[1],e[2],e[3],e[4]):(e=Ce.exec(t))?Re(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Oe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,1):(e=Pe.exec(t))?Ze(e[1],e[2]/100,e[3]/100,e[4]):Me.hasOwnProperty(t)?Te(Me[t]):"transparent"===t?new Ie(NaN,NaN,NaN,0):null}function Te(t){return new Ie(t>>16&255,t>>8&255,255&t,1)}function Re(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ie(t,e,n,r)}function ze(t){return t instanceof ve||(t=Ee(t)),t?new Ie((t=t.rgb()).r,t.g,t.b,t.opacity):new Ie}function Fe(t,e,n,r){return 1===arguments.length?ze(t):new Ie(t,e,n,null==r?1:r)}function Ie(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Ne(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}`}function Le(){const t=Be(this.opacity);return`${1===t?"rgb(":"rgba("}${De(this.r)}, ${De(this.g)}, ${De(this.b)}${1===t?")":`, ${t})`}`}function Be(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function De(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ge(t){return((t=De(t))<16?"0":"")+t.toString(16)}function Ze(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ue(t,e,n,r)}function We(t){if(t instanceof Ue)return new Ue(t.h,t.s,t.l,t.opacity);if(t instanceof ve||(t=Ee(t)),!t)return new Ue;if(t instanceof Ue)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),i=Math.max(e,n,r),a=NaN,f=i-o,c=(i+o)/2;return f?(a=e===i?(n-r)/f+6*(n<r):n===i?(r-e)/f+2:(e-n)/f+4,f/=c<.5?i+o:2-i-o,a*=60):f=c>0&&c<1?0:a,new Ue(a,f,c,t.opacity)}function Ue(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $e(t){return(t=(t||0)%360)<0?t+360:t}function Ye(t){return Math.max(0,Math.min(1,t||0))}function Ve(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 He(t,e,n,r,o){var i=t*t,a=i*t;return((1-3*t+3*i-a)*e+(4-6*i+3*a)*n+(1+3*t+3*i-3*a)*r+a*o)/6}pe(ve,Ee,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:je,formatHex:je,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return We(this).formatHsl()},formatRgb:Ae,toString:Ae}),pe(Ie,Fe,be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ie(De(this.r),De(this.g),De(this.b),Be(this.opacity))},displayable(){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:Ne,formatHex:Ne,formatHex8:function(){return`#${Ge(this.r)}${Ge(this.g)}${Ge(this.b)}${Ge(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:Le,toString:Le})),pe(Ue,(function(t,e,n,r){return 1===arguments.length?We(t):new Ue(t,e,n,null==r?1:r)}),be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ue(this.h,this.s,this.l*t,this.opacity)},rgb(){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,o=2*n-r;return new Ie(Ve(t>=240?t-240:t+120,o,r),Ve(t,o,r),Ve(t<120?t+240:t-120,o,r),this.opacity)},clamp(){return new Ue($e(this.h),Ye(this.s),Ye(this.l),Be(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const t=Be(this.opacity);return`${1===t?"hsl(":"hsla("}${$e(this.h)}, ${100*Ye(this.s)}%, ${100*Ye(this.l)}%${1===t?")":`, ${t})`}`}}));var Xe=t=>()=>t;function qe(t,e){return function(n){return t+n*e}}function Ke(t){return 1==(t=+t)?Je: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):Xe(isNaN(e)?n:e)}}function Je(t,e){var n=e-t;return n?qe(t,n):Xe(isNaN(t)?e:t)}var Qe=function t(e){var n=Ke(e);function r(t,e){var r=n((t=Fe(t)).r,(e=Fe(e)).r),o=n(t.g,e.g),i=n(t.b,e.b),a=Je(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=o(e),t.b=i(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function tn(t){return function(e){var n,r,o=e.length,i=new Array(o),a=new Array(o),f=new Array(o);for(n=0;n<o;++n)r=Fe(e[n]),i[n]=r.r||0,a[n]=r.g||0,f[n]=r.b||0;return i=t(i),a=t(a),f=t(f),r.opacity=1,function(t){return r.r=i(t),r.g=a(t),r.b=f(t),r+""}}}var en=tn((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),o=t[r],i=t[r+1],a=r>0?t[r-1]:2*o-i,f=r<e-1?t[r+2]:2*i-o;return He((n-r/e)*e,a,o,i,f)}})),nn=(tn((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),o=t[(r+e-1)%e],i=t[r%e],a=t[(r+1)%e],f=t[(r+2)%e];return He((n-r/e)*e,o,i,a,f)}})),/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g),rn=new RegExp(nn.source,"g");var on=function(t,e){var n,r,o,i=nn.lastIndex=rn.lastIndex=0,a=-1,f=[],c=[];for(t+="",e+="";(n=nn.exec(t))&&(r=rn.exec(e));)(o=r.index)>i&&(o=e.slice(i,o),f[a]?f[a]+=o:f[++a]=o),(n=n[0])===(r=r[0])?f[a]?f[a]+=r:f[++a]=r:(f[++a]=null,c.push({i:a,x:ie(n,r)})),i=rn.lastIndex;return i<e.length&&(o=e.slice(i),f[a]?f[a]+=o:f[++a]=o),f.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)f[(n=c[r]).i]=n.x(t);return f.join("")})},an=function(t,e){var n;return("number"==typeof e?ie:e instanceof Ee?Qe:(n=Ee(e))?(e=n,Qe):on)(t,e)};function fn(t){return function(){this.removeAttribute(t)}}function cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function un(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttribute(t);return a===i?null:a===r?o:o=e(r=a,n)}}function ln(t,e,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===i?null:a===r?o:o=e(r=a,n)}}function sn(t,e,n){var r,o,i;return function(){var a,f,c=n(this);if(null!=c)return(a=this.getAttribute(t))===(f=c+"")?null:a===r&&f===o?i:(o=f,i=e(r=a,c));this.removeAttribute(t)}}function hn(t,e,n){var r,o,i;return function(){var a,f,c=n(this);if(null!=c)return(a=this.getAttributeNS(t.space,t.local))===(f=c+"")?null:a===r&&f===o?i:(o=f,i=e(r=a,c));this.removeAttributeNS(t.space,t.local)}}function dn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function yn(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function pn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&yn(t,o)),n}return o._value=e,o}function bn(t,e){var n,r;function o(){var o=e.apply(this,arguments);return o!==r&&(n=(r=o)&&dn(t,o)),n}return o._value=e,o}function vn(t,e){return function(){te(this,t).delay=+e.apply(this,arguments)}}function gn(t,e){return e=+e,function(){te(this,t).delay=e}}function mn(t,e){return function(){ee(this,t).duration=+e.apply(this,arguments)}}function wn(t,e){return e=+e,function(){ee(this,t).duration=e}}function xn(t,e){if("function"!=typeof e)throw new Error;return function(){ee(this,t).ease=e}}function Sn(t,e,n){var r,o,i=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)?te:ee;return function(){var a=i(this,t),f=a.on;f!==r&&(o=(r=f).copy()).on(e,n),a.on=o}}var _n=vt.prototype.constructor;function kn(t){return function(){this.style.removeProperty(t)}}function Cn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function On(t,e,n){var r,o;function i(){var i=e.apply(this,arguments);return i!==o&&(r=(o=i)&&Cn(t,i,n)),r}return i._value=e,i}function Pn(t){return function(e){this.textContent=t.call(this,e)}}function Mn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Pn(r)),e}return r._value=t,r}var jn=0;function An(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function En(){return++jn}var Tn=vt.prototype;An.prototype=function(t){return vt().transition(t)}.prototype={constructor:An,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=o(t));for(var r=this._groups,i=r.length,a=new Array(i),f=0;f<i;++f)for(var c,u,l=r[f],s=l.length,h=a[f]=new Array(s),d=0;d<s;++d)(c=l[d])&&(u=t.call(c,c.__data__,d,l))&&("__data__"in c&&(u.__data__=c.__data__),h[d]=u,Qt(h[d],e,n,d,h,ne(c,n)));return new An(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=f(t));for(var r=this._groups,o=r.length,i=[],a=[],c=0;c<o;++c)for(var u,l=r[c],s=l.length,h=0;h<s;++h)if(u=l[h]){for(var d,y=t.call(u,u.__data__,h,l),p=ne(u,n),b=0,v=y.length;b<v;++b)(d=y[b])&&Qt(d,e,n,b,y,p);i.push(y),a.push(u)}return new An(i,a,e,n)},selectChild:Tn.selectChild,selectChildren:Tn.selectChildren,filter:function(t){"function"!=typeof t&&(t=c(t));for(var e=this._groups,n=e.length,r=new Array(n),o=0;o<n;++o)for(var i,a=e[o],f=a.length,u=r[o]=[],l=0;l<f;++l)(i=a[l])&&t.call(i,i.__data__,l,a)&&u.push(i);return new An(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,o=n.length,i=Math.min(r,o),a=new Array(r),f=0;f<i;++f)for(var c,u=e[f],l=n[f],s=u.length,h=a[f]=new Array(s),d=0;d<s;++d)(c=u[d]||l[d])&&(h[d]=c);for(;f<r;++f)a[f]=e[f];return new An(a,this._parents,this._name,this._id)},selection:function(){return new _n(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=En(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,f=r[i],c=f.length,u=0;u<c;++u)if(a=f[u]){var l=ne(a,e);Qt(a,t,n,u,f,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new An(r,this._parents,t,n)},call:Tn.call,nodes:Tn.nodes,node:Tn.node,size:Tn.size,empty:Tn.empty,each:Tn.each,on:function(t,e){var n=this._id;return arguments.length<2?ne(this.node(),n).on.on(t):this.each(Sn(n,t,e))},attr:function(t,e){var n=k(t),r="transform"===n?se:an;return this.attrTween(t,"function"==typeof e?(n.local?hn:sn)(n,r,ye(this,"attr."+t,e)):null==e?(n.local?cn:fn)(n):(n.local?ln:un)(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=k(t);return this.tween(n,(r.local?pn:bn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?le:an;return null==e?this.styleTween(t,function(t,e){var n,r,o;return function(){var i=F(this,t),a=(this.style.removeProperty(t),F(this,t));return i===a?null:i===n&&a===r?o:o=e(n=i,r=a)}}(t,r)).on("end.style."+t,kn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,o,i;return function(){var a=F(this,t),f=n(this),c=f+"";return null==f&&(this.style.removeProperty(t),c=f=F(this,t)),a===c?null:a===r&&c===o?i:(o=c,i=e(r=a,f))}}(t,r,ye(this,"style."+t,e))).each(function(t,e){var n,r,o,i,a="style."+e,f="end."+a;return function(){var c=ee(this,t),u=c.on,l=null==c.value[a]?i||(i=kn(e)):void 0;u===n&&o===l||(r=(n=u).copy()).on(f,o=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,o,i=n+"";return function(){var a=F(this,t);return a===i?null:a===r?o:o=e(r=a,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,On(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}}(ye(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,Mn(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,o=ne(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===t)return r.value;return null}return this.each((null==e?he:de)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?vn:gn)(e,t)):ne(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?mn:wn)(e,t)):ne(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(xn(e,t)):ne(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;ee(this,t).ease=n}}(this._id,t))},end:function(){var t,e,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var f={value:a},c={value:function(){0==--o&&i()}};n.each((function(){var n=ee(this,r),o=n.on;o!==t&&((e=(t=o).copy())._.cancel.push(f),e._.interrupt.push(f),e._.end.push(c)),n.on=e})),0===o&&i()}))},[Symbol.iterator]:Tn[Symbol.iterator]};var Rn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function zn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}vt.prototype.interrupt=function(t){return this.each((function(){oe(this,t)}))},vt.prototype.transition=function(t){var e,n;t instanceof An?(e=t._id,t=t._name):(e=En(),(n=Rn).time=Wt(),t=null==t?null:t+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,f=r[i],c=f.length,u=0;u<c;++u)(a=f[u])&&Qt(a,t,e,u,f,n||zn(a,e));return new An(r,this._parents,t,e)};var Fn=t=>()=>t;function In(t,{sourceEvent:e,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function Nn(t,e,n){this.k=t,this.x=e,this.y=n}Nn.prototype={constructor:Nn,scale:function(t){return 1===t?this:new Nn(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new Nn(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 Ln=new Nn(1,0,0);function Bn(t){t.stopImmediatePropagation()}Nn.prototype;var Dn=function(t){t.preventDefault(),t.stopImmediatePropagation()};function Gn(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function Zn(){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 Wn(){return this.__zoom||Ln}function Un(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function $n(){return navigator.maxTouchPoints||"ontouchstart"in this}function Yn(t,e,n){var r=t.invertX(e[0][0])-n[0][0],o=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}var Vn=function(){var t,e,n,r=Gn,o=Zn,i=Yn,a=Un,f=$n,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],l=250,s=Rt,h=Ct("start","zoom","end"),d=0,y=10;function p(t){t.property("__zoom",Wn).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(f).on("touchstart.zoom",C).on("touchmove.zoom",O).on("touchend.zoom touchcancel.zoom",P).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(t,e){return(e=Math.max(c[0],Math.min(c[1],e)))===t.k?t:new Nn(e,t.x,t.y)}function v(t,e,n){var r=e[0]-n[0]*t.k,o=e[1]-n[1]*t.k;return r===t.x&&o===t.y?t:new Nn(t.k,r,o)}function g(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function m(t,e,n,r){t.on("start.zoom",(function(){w(this,arguments).event(r).start()})).on("interrupt.zoom end.zoom",(function(){w(this,arguments).event(r).end()})).tween("zoom",(function(){var t=this,i=arguments,a=w(t,i).event(r),f=o.apply(t,i),c=null==n?g(f):"function"==typeof n?n.apply(t,i):n,u=Math.max(f[1][0]-f[0][0],f[1][1]-f[0][1]),l=t.__zoom,h="function"==typeof e?e.apply(t,i):e,d=s(l.invert(c).concat(u/l.k),h.invert(c).concat(u/h.k));return function(t){if(1===t)t=h;else{var e=d(t),n=u/e[2];t=new Nn(n,c[0]-e[0]*n,c[1]-e[1]*n)}a.zoom(null,t)}}))}function w(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.sourceEvent=null,this.extent=o.apply(t,e),this.taps=0}function S(t,...e){if(r.apply(this,arguments)){var n=w(this,e).event(t),o=this.__zoom,f=Math.max(c[0],Math.min(c[1],o.k*Math.pow(2,a.apply(this,arguments)))),l=zt(t);if(n.wheel)n.mouse[0][0]===l[0]&&n.mouse[0][1]===l[1]||(n.mouse[1]=o.invert(n.mouse[0]=l)),clearTimeout(n.wheel);else{if(o.k===f)return;n.mouse=[l,o.invert(l)],oe(this),n.start()}Dn(t),n.wheel=setTimeout(s,150),n.zoom("mouse",i(v(b(o,f),n.mouse[0],n.mouse[1]),n.extent,u))}function s(){n.wheel=null,n.end()}}function _(t,...e){if(!n&&r.apply(this,arguments)){var o=t.currentTarget,a=w(this,e,!0).event(t),f=gt(t.view).on("mousemove.zoom",h,!0).on("mouseup.zoom",y,!0),c=zt(t,o),l=t.clientX,s=t.clientY;Mt(t.view),Bn(t),a.mouse=[c,this.__zoom.invert(c)],oe(this),a.start()}function h(t){if(Dn(t),!a.moved){var e=t.clientX-l,n=t.clientY-s;a.moved=e*e+n*n>d}a.event(t).zoom("mouse",i(v(a.that.__zoom,a.mouse[0]=zt(t,o),a.mouse[1]),a.extent,u))}function y(t){f.on("mousemove.zoom mouseup.zoom",null),jt(t.view,a.moved),Dn(t),a.event(t).end()}}function k(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=zt(t.changedTouches?t.changedTouches[0]:t,this),f=n.invert(a),c=n.k*(t.shiftKey?.5:2),s=i(v(b(n,c),a,f),o.apply(this,e),u);Dn(t),l>0?gt(this).transition().duration(l).call(m,s,a,t):gt(this).call(p.transform,s,a,t)}}function C(n,...o){if(r.apply(this,arguments)){var i,a,f,c,u=n.touches,l=u.length,s=w(this,o,n.changedTouches.length===l).event(n);for(Bn(n),a=0;a<l;++a)f=u[a],c=[c=zt(f,this),this.__zoom.invert(c),f.identifier],s.touch0?s.touch1||s.touch0[2]===c[2]||(s.touch1=c,s.taps=0):(s.touch0=c,i=!0,s.taps=1+!!t);t&&(t=clearTimeout(t)),i&&(s.taps<2&&(e=c[0],t=setTimeout((function(){t=null}),500)),oe(this),s.start())}}function O(t,...e){if(this.__zooming){var n,r,o,a,f=w(this,e).event(t),c=t.changedTouches,l=c.length;for(Dn(t),n=0;n<l;++n)r=c[n],o=zt(r,this),f.touch0&&f.touch0[2]===r.identifier?f.touch0[0]=o:f.touch1&&f.touch1[2]===r.identifier&&(f.touch1[0]=o);if(r=f.that.__zoom,f.touch1){var s=f.touch0[0],h=f.touch0[1],d=f.touch1[0],y=f.touch1[1],p=(p=d[0]-s[0])*p+(p=d[1]-s[1])*p,g=(g=y[0]-h[0])*g+(g=y[1]-h[1])*g;r=b(r,Math.sqrt(p/g)),o=[(s[0]+d[0])/2,(s[1]+d[1])/2],a=[(h[0]+y[0])/2,(h[1]+y[1])/2]}else{if(!f.touch0)return;o=f.touch0[0],a=f.touch0[1]}f.zoom("touch",i(v(r,o,a),f.extent,u))}}function P(t,...r){if(this.__zooming){var o,i,a=w(this,r).event(t),f=t.changedTouches,c=f.length;for(Bn(t),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<c;++o)i=f[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=zt(i,this),Math.hypot(e[0]-i[0],e[1]-i[1])<y)){var u=gt(this).on("dblclick.zoom");u&&u.apply(this,arguments)}}}return p.transform=function(t,e,n,r){var o=t.selection?t.selection():t;o.property("__zoom",Wn),t!==o?m(t,e,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},p.scaleBy=function(t,e,n,r){p.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n,r)},p.scaleTo=function(t,e,n,r){p.transform(t,(function(){var t=o.apply(this,arguments),r=this.__zoom,a=null==n?g(t):"function"==typeof n?n.apply(this,arguments):n,f=r.invert(a),c="function"==typeof e?e.apply(this,arguments):e;return i(v(b(r,c),a,f),t,u)}),n,r)},p.translateBy=function(t,e,n,r){p.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),u)}),null,r)},p.translateTo=function(t,e,n,r,a){p.transform(t,(function(){var t=o.apply(this,arguments),a=this.__zoom,f=null==r?g(t):"function"==typeof r?r.apply(this,arguments):r;return i(Ln.translate(f[0],f[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,u)}),r,a)},x.prototype={event:function(t){return t&&(this.sourceEvent=t),this},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){var e=gt(this.that).datum();h.call(t,this.that,new In(t,{sourceEvent:this.sourceEvent,target:p,type:t,transform:this.that.__zoom,dispatch:h}),e)}},p.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:Fn(+t),p):a},p.filter=function(t){return arguments.length?(r="function"==typeof t?t:Fn(!!t),p):r},p.touchable=function(t){return arguments.length?(f="function"==typeof t?t:Fn(!!t),p):f},p.extent=function(t){return arguments.length?(o="function"==typeof t?t:Fn([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),p):o},p.scaleExtent=function(t){return arguments.length?(c[0]=+t[0],c[1]=+t[1],p):[c[0],c[1]]},p.translateExtent=function(t){return arguments.length?(u[0][0]=+t[0][0],u[1][0]=+t[1][0],u[0][1]=+t[0][1],u[1][1]=+t[1][1],p):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},p.constrain=function(t){return arguments.length?(i=t,p):i},p.duration=function(t){return arguments.length?(l=+t,p):l},p.interpolate=function(t){return arguments.length?(s=t,p):s},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p.clickDistance=function(t){return arguments.length?(d=(t=+t)*t,p):Math.sqrt(d)},p.tapDistance=function(t){return arguments.length?(y=+t,p):y},p};function Hn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Xn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Xn(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 qn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kn(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Jn=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;qn(this,t),i=i||{},this.canvas=e,this.w=this.canvas.offsetWidth,this.h=this.canvas.offsetHeight,this.canvas.width=this.w,this.canvas.height=this.h;var a=this.canvas.getContext("2d");if(!a)throw"Impossible to create canvas 2D context";this.ctx=a,this.center=r||{x:.5*this.w,y:.5*this.h},this.zf=o,this.backgroundColor=i.backgroundColor||"white",this.onZoomStartFun=i.onZoomStartFun,this.onZoomEndFun=i.onZoomEndFun,this.extGeo={xMin:NaN,xMax:NaN,yMin:NaN,yMax:NaN},this.updateExtentGeo();var f=Ln,c=Vn().wheelDelta((function(t){return-t.deltaY*(1===t.deltaMode?.07:t.deltaMode?1:.004)})).on("zoom",(function(t){var e=t.transform,r=f.k/e.k;if(1==r){var o=f.x-e.x,i=f.y-e.y;n.pan(o*n.getZf(),-i*n.getZf())}else{var a=t.sourceEvent;if(a instanceof WheelEvent)n.zoom(r,n.pixToGeoX(t.sourceEvent.offsetX),n.pixToGeoY(t.sourceEvent.offsetY));else if(a instanceof TouchEvent){var c,u=0,l=0,s=Hn(a.targetTouches);try{for(s.s();!(c=s.n()).done;){var h=c.value;u+=h.clientX,l+=h.clientY}}catch(t){s.e(t)}finally{s.f()}u/=a.targetTouches.length,l/=a.targetTouches.length,n.zoom(r,n.pixToGeoX(u),n.pixToGeoY(l))}}f=e})).on("start",(function(t){n.canvasSave.c=document.createElement("canvas"),n.canvasSave.c.setAttribute("width",""+n.w),n.canvasSave.c.setAttribute("height",""+n.h),n.canvasSave.c.getContext("2d").drawImage(n.canvas,0,0),n.canvasSave.dx=0,n.canvasSave.dy=0,n.canvasSave.f=1,n.onZoomStartFun&&n.onZoomStartFun()})).on("end",(function(t){n.redraw(!0),n.canvasSave={c:null,dx:0,dy:0,f:1},n.onZoomEndFun&&n.onZoomEndFun()}));c(gt(this.canvas)),this.zfExtent=[0,1/0],this.canvasSave={c:null,dx:0,dy:0,f:1}}var e,n,r;return e=t,r=[{key:"getParameterByName",value:function(t){t=t.replace(/[\[]/,"\\[").replace(/[\]]/,"\\]");var e=new RegExp("[\\?&]"+t+"=([^&#]*)").exec(location.search);return e?decodeURIComponent(e[1].replace(/\+/g," ")):null}}],(n=[{key:"setCenter",value:function(t){this.center=t}},{key:"getCenter",value:function(){return this.center}},{key:"setZf",value:function(t){this.zf=t,this.slider&&this.slider.attr("value",+this.zf)}},{key:"getZf",value:function(){return this.zf}},{key:"setZfExtent",value:function(t){this.zfExtent=t}},{key:"getZfExtent",value:function(){return this.zfExtent}},{key:"initCanvasTransform",value:function(){this.ctx.setTransform(1,0,0,1,0,0)}},{key:"setCanvasTransform",value:function(){var t=1/this.getZf(),e=-this.center.x/this.getZf()+.5*this.w,n=this.center.y/this.getZf()+.5*this.h;this.ctx.setTransform(t,0,0,-t,e,n)}},{key:"getWebGLTransform",value:function(){var t=2/(this.w*this.getZf()),e=2/(this.h*this.getZf());return[t,0,0,0,e,0,-t*this.center.x,-e*this.center.y,1]}},{key:"redraw",value:function(){throw new Error("Method redraw not implemented.")}},{key:"clear",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"white";this.ctx&&(this.ctx.fillStyle=t),this.ctx.fillRect(0,0,this.w,this.h)}},{key:"pan",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.center.x+=t,this.center.y+=e,this.updateExtentGeo(),this.canvasSave.c&&(this.canvasSave.dx-=t/this.getZf(),this.canvasSave.dy+=e/this.getZf(),this.clear(this.backgroundColor),this.ctx.drawImage(this.canvasSave.c,this.canvasSave.dx,this.canvasSave.dy))}},{key:"zoom",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.center.x,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:this.center.y;if(!(this.zfExtent[0]==this.getZf()&&t<=1||this.zfExtent[1]==this.getZf()&&t>=1)){var r=t*this.getZf();r<this.zfExtent[0]&&(t=this.zfExtent[0]/this.getZf()),r>this.zfExtent[1]&&(t=this.zfExtent[1]/this.getZf()),this.setZf(t*this.getZf());var o=(e-this.center.x)*(1-t);this.center.x+=o;var i=(n-this.center.y)*(1-t);this.center.y+=i,this.updateExtentGeo(),this.canvasSave.c&&(this.clear(this.backgroundColor),this.canvasSave.f/=t,this.canvasSave.dx=this.geoToPixX(e)*(1-this.canvasSave.f),this.canvasSave.dy=this.geoToPixY(n)*(1-this.canvasSave.f),this.clear(this.backgroundColor),this.ctx.drawImage(this.canvasSave.c,this.canvasSave.dx,this.canvasSave.dy,this.canvasSave.f*this.canvasSave.c.width,this.canvasSave.f*this.canvasSave.c.height))}}},{key:"updateExtentGeo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this.extGeo={xMin:this.pixToGeoX(-t),xMax:this.pixToGeoX(this.w+t),yMin:this.pixToGeoY(this.h+t),yMax:this.pixToGeoY(-t)},this.extGeo}},{key:"toDraw",value:function(t){return!(t.x<this.extGeo.xMin||t.x>this.extGeo.xMax||t.y<this.extGeo.yMin||t.y>this.extGeo.yMax)}},{key:"geoToPixX",value:function(t){return(t-this.center.x)/this.getZf()+.5*this.w}},{key:"geoToPixY",value:function(t){return-(t-this.center.y)/this.getZf()+.5*this.h}},{key:"pixToGeoX",value:function(t){return(t-.5*this.w)*this.getZf()+this.center.x}},{key:"pixToGeoY",value:function(t){return-(t-.5*this.h)*this.getZf()+this.center.y}},{key:"setViewFromURL",value:function(){var e=t.getParameterByName("x"),n=t.getParameterByName("y"),r=t.getParameterByName("z"),o=this.getCenter();null==e||null==e||isNaN(+e)||(o.x=+e),null==n||null==n||isNaN(+n)||(o.y=+n),null==r||null==r||isNaN(+r)||this.setZf(+r)}},{key:"addZoomSlider",value:function(t,e){(e=e||{}).width=e.width||"30px",e.height=e.height||"300px";var n=gt("#"+t);if(n.empty())return console.error("Could not find div element to build zoom slider. Id: "+t),this;var r=this;return this.slider=n.append("input").attr("type","range").attr("min",this.getZfExtent()[0]).attr("max",this.getZfExtent()[1]).attr("value",this.getZf()).on("input",(function(t){if(this&&this.value){var e=+this.value;gt(this).attr("value",e),r.setZf(e),r.redraw()}})).style("width",e.width).style("height",e.height).style("opacity",.7).on("mouseover",(function(t){gt(this).style("opacity",1)})).on("mouseout",(function(t){gt(this).style("opacity",.7)})).style("-webkit-appearance","slider-vertical").style("writing-mode","bt-lr").attr("orient","vertical").style("background","lightgray").style("outline","none").style("-webkit-transition",".2s").style("transition","opacity .2s"),this}}])&&Kn(e.prototype,n),r&&Kn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qn(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return tr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function tr(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 er(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var rr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};er(this,t),r=r||{},this.url=e,this.resolution=n,this.preprocess=r.preprocess||function(){},this.cellsViewCache=[]}var e,n,r;return e=t,(n=[{key:"getData",value:function(t,e){throw new Error("Method getData not implemented.")}},{key:"updateViewCache",value:function(t){throw new Error("Method updateViewCache not implemented.")}},{key:"getCellFromPosition",value:function(t,e){var n,r=this.getResolution(),o=r*Math.floor(t.x/r),i=r*Math.floor(t.y/r),a=Qn(e);try{for(a.s();!(n=a.n()).done;){var f=n.value;if(f.x==o&&f.y==i)return f}}catch(t){a.e(t)}finally{a.f()}}},{key:"getResolution",value:function(){return this.resolution}},{key:"getViewCache",value:function(){return this.cellsViewCache}}])&&nr(e.prototype,n),r&&nr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function or(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ir(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ir(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function ir(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 ar(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var cr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(ar(this,t),r=r||{},this.datasetComponents=e,this.resolutions=n,this.datasetComponents.length>1&&this.datasetComponents.length!=this.resolutions.length)throw new Error("Uncompatible number of datasets and resolutions: "+this.datasetComponents.length+" "+this.resolutions.length);r.preprocess&&this.setPrepocesses(r.preprocess)}var e,n,r;return e=t,r=[{key:"make",value:function(e,n,r){var o,i=[],a=or(e);try{for(a.s();!(o=a.n()).done;){var f=o.value;i.push(n(f))}}catch(t){a.e(t)}finally{a.f()}return new t(i,e,r)}}],(n=[{key:"setPrepocesses",value:function(t){var e,n=or(this.datasetComponents);try{for(n.s();!(e=n.n()).done;)e.value.preprocess=t}catch(t){n.e(t)}finally{n.f()}return this}}])&&fr(e.prototype,n),r&&fr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ur(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var lr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.id=e.id,this.top=e.top,this.bottom=e.bottom,this.left=e.left,this.right=e.right,this.background=e.background||"none",this.padding=e.padding||"5px",this.border=e.border||"0px",this["border-radius"]=e["border-radius"]||"none",this["box-shadow"]=e["box-shadow"]||"none",this["font-family"]=e["font-family"]||"Helvetica, Arial, sans-serif",this.id&&(this.div=gt("#"+this.id)),this.div&&!this.div.empty()||(this.div=gt(document.createElement("div")),this.id&&this.div.attr("id",this.id)),this.div.style("background",this.background).style("padding",this.padding).style("border",this.border).style("border-radius",this["border-radius"]).style("box-shadow",this["box-shadow"]).style("font-family",this["font-family"])}var e,n,r;return e=t,(n=[{key:"update",value:function(t){console.error("Legend update not implemented yet.")}}])&&ur(e.prototype,n),r&&ur(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function sr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return hr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function hr(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 dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var yr=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.offset=e.offset||function(t,e,n){return{dx:0,dy:0}},this.minZoom=e.minZoom||0,this.maxZoom=e.maxZoom||1/0,this.minZoom>=this.maxZoom)throw new Error("Unexpected zoom limits for layer. Zoom min should be smaller than zoom max.");this.legends=[]}var e,n,r;return e=t,r=[{key:"getStatistics",value:function(t,e,n){if(t&&0!=t.length){var r,o=1/0,i=-1/0,a=sr(t);try{for(a.s();!(r=a.n()).done;){var f=+e(r.value);n&&!f||(f<o&&(o=f),f>i&&(i=f))}}catch(t){a.e(t)}finally{a.f()}return{min:o,max:i}}}}],(n=[{key:"draw",value:function(t,e,n){throw new Error("Method draw not implemented.")}},{key:"getOffset",value:function(){return this.offset}},{key:"setOffset",value:function(t){return this.offset=t,this}},{key:"updateLegends",value:function(t){var e,n=sr(this.legends);try{for(n.s();!(e=n.n()).done;)e.value.update(t)}catch(t){n.e(t)}finally{n.f()}return this}}])&&dr(e.prototype,n),r&&dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function pr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var vr=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(pr(this,t),r=r||{},this.dataset=e,this.styles=n,this.visible=0!=r.visible,this.minZoom=r.minZoom||0,this.maxZoom=r.maxZoom||1/0,this.minZoom>=this.maxZoom)throw new Error("Unexpected zoom limits for layer. Zoom min should be smaller than zoom max.");this.pixNb=r.pixNb||3,this.cellInfoHTML=r.cellInfoHTML||t.defaultCellInfoHTML}var e,n,r;return e=t,r=[{key:"defaultCellInfoHTML",value:function(t){for(var e=[],n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];"x"!==o&&"y"!==o&&e.push("<b>",o,"</b>"," : ",t[o],"<br>")}return e.join("")}}],(n=[{key:"getDatasetComponent",value:function(t){if(!(t<this.minZoom||t>this.maxZoom)){if(1==this.dataset.datasetComponents.length)return this.dataset.datasetComponents[0];for(var e=this.dataset.resolutions,n=0,r=e[n]/this.pixNb;r<t&&n<e.length;)r=e[++n]/this.pixNb;return n==e.length?this.dataset.datasetComponents[e.length-1]:this.dataset.datasetComponents[n]}}}])&&br(e.prototype,n),r&&br(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function gr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wr=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;gr(this,t),e=e||{},this.div=e.div||"tooltip_eurostat",this.maxWidth=e.maxWidth||"20em",this.fontSize=e.fontSize||"1.2em",this.background=e.background||"white",this.padding=e.padding||"5px",this.border=e.border||"0px",this["border-radius"]=e["border-radius"]||"5px",this["box-shadow"]=e["box-shadow"]||"5px 5px 5px grey",this["font-family"]=e["font-family"]||"Helvetica, Arial, sans-serif",this.transitionDuration=e.transitionDuration||100,this.xOffset=e.xOffset||30,this.yOffset=e.yOffset||20,this.tooltip=gt("#"+this.div),this.tooltip.empty()&&(this.tooltip=gt("body").append("div").attr("id",this.div)),this.tooltip.style("max-width",this.maxWidth),this.tooltip.style("overflow","hidden"),this.tooltip.style("font-size",this.fontSize),this.tooltip.style("background",this.background),this.tooltip.style("padding",this.padding),this.tooltip.style("border",this.border),this.tooltip.style("border-radius",this["border-radius"]),this.tooltip.style("box-shadow",this["box-shadow"]),this.tooltip.style("font-family",this["font-family"]),this.tooltip.style("position","absolute"),this.tooltip.style("pointer-events","none"),this.tooltip.style("opacity","0")}var e,n,r;return e=t,(n=[{key:"show",value:function(){this.tooltip.transition().duration(this.transitionDuration).style("opacity",1)}},{key:"hide",value:function(){this.tooltip.transition().duration(this.transitionDuration).style("opacity",0)}},{key:"html",value:function(t){this.tooltip.html(t)}},{key:"setPosition",value:function(t){this.tooltip.style("left",t.pageX+this.xOffset+"px").style("top",t.pageY-this.yOffset+"px")}},{key:"style",value:function(t,e){return 1==arguments.length?this.tooltip.style(t):(this.tooltip.style(t,e),this)}},{key:"attr",value:function(t,e){return 1==arguments.length?this.tooltip.attr(t):(this.tooltip.attr(t,e),this)}}])&&mr(e.prototype,n),r&&mr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),xr={},Sr={};function _r(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function kr(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 Cr(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function Or(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),o=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Cr(-e,6):e>9999?"+"+Cr(e,6):Cr(e,4))+"-"+Cr(t.getUTCMonth()+1,2)+"-"+Cr(t.getUTCDate(),2)+(i?"T"+Cr(n,2)+":"+Cr(r,2)+":"+Cr(o,2)+"."+Cr(i,3)+"Z":o?"T"+Cr(n,2)+":"+Cr(r,2)+":"+Cr(o,2)+"Z":r||n?"T"+Cr(n,2)+":"+Cr(r,2)+"Z":"")}var Pr=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,o=[],i=t.length,a=0,f=0,c=i<=0,u=!1;function l(){if(c)return Sr;if(u)return u=!1,xr;var e,r,o=a;if(34===t.charCodeAt(o)){for(;a++<i&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=i?c=!0:10===(r=t.charCodeAt(a++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(a)&&++a),t.slice(o+1,e-1).replace(/""/g,'"')}for(;a<i;){if(10===(r=t.charCodeAt(e=a++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(a)&&++a;else if(r!==n)continue;return t.slice(o,e)}return c=!0,t.slice(o,i)}for(10===t.charCodeAt(i-1)&&--i,13===t.charCodeAt(i-1)&&--i;(r=l())!==Sr;){for(var s=[];r!==xr&&r!==Sr;)s.push(r),r=l();e&&null==(s=e(s,f++))||o.push(s)}return o}function o(e,n){return e.map((function(e){return n.map((function(t){return a(e[t])})).join(t)}))}function i(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?Or(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,o,i=r(t,(function(t,r){if(n)return n(t,r-1);o=t,n=e?function(t,e){var n=_r(t);return function(r,o){return e(n(r),o,t)}}(t,e):_r(t)}));return i.columns=o||[],i},parseRows:r,format:function(e,n){return null==n&&(n=kr(e)),[n.map(a).join(t)].concat(o(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=kr(t)),o(t,e).join("\n")},formatRows:function(t){return t.map(i).join("\n")},formatRow:i,formatValue:a}},Mr=Pr(","),jr=Mr.parse,Ar=(Mr.parseRows,Mr.format,Mr.formatBody,Mr.formatRows,Mr.formatRow,Mr.formatValue,Pr("\t")),Er=Ar.parse;Ar.parseRows,Ar.format,Ar.formatBody,Ar.formatRows,Ar.formatRow,Ar.formatValue;function Tr(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var Rr=function(t,e){return fetch(t,e).then(Tr)};function zr(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),Rr(e,n).then((function(e){return t(e,r)}))}}var Fr=zr(jr);zr(Er);function Ir(t){return(Ir="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})(t)}function Nr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Lr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Lr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Lr(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 Br(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gr(t,e){return(Gr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Zr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ur(t);if(e){var o=Ur(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Wr(this,n)}}function Wr(t,e){if(e&&("object"===Ir(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ur(t){return(Ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var $r=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gr(t,e)}(i,t);var e,n,r,o=Zr(i);function i(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Br(this,i),(n=o.call(this,t,e,r)).cells=[],n.infoLoadingStatus="notLoaded",n}return e=i,(n=[{key:"getData",value:function(t,e){var n=this;return"notLoaded"!=this.infoLoadingStatus||(this.infoLoadingStatus="loading",Fr(this.url).then((function(t){var r,o=Nr(t);try{for(o.s();!(r=o.n()).done;){var i=r.value;i.x=+i.x,i.y=+i.y}}catch(t){o.e(t)}finally{o.f()}if(n.cells=t,n.preprocess){var a,f=Nr(n.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;n.preprocess(c)}}catch(t){f.e(t)}finally{f.f()}}e&&e(),n.infoLoadingStatus="loaded"})).catch((function(){n.infoLoadingStatus="failed",n.cells=[]}))),this}},{key:"updateViewCache",value:function(t){if(this.cells){this.cellsViewCache=[];var e,n=Nr(this.cells);try{for(n.s();!(e=n.n()).done;){var r=e.value;+r.x+this.resolution<t.xMin||+r.x-this.resolution>t.xMax||+r.y+this.resolution<t.yMin||+r.y-this.resolution>t.yMax||this.cellsViewCache.push(r)}}catch(t){n.e(t)}finally{n.f()}}}}])&&Dr(e.prototype,n),r&&Dr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr);function Yr(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}var Vr=function(t,e){return fetch(t,e).then(Yr)};function Hr(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Xr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xr(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Xr(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 qr(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kr(t,e,n){return e&&qr(t.prototype,e),n&&qr(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var Jr=Kr((function t(e,n,r,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cells=e,this.x=n,this.y=r;var i=o.resolutionGeo,a=o.tileSizeCell;this.extGeo={xMin:o.originPoint.x+i*a*this.x,xMax:o.originPoint.x+i*a*(this.x+1),yMin:o.originPoint.y+i*a*this.y,yMax:o.originPoint.y+i*a*(this.y+1)};var f,c=Hr(this.cells);try{for(c.s();!(f=c.n()).done;){var u=f.value;u.x=this.extGeo.xMin+u.x*i,u.y=this.extGeo.yMin+u.y*i}}catch(t){c.e(t)}finally{c.f()}}));function Qr(t){return(Qr="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})(t)}function to(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return eo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return eo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function eo(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 no(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function oo(t,e){return(oo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function io(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fo(t);if(e){var o=fo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ao(this,n)}}function ao(t,e){if(e&&("object"===Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fo(t){return(fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var co=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&oo(t,e)}(i,t);var e,n,r,o=io(i);function i(t,e){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return no(this,i),(n=o.call(this,t,0,r)).app=e,n.info=void 0,n.infoLoadingStatus="notLoaded",n.cache={},n}return e=i,(n=[{key:"loadInfo",value:function(t){var e=this;return this.info||"notLoaded"!==this.infoLoadingStatus?!t||"loaded"!==this.infoLoadingStatus&&"failed"!==this.infoLoadingStatus||t():(this.infoLoadingStatus="loading",Vr(this.url+"info.json").then((function(n){e.info=n,e.resolution=n.resolutionGeo,e.infoLoadingStatus="loaded",t&&t()})).catch((function(){e.infoLoadingStatus="failed"}))),this}},{key:"getTilingEnvelope",value:function(t){if(this.info){var e=this.info.originPoint,n=this.info.resolutionGeo,r=this.info.tileSizeCell;return{xMin:Math.floor((t.xMin-e.x)/(n*r)),xMax:Math.floor((t.xMax-e.x)/(n*r)),yMin:Math.floor((t.yMin-e.y)/(n*r)),yMax:Math.floor((t.yMax-e.y)/(n*r))}}this.loadInfo((function(){}))}},{key:"getData",value:function(t,e){var n=this;if(!this.info)return this;var r=this.getTilingEnvelope(t);if(!r)return this;for(var o=this.info.tilingBounds,i=function(t){for(var i=function(r){if(n.cache[t]||(n.cache[t]={}),n.cache[t][r])return"continue";n.cache[t][r]="loading",Fr(n.url+t+"/"+r+".csv").then((function(o){if(n.info){var i=new Jr(o,t,r,n.info);if(n.cache[t][r]=i,n.preprocess){var a,f=to(i.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;n.preprocess(c)}}catch(t){f.e(t)}finally{f.f()}}if(e){var u,l=!1,s=to(n.app.getActiveLayers());try{for(s.s();!(u=s.n()).done;)if(u.value.getDatasetComponent(n.app.getZoomFactor())==n){l=!0;break}}catch(t){s.e(t)}finally{s.f()}if(l){var h=n.app.updateExtentGeo(),d=i.extGeo;h.xMax<=d.xMin||h.xMin>=d.xMax||h.yMax<=d.yMin||h.yMin>=d.yMax||e()}}}else console.error("Tile info inknown")})).catch((function(){n.cache[t][r]="failed"}))},a=Math.max(r.yMin,o.yMin);a<=Math.min(r.yMax,o.yMax);a++)i(a)},a=Math.max(r.xMin,o.xMin);a<=Math.min(r.xMax,o.xMax);a++)i(a);return this}},{key:"updateViewCache",value:function(t){if(this.cellsViewCache=[],this.info){var e=this.getTilingEnvelope(t);if(e)for(var n=this.info.tilingBounds,r=Math.max(e.xMin,n.xMin);r<=Math.min(e.xMax,n.xMax);r++)if(this.cache[r])for(var o=Math.max(e.yMin,n.yMin);o<=Math.min(e.yMax,n.yMax);o++){var i=this.cache[r][o];if(i&&"string"!=typeof i){var a,f=to(i.cells);try{for(f.s();!(a=f.n()).done;){var c=a.value;+c.x+this.resolution<t.xMin||+c.x-this.resolution>t.xMax||+c.y+this.resolution<t.yMin||+c.y-this.resolution>t.yMax||this.cellsViewCache.push(c)}}catch(t){f.e(t)}finally{f.f()}}}}}}])&&ro(e.prototype,n),r&&ro(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(rr);function uo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return lo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return lo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function lo(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 so(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ho=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=e||{},this.url=e.url,this.style=e.style||function(){return"bold 1em Arial"},this.color=e.color||(e.dark?function(){return"#ddd"}:function(){return"#222"}),this.haloColor=e.haloColor||(e.dark?function(){return"#000000BB"}:function(){return"#FFFFFFBB"}),this.haloWidth=e.haloWidth||function(){return 4},this.textAlign=e.textAlign||"start",this.offsetPix=e.offsetPix||[5,5],this.preprocess=e.preprocess,this.labels,this.loadingStatus="notLoaded"}var e,n,r;return e=t,(n=[{key:"draw",value:function(t){if(this.labels){var e=t.getZf();t.ctx.textAlign=this.textAlign||"start",t.initCanvasTransform();var n,r=uo(this.labels);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=this.style(o,e);if(i&&(t.ctx.font=i,t.toDraw(o))){var a=t.geoToPixX(o.x)+this.offsetPix[0],f=t.geoToPixY(o.y)-this.offsetPix[1];if(this.haloColor&&this.haloWidth){var c=this.haloColor(o,e),u=this.haloWidth(o,e);c&&u&&u>0&&(t.ctx.strokeStyle=c,t.ctx.lineWidth=u,t.ctx.strokeText(o.name,a,f))}if(this.color){var l=this.color(o,e);l&&(t.ctx.fillStyle=l,t.ctx.fillText(o.name,a,f))}}}}catch(t){r.e(t)}finally{r.f()}}else this.load(t.redraw)}},{key:"load",value:function(t){var e=this;if(!this.url)return console.log("Failed loading labels: No URL specified. "+this.url),this.loadingStatus="failed",void(this.labels=[]);"notLoaded"===this.loadingStatus&&(this.loadingStatus="loading",Fr(this.url).then((function(n){if(e.preprocess){var r,o=uo(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.preprocess(i)}}catch(t){o.e(t)}finally{o.f()}}e.labels=n,e.loadingStatus="loaded",t&&t()})).catch((function(){console.log("Failed loading labels from "+e.url),e.labels=[],e.loadingStatus="failed"})))}},{key:"getUrl",value:function(){return this.url}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"getStyle",value:function(){return this.style}},{key:"setStyle",value:function(t){return this.style=t,this}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getHaloColor",value:function(){return this.haloColor}},{key:"setHaloColor",value:function(t){return this.haloColor=t,this}},{key:"getHaloWidth",value:function(){return this.haloWidth}},{key:"setHaloWidth",value:function(t){return this.haloWidth=t,this}},{key:"getPreprocess",value:function(){return this.preprocess}},{key:"setPreprocess",value:function(t){return this.preprocess=t,this}}])&&so(e.prototype,n),r&&so(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yo(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return po(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return po(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function po(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 bo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var vo=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.url=e,this.preprocess=n.preprocess,this.color=n.color||function(t,e){return"gray"},this.width=n.width||function(t,e){return 2},this.lineDash=n.lineDash||function(t,e){},this.fs,this.loadingStatus="notLoaded"}var e,n,r;return e=t,(n=[{key:"draw",value:function(t){if(this.fs){var e=t.getZf();t.setCanvasTransform();var n,r=yo(this.fs);try{for(r.s();!(n=r.n()).done;){var o=n.value,i=o.geometry.coordinates;if(!(i.length<2)){var a=this.color(o,e);if(a&&"none"!=a){t.ctx.strokeStyle=a;var f=this.width(o,e);if(f&&!(f<0)){t.ctx.lineWidth=f*e;var c=this.lineDash(o,e);c&&t.ctx.setLineDash(c),t.ctx.beginPath(),t.ctx.moveTo(i[0][0],i[0][1]);for(var u=1;u<i.length;u++)t.ctx.lineTo(i[u][0],i[u][1]);t.ctx.stroke()}}}}}catch(t){r.e(t)}finally{r.f()}t.ctx.setLineDash([])}else this.load(t.redraw)}},{key:"load",value:function(t){var e=this;if(!this.url)return console.log("Failed loading boundaries: No URL specified. "+this.url),this.loadingStatus="failed",void(this.labels=[]);"notLoaded"===this.loadingStatus&&(this.loadingStatus="loading",Vr(this.url).then((function(n){if(n=n.features,e.preprocess){var r,o=yo(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;e.preprocess(i)}}catch(t){o.e(t)}finally{o.f()}}e.fs=n,e.loadingStatus="loaded",t&&t()})).catch((function(){console.log("Failed loading boundaries from "+e.url),e.fs=[],e.loadingStatus="failed"})))}},{key:"getUrl",value:function(){return this.url}},{key:"setUrl",value:function(t){return this.url=t,this}},{key:"getPreprocess",value:function(){return this.preprocess}},{key:"setPreprocess",value:function(t){return this.preprocess=t,this}}])&&bo(e.prototype,n),r&&bo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function go(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return mo(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return mo(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function mo(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 wo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var xo=function(){function t(e,n){var r=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n=n||{},this.layers=[],e=e||document.getElementById("gridviz")){this.w=n.w||e.offsetWidth,this.h=n.h||e.offsetHeight;var o=document.createElement("canvas");o.setAttribute("width",""+this.w),o.setAttribute("height",""+this.h),e.appendChild(o),this.cg=new Jn(o),this.cg.redraw=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];r.legend&&t&&r.legend.selectAll("*").remove(),r.cg.initCanvasTransform(),r.cg.clear(r.cg.backgroundColor);var e,n=r.getZoomFactor(),o=go(r.layers);try{for(o.s();!(e=o.n()).done;){var i=e.value;if(i.visible&&!(n>i.maxZoom||n<i.minZoom)){var a=i.getDatasetComponent(n);if(a){if(t&&a.getData(r.cg.updateExtentGeo(),(function(){r.cg.redraw()})),t&&a.updateViewCache(r.cg.extGeo),t){var f,c=go(i.styles);try{for(c.s();!(f=c.n()).done;){var u=f.value;n>u.maxZoom||(n<u.minZoom||u.draw(a.getViewCache(),a.getResolution(),r.cg))}}catch(t){c.e(t)}finally{c.f()}}if(r.legend&&t){var l,s=go(i.styles);try{for(s.s();!(l=s.n()).done;){var h=l.value;if(!(n>h.maxZoom)&&!(n<h.minZoom)){var d,y=go(h.legends);try{for(y.s();!(d=y.n()).done;){var p=d.value;r.legend.node().append(p.div.node())}}catch(t){y.e(t)}finally{y.f()}}}}catch(t){s.e(t)}finally{s.f()}}}}}}catch(t){o.e(t)}finally{o.f()}return r.showBoundaries&&r.boundaryLayer&&r.boundaryLayer.draw(r.cg),r.showLabels&&r.labelLayer&&r.labelLayer.draw(r.cg),r.canvasSave=null,r},this.labelLayer=void 0,this.showLabels=!0,this.boundaryLayer=void 0,this.showBoundaries=!0,this.legendDivId=n.legendDivId||"gvizLegend",this.legend=gt("#"+this.legendDivId),this.legend.empty()&&(this.legend=gt("body").append("div").attr("id",this.legendDivId).style("position","absolute").style("width","auto").style("height","auto").style("background","#FFFFFFCC").style("border","0px").style("border-radius","5px").style("box-shadow","5px 5px 5px grey").style("font-family","Helvetica, Arial, sans-serif").style("top","20px").style("right","20px")),this.tooltip=new wr;var i=function(t){var e={x:r.cg.pixToGeoX(t.clientX),y:r.cg.pixToGeoY(t.clientY)},n=r.getCellFocusInfo(e);n?(r.tooltip.setPosition(t),r.tooltip.show(),r.tooltip.html(n.html),r.canvasSave?r.cg.ctx.drawImage(r.canvasSave,0,0):(r.canvasSave=document.createElement("canvas"),r.canvasSave.setAttribute("width",""+r.w),r.canvasSave.setAttribute("height",""+r.h),r.canvasSave.getContext("2d").drawImage(r.cg.canvas,0,0)),r.cg.initCanvasTransform(),r.cg.ctx.strokeStyle=r.selectionRectangleColor,r.cg.ctx.lineWidth=r.selectionRectangleWidthPix,r.cg.ctx.beginPath(),r.cg.ctx.rect(r.cg.geoToPixX(n.cell.x)-r.selectionRectangleWidthPix/2,r.cg.geoToPixY(n.cell.y)+r.selectionRectangleWidthPix/2,n.resolution/r.getZoomFactor()+r.selectionRectangleWidthPix,-n.resolution/r.getZoomFactor()-r.selectionRectangleWidthPix),r.cg.ctx.stroke()):(r.tooltip.hide(),r.canvasSave&&r.cg.ctx.drawImage(r.canvasSave,0,0))};e.addEventListener("mouseover",(function(t){i(t)})),e.addEventListener("mousemove",(function(t){i(t)})),e.addEventListener("mouseout",(function(){r.tooltip.hide()})),this.cg.onZoomStartFun=function(){r.tooltip.hide()},this.canvasSave=null,this.selectionRectangleColor=n.selectionRectangleColor||"red",this.selectionRectangleWidthPix=n.selectionRectangleWidthPix||4}else console.error("Cannot find gridviz container element.")}var e,n,r;return e=t,(n=[{key:"getActiveLayers",value:function(){var t,e=[],n=this.getZoomFactor(),r=go(this.layers);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.visible&&o.getDatasetComponent(n)&&e.push(o)}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"hideAllLayers",value:function(){var t,e=go(this.layers);try{for(e.s();!(t=e.n()).done;)t.value.visible=!1}catch(t){e.e(t)}finally{e.f()}return this}},{key:"updateExtentGeo",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:20;return this.cg.updateExtentGeo(t)}},{key:"getCellFocusInfo",value:function(t){var e=this.getActiveLayers(),n=e[e.length-1];if(n){var r=n.getDatasetComponent(this.getZoomFactor());if(r){var o=r.getCellFromPosition(t,r.getViewCache());if(o)return{cell:o,html:n.cellInfoHTML(o),resolution:r.getResolution()}}}}},{key:"getGeoCenter",value:function(){return this.cg.getCenter()}},{key:"setGeoCenter",value:function(t){return this.cg.setCenter(t),this}},{key:"getZoomFactor",value:function(){return this.cg.getZf()}},{key:"setZoomFactor",value:function(t){return this.cg.setZf(t),this}},{key:"getZoomFactorExtent",value:function(){return this.cg.getZfExtent()}},{key:"setZoomFactorExtent",value:function(t){return this.cg.setZfExtent(t),this}},{key:"getBackgroundColor",value:function(){return this.cg.backgroundColor}},{key:"setBackgroundColor",value:function(t){return this.cg.backgroundColor=t,this}},{key:"getBoundaryLayer",value:function(){return this.boundaryLayer}},{key:"setBoundaryLayer",value:function(t){return this.boundaryLayer=t,this}},{key:"getLabelLayer",value:function(){return this.labelLayer}},{key:"setLabelLayer",value:function(t){return this.labelLayer=t,this}},{key:"addLayerFromDataset",value:function(t,e,n){var r=new vr(t,e,n);return this.layers.push(r),this}},{key:"makeCSVGridDataset",value:function(t,e,n){var r=this;return new cr([new $r(t,e,n).getData(void 0,(function(){r.cg.redraw()}))],[],n)}},{key:"makeTiledCSVGridDataset",value:function(t,e){var n=this;return new cr([new co(t,this,e).loadInfo((function(){n.cg.redraw()}))],[],e)}},{key:"makeMultiScaleCSVGridDataset",value:function(t,e,n){var r=this;return cr.make(t,(function(t){return new $r(e(t),t,n).getData(void 0,(function(){r.cg.redraw()}))}),n)}},{key:"makeMultiScaleTiledCSVGridDataset",value:function(t,e,n){var r=this;return cr.make(t,(function(t){return new co(e(t),r,n).loadInfo((function(){r.cg.redraw()}))}),n)}},{key:"addCSVGridLayer",value:function(t,e,n,r){var o=this.makeCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addTiledCSVGridLayer",value:function(t,e,n){var r=this.makeTiledCSVGridDataset(t,n);return this.addLayerFromDataset(r,e,n)}},{key:"addMultiScaleCSVGridLayer",value:function(t,e,n,r){var o=this.makeMultiScaleCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addMultiScaleTiledCSVGridLayer",value:function(t,e,n,r){var o=this.makeMultiScaleTiledCSVGridDataset(t,e,r);return this.addLayerFromDataset(o,n,r)}},{key:"addZoomSlider",value:function(t,e){return this.cg.addZoomSlider(t,e),this}},{key:"setViewFromURL",value:function(){return this.cg.setViewFromURL(),this}}])&&wo(e.prototype,n),r&&wo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}(),So=function(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},_o=So("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),ko=So("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Co=So("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Oo=So("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Po=So("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),Mo=So("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),jo=So("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ao=So("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),Eo=So("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),To=So("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),Ro=t=>en(t[t.length-1]),zo=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(So),Fo=Ro(zo),Io=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(So),No=Ro(Io),Lo=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(So),Bo=Ro(Lo),Do=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(So),Go=Ro(Do),Zo=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(So),Wo=Ro(Zo),Uo=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(So),$o=Ro(Uo),Yo=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(So),Vo=Ro(Yo),Ho=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(So),Xo=Ro(Ho),qo=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(So),Ko=Ro(qo),Jo=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(So),Qo=Ro(Jo),ti=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(So),ei=Ro(ti),ni=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(So),ri=Ro(ni),oi=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(So),ii=Ro(oi),ai=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(So),fi=Ro(ai),ci=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(So),ui=Ro(ci),li=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(So),si=Ro(li),hi=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(So),di=Ro(hi),yi=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(So),pi=Ro(yi),bi=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(So),vi=Ro(bi),gi=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(So),mi=Ro(gi),wi=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(So),xi=Ro(wi),Si=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(So),_i=Ro(Si),ki=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(So),Ci=Ro(ki),Oi=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(So),Pi=Ro(Oi),Mi=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(So),ji=Ro(Mi),Ai=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(So),Ei=Ro(Ai),Ti=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(So),Ri=Ro(Ti),zi=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"};const Fi=Math.PI/180,Ii=180/Math.PI;var Ni=-.29227,Li=1.97294,Bi=-.90649*Li,Di=1.78277*Li,Gi=-.6557636667999999;function Zi(t){if(t instanceof Ui)return new Ui(t.h,t.s,t.l,t.opacity);t instanceof Ie||(t=ze(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Gi*r+Bi*e-Di*n)/(Gi+Bi-Di),i=r-o,a=(Li*(n-o)-Ni*i)/-.90649,f=Math.sqrt(a*a+i*i)/(Li*o*(1-o)),c=f?Math.atan2(a,i)*Ii-120:NaN;return new Ui(c<0?c+360:c,f,o,t.opacity)}function Wi(t,e,n,r){return 1===arguments.length?Zi(t):new Ui(t,e,n,null==r?1:r)}function Ui(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function $i(t){return function e(n){function r(e,r){var o=t((e=Wi(e)).h,(r=Wi(r)).h),i=Je(e.s,r.s),a=Je(e.l,r.l),f=Je(e.opacity,r.opacity);return function(t){return e.h=o(t),e.s=i(t),e.l=a(Math.pow(t,n)),e.opacity=f(t),e+""}}return n=+n,r.gamma=e,r}(1)}pe(Ui,Wi,be(ve,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Ui(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Ui(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*Fi,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new Ie(255*(e+n*(-.14861*r+1.78277*o)),255*(e+n*(Ni*r+-.90649*o)),255*(e+n*(Li*r)),this.opacity)}}));$i((function(t,e){var n=e-t;return n?qe(t,n>180||n<-180?n-360*Math.round(n/360):n):Xe(isNaN(t)?e:t)}));var Yi=$i(Je),Vi=Yi(Wi(300,.5,0),Wi(-240,.5,1)),Hi=Yi(Wi(-100,.75,.35),Wi(80,1.5,.8)),Xi=Yi(Wi(260,.75,.35),Wi(80,1.5,.8)),qi=Wi(),Ki=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return qi.h=360*t-100,qi.s=1.5-1.5*e,qi.l=.8-.9*e,qi+""},Ji=Fe(),Qi=Math.PI/3,ta=2*Math.PI/3,ea=function(t){var e;return t=(.5-t)*Math.PI,Ji.r=255*(e=Math.sin(t))*e,Ji.g=255*(e=Math.sin(t+Qi))*e,Ji.b=255*(e=Math.sin(t+ta))*e,Ji+""},na=function(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"};function ra(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var oa=ra(So("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),ia=ra(So("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),aa=ra(So("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),fa=ra(So("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function ca(t){return(ca="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})(t)}function ua(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return la(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return la(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function la(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 sa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ha(t,e){return(ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function da(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pa(t);if(e){var o=pa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ya(this,n)}}function ya(t,e){if(e&&("object"===ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function pa(t){return(pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ba=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ha(t,e)}(i,t);var e,n,r,o=da(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.sizeCol=t.sizeCol,e.size=t.size,e.shape=t.shape||function(){return"square"},e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i=this,a=n.getZf();this.sizeCol&&(t.sort((function(t,e){return e[i.sizeCol]-t[i.sizeCol]})),r=yr.getStatistics(t,(function(t){return t[i.sizeCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[i.colorCol]}),!0)),n.setCanvasTransform();var f,c=ua(t);try{for(c.s();!(f=c.n()).done;){var u=f.value,l=this.color?this.color(u[this.colorCol],e,o):void 0;if(l&&"none"!==l){n.ctx.fillStyle=l;var s=this.shape?this.shape(u):"square";if("none"!==s){var h=(this.size||function(){return e})(u[this.sizeCol],e,r,a),d=this.offset(u,e,a);if("square"===s){var y=e*(1-h/e)*.5;n.ctx.fillRect(u.x+y+d.dx,u.y+y+d.dy,h,h)}else if("circle"===s)n.ctx.beginPath(),n.ctx.arc(u.x+.5*e+d.dx,u.y+.5*e+d.dy,.5*h,0,2*Math.PI,!1),n.ctx.fill();else{if("donut"!==s)throw new Error("Unexpected shape:"+s);var p=u.x+.5*e+d.dx,b=u.y+.5*e+d.dy;n.ctx.beginPath(),n.ctx.moveTo(p,b),n.ctx.arc(p,b,.5*e,0,2*Math.PI),n.ctx.arc(p,b,.5*(1-h/e)*e,0,2*Math.PI,!0),n.ctx.closePath(),n.ctx.fill()}}}}}catch(t){c.e(t)}finally{c.f()}this.updateLegends({style:this,r:e,zf:a,sSize:r,sColor:o})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(t){return this.size=t,this}},{key:"getShape",value:function(){return this.shape}},{key:"setShape",value:function(t){return this.shape=t,this}}])&&sa(e.prototype,n),r&&sa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function va(t){return(va="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})(t)}function ga(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return ma(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ma(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function ma(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 wa(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function xa(t,e){return(xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Sa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ka(t);if(e){var o=ka(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return _a(this,n)}}function _a(t,e){if(e&&("object"===va(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function ka(t){return(ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ca=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xa(t,e)}(i,t);var e,n,r,o=Sa(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.strokeColorCol=t.strokeColorCol,e.strokeColor=t.strokeColor||function(){return"#666"},e.sizeCol=t.sizeCol,e.size=t.size,e.strokeWidthCol=t.strokeWidthCol,e.strokeWidth=t.strokeWidth,e.shape=t.shape||function(){return"square"},e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.strokeColorCol&&(r=yr.getStatistics(t,(function(t){return t[a.strokeColorCol]}),!0)),this.sizeCol&&(o=yr.getStatistics(t,(function(t){return t[a.sizeCol]}),!0)),this.strokeWidthCol&&(i=yr.getStatistics(t,(function(t){return t[a.strokeWidthCol]}),!0)),n.setCanvasTransform();var c,u=ga(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.strokeColor?this.strokeColor(l[this.strokeColorCol],e,r):void 0;if(s&&"none"!==s){n.ctx.strokeStyle=s;var h=(this.size||function(){return e})(l[this.sizeCol],e,o,f),d=this.strokeWidth?this.strokeWidth(l[this.strokeWidthCol],e,i,f):1*f;if(d&&!(d<=0)){n.ctx.lineWidth=d;var y=this.shape?this.shape(l):"square";if("none"!==y){var p=this.offset(l,e,f);if("square"===y){var b=e*(1-h/e)*.5;n.ctx.beginPath(),n.ctx.rect(l.x+b+p.dx,l.y+b+p.dy,h,h),n.ctx.stroke()}else if("circle"===y)n.ctx.beginPath(),n.ctx.arc(l.x+.5*e+p.dx,l.y+.5*e+p.dy,.5*h,0,2*Math.PI,!1),n.ctx.stroke();else{if("donut"!==y)throw new Error("Unexpected shape:"+y);console.error("Not implemented")}}}}}}catch(t){u.e(t)}finally{u.f()}}}])&&wa(e.prototype,n),r&&wa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Oa(t){return(Oa="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})(t)}function Pa(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ma(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ma(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Ma(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 ja(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Aa(t,e){return(Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ea(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ra(t);if(e){var o=Ra(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ta(this,n)}}function Ta(t,e){if(e&&("object"===Oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ra(t){return(Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var za=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(i,t);var e,n,r,o=Ea(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.heightCol=t.heightCol,e.height=t.height||function(t){return Math.sqrt(t)},e.lineColor=t.lineColor||"#BBB",e.lineWidth=t.lineWidth||1,e.fillColor=t.fillColor||"#c08c5968",e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf(),a=yr.getStatistics(t,(function(t){return t[o.heightCol]}),!0),f={},c=Pa(t);try{for(c.s();!(r=c.n()).done;){var u=r.value,l=f[u.y];l||(l={},f[u.y]=l),l[u.x]=this.height(u[this.heightCol],e,a,i)}}catch(t){c.e(t)}finally{c.f()}var s=n.extGeo;if(s){var h=Math.floor(s.xMin/e)*e,d=Math.floor(s.xMax/e)*e,y=Math.floor(s.yMin/e)*e,p=Math.floor(s.yMax/e)*e;n.ctx.strokeStyle=this.lineColor,n.ctx.lineWidth=this.lineWidth*i,n.ctx.fillStyle=this.fillColor,n.setCanvasTransform();for(var b=p;b>=y;b-=e){var v=f[b];if(v){n.ctx.beginPath(),n.ctx.moveTo(h-e/2,b);for(var g=void 0,m=h;m<=d;m+=e){var w=v[m];w||(w=0),w||g?n.ctx.lineTo(m+e/2,b+w):n.ctx.moveTo(m+e/2,b),g=w}g&&n.ctx.lineTo(d+e/2,b),this.fillColor&&n.ctx.fill(),this.lineColor&&this.lineWidth>0&&n.ctx.stroke()}}}}},{key:"getHeightCol",value:function(){return this.heightCol}},{key:"setHeightCol",value:function(t){return this.heightCol=t,this}},{key:"getHeight",value:function(){return this.height}},{key:"setHeight",value:function(t){return this.height=t,this}},{key:"getLineColor",value:function(){return this.lineColor}},{key:"setLineColor",value:function(t){return this.lineColor=t,this}},{key:"getLineWidth",value:function(){return this.lineWidth}},{key:"setLineWidth",value:function(t){return this.lineWidth=t,this}},{key:"getFillColor",value:function(){return this.fillColor}},{key:"setFillColor",value:function(t){return this.fillColor=t,this}}])&&ja(e.prototype,n),r&&ja(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Fa(t){return(Fa="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})(t)}function Ia(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null==n)return;var r,o,i=[],a=!0,f=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(i.push(r.value),!e||i.length!==e);a=!0);}catch(t){f=!0,o=t}finally{try{a||null==n.return||n.return()}finally{if(f)throw o}}return i}(t,e)||Na(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Na(t,e){if(t){if("string"==typeof t)return La(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)?La(t,e):void 0}}function La(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 Ba(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Da(t,e){return(Da=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Ga(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Wa(t);if(e){var o=Wa(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Za(this,n)}}function Za(t,e){if(e&&("object"===Fa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Wa(t){return(Wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ua=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Da(t,e)}(i,t);var e,n,r,o=Ga(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.color=t.color,e.type=t.type,e.sizeCol=t.sizeCol,e.size=t.size||function(t,e){return e},e.stripesOrientation=t.stripesOrientation||function(){return 0},e.pieChartInternalRadiusFactor=t.pieChartInternalRadiusFactor||0,e.offsetAngle=t.offsetAngle,e.agePyramidHeight=t.agePyramidHeight,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.sizeCol&&(t.sort((function(t,e){return e[o.sizeCol]-t[o.sizeCol]})),r=yr.getStatistics(t,(function(t){return t[o.sizeCol]}),!0));var a=Object.entries(this.color).length;n.setCanvasTransform();var f,c=function(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=Na(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}(t);try{for(c.s();!(f=c.n()).done;){var u=f.value,l=(this.size||function(){return e})(u[this.sizeCol],e,r,i),s=this.offset(u,e,i),h=this.type?this.type(u):"flag",d=u.x+s.dx+("agepyramid"===h?0:.5*e),y=u.y+s.dy+("agepyramid"===h?0:.5*e);if("agepyramid"===h||"radar"===h||"halftone"===h){for(var p=-1/0,b=0,v=Object.keys(this.color);b<v.length;b++){var g=+u[v[b]];g>p&&(p=g)}var m=0;"agepyramid"===h&&this.agePyramidHeight&&(m=(e-this.agePyramidHeight(e))/2),"radar"!==h&&"halftone"!==h||(m=Math.PI/2+(this.offsetAngle?this.offsetAngle(u,e,i)*Math.PI/180:0));var w="agepyramid"===h?(this.agePyramidHeight?this.agePyramidHeight(e):e)/a:"radar"===h||"halftone"===h?2*Math.PI/a:void 0;if(void 0===w)throw new Error("Unexpected symbol type:"+h);for(var x=0,S=Object.entries(this.color);x<S.length;x++){var _=Ia(S[x],2),k=_[0],C=_[1];if("agepyramid"===h){n.ctx.fillStyle=C;var O=l*u[k]/p;n.ctx.fillRect(d+(e-O)/2,y+m,O,w),m+=w}else if("radar"===h){n.ctx.fillStyle=C;var P=u[k],M=l/2*Math.sqrt(P/p);n.ctx.beginPath(),n.ctx.moveTo(d,y),n.ctx.arc(d,y,M,m-w,m),n.ctx.lineTo(d,y),n.ctx.fill(),m+=w}else{if("halftone"!==h)throw new Error("Unexpected symbol type:"+h);n.ctx.fillStyle=C;var j=u[k],A=.333*l*Math.sqrt(j/p);n.ctx.beginPath(),n.ctx.arc(d+.25*e*Math.cos(m),y+.25*e*Math.sin(m),A,0,2*Math.PI),n.ctx.fill(),m+=w}}}else{for(var E=0,T=0,R=Object.keys(this.color);T<R.length;T++){var z=+u[R[T]];z&&(E+=z)}if(!E||isNaN(E))continue;for(var F=0,I=e*(1-l/e)*.5,N=0,L=Object.entries(this.color);N<L.length;N++){var B=Ia(L[N],2),D=B[0],G=B[1],Z=u[D]/E;if(Z&&!isNaN(Z)){if(n.ctx.fillStyle=G,"flag"===h)0==this.stripesOrientation(u[this.sizeCol],e,i)?n.ctx.fillRect(u.x+I+s.dx,u.y+I+F*l+s.dy,l,Z*l):n.ctx.fillRect(u.x+I+F*l+s.dx,u.y+I+s.dy,Z*l,l);else if("piechart"===h){var W=2*F*Math.PI,U=2*(F+Z)*Math.PI;n.ctx.beginPath(),n.ctx.moveTo(d,y),n.ctx.arc(d,y,.5*l,W,U),this.pieChartInternalRadiusFactor&&n.ctx.arc(d,y,.5*l*this.pieChartInternalRadiusFactor,W,U,!0),n.ctx.closePath(),n.ctx.fill()}else if("ring"===h)n.ctx.beginPath(),n.ctx.arc(d,y,Math.sqrt(1-F)*l*.5,0,2*Math.PI),n.ctx.fill();else{if("segment"!==h)throw new Error("Unexpected symbol type:"+h);var $=l*l/e;0==this.stripesOrientation(u[this.sizeCol],e,i)?n.ctx.fillRect(u.x+s.dx,u.y+(e-$)/2+F*$+s.dy,e,Z*$):n.ctx.fillRect(u.x+F*e+s.dx,u.y+(e-$)/2+s.dy,Z*e,$)}F+=Z}}}}}catch(t){c.e(t)}finally{c.f()}this.updateLegends({style:this,r:e,zf:i,sSize:r})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getType",value:function(){return this.type}},{key:"setType",value:function(t){return this.type=t,this}},{key:"getColSize",value:function(){return this.sizeCol}},{key:"setColSize",value:function(t){return this.sizeCol=t,this}},{key:"getSize",value:function(){return this.size}},{key:"setSize",value:function(t){return this.size=t,this}},{key:"getStripesOrientation",value:function(){return this.stripesOrientation}},{key:"setStripesOrientation",value:function(t){return this.stripesOrientation=t,this}},{key:"getPieChartInternalRadiusFactor",value:function(){return this.pieChartInternalRadiusFactor}},{key:"setPieChartInternalRadiusFactor",value:function(t){return this.pieChartInternalRadiusFactor=t,this}},{key:"getOffsetAngle",value:function(){return this.offsetAngle}},{key:"setOffsetAngle",value:function(t){return this.offsetAngle=t,this}},{key:"getAgePyramidHeight",value:function(){return this.agePyramidHeight}},{key:"sethAgePyramidHeight",value:function(t){return this.agePyramidHeight=t,this}}])&&Ba(e.prototype,n),r&&Ba(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function $a(t){return($a="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})(t)}function Ya(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Va(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Va(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Va(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 Ha(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Xa(t,e){return(Xa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function qa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ja(t);if(e){var o=Ja(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ka(this,n)}}function Ka(t,e){if(e&&("object"===$a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ja(t){return(Ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Qa=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xa(t,e)}(i,t);var e,n,r,o=qa(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.orientation=t.orientation,e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.lengthCol=t.lengthCol,e.length=t.length,e.widthCol=t.widthCol,e.width=t.width,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.lengthCol&&(t.sort((function(t,e){return e[a.lengthCol]-t[a.lengthCol]})),o=yr.getStatistics(t,(function(t){return t[a.lengthCol]}),!0)),this.widthCol&&(i=yr.getStatistics(t,(function(t){return t[a.widthCol]}),!0)),n.ctx.lineCap="butt";var c=Math.PI/180;n.setCanvasTransform();var u,l=Ya(t);try{for(l.s();!(u=l.n()).done;){var s=u.value,h=this.color?this.color(s[this.colorCol],e,r):void 0;if(h){var d=this.width?this.width(s[this.widthCol],e,i,f):void 0;if(d&&!(d<0)){var y=this.length?this.length(s[this.lengthCol],e,o,f):void 0;if(y&&!(y<0)){var p=this.orientation(s)*c;if(void 0!==p&&!isNaN(p)){var b=this.offset(s,e,f);n.ctx.strokeStyle=h,n.ctx.lineWidth=d;var v=s.x+e/2+b.dx,g=s.y+e/2+b.dy,m=.5*Math.cos(p)*y,w=.5*Math.sin(p)*y;n.ctx.beginPath(),n.ctx.moveTo(v-m,g-w),n.ctx.lineTo(v+m,g+w),n.ctx.stroke()}}}}}}catch(t){l.e(t)}finally{l.f()}this.updateLegends({style:this,r:e,zf:f,sColor:r,sLength:o,sWidth:i})}},{key:"getOrientation",value:function(){return this.orientation}},{key:"setOrientation",value:function(t){return this.orientation=t,this}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getLength",value:function(){return this.length}},{key:"setLength",value:function(t){return this.length=t,this}},{key:"getWidth",value:function(){return this.width}},{key:"setWidth",value:function(t){return this.width=t,this}}])&&Ha(e.prototype,n),r&&Ha(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function tf(t){return(tf="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})(t)}function ef(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return nf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return nf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function nf(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 rf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function of(t,e){return(of=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function af(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=cf(t);if(e){var o=cf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return ff(this,n)}}function ff(t,e){if(e&&("object"===tf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function cf(t){return(cf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var uf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&of(t,e)}(i,t);var e,n,r,o=af(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.textCol=t.textCol,e.text=t.text||function(t,e,n,r){return"X"},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.fontSizeCol=t.fontSizeCol,e.fontSize=t.fontSize||function(t,e,n,r){return e-2},e.fontFamily=t.fontFamily||"Arial",e.fontWeight=t.fontWeight||"bold",e}return e=i,r=[{key:"getCharLegendFun",value:function(t){var e=t.length;return function(n){return 0==n?"":1==n?t[e-1]:t[Math.floor(n*e)]}}}],(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.textCol&&(r=yr.getStatistics(t,(function(t){return t[a.textCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.fontSizeCol&&(t.sort((function(t,e){return e[a.fontSizeCol]-t[a.fontSizeCol]})),i=yr.getStatistics(t,(function(t){return t[a.fontSizeCol]}),!0));var c,u=ef(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.text?this.text(l[this.textCol],e,r):void 0;if(s){var h=this.color?this.color(l[this.colorCol],e,o):void 0;if(h){n.ctx.fillStyle=h;var d=(this.fontSize||function(){return e/f-2})(l[this.fontSizeCol],e,i,f)/f,y=this.fontFamily||"Arial",p=this.fontWeight||"bold";n.ctx.font=p+" "+d+"px "+y;var b=this.offset(l,e,f);n.ctx.textAlign="center";var v=n.geoToPixX(l.x+.5*e+b.dx),g=n.geoToPixY(l.y+.5*e+b.dy)+.5*d;n.ctx.fillText(s,v,g)}}}}catch(t){u.e(t)}finally{u.f()}this.updateLegends({style:this,r:e,zf:f,sColor:o})}}])&&rf(e.prototype,n),r&&rf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function lf(t){return(lf="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})(t)}function sf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return hf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return hf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function hf(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 df(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function yf(t,e){return(yf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function pf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vf(t);if(e){var o=vf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return bf(this,n)}}function bf(t,e){if(e&&("object"===lf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function vf(t){return(vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var gf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yf(t,e)}(i,t);var e,n,r,o=pf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.value=t.value,e.sigma=t.sigma,e.styles=t.styles,e}return e=i,(n=[{key:"getKernelMatrix",value:function(t){for(var e,n,r=Math.floor(3*t),o=2*t*t,i=[],a=0;a<=r;a++){for(var f=[],c=0;c<=r;c++){var u=(e=a,n=c,Math.exp(-(e*e+n*n)/o));f.push({w:u,val:0})}i.push(f)}return i}},{key:"kernelSmoothing",value:function(t,e,n,r){var o,i=Math.floor(e.xMin/n)*n,a=Math.floor(e.xMax/n)*n,f=Math.floor(e.yMin/n)*n,c=Math.floor(e.yMax/n)*n,u=(a-i)/n+1,l=(c-f)/n+1,s=sf(t);try{for(s.s();!(o=s.n()).done;)o.value.ksmval=0}catch(t){s.e(t)}finally{s.f()}var h,d={},y=sf(t);try{for(y.s();!(h=y.n()).done;){var p=h.value,b=Math.floor((p.x-i)/n),v=Math.floor((p.y-f)/n);d[b]||(d[b]={}),d[b][v]=p}}catch(t){y.e(t)}finally{y.f()}for(var g=this.getKernelMatrix(r),m=g.length,w=0,x=Object.keys(d);w<x.length;w++)for(var S=x[w],_=+S,k=0,C=Object.keys(d[S]);k<C.length;k++){var O=+C[k],P=d[_][O];if(!P.notInputCell){var M=this.value(P);if(M){for(var j=0,A=0;A<m;A++)for(var E=0;E<m;E++){var T=g[A][E];T.val=T.w*M,j+=T.w}for(var R=function(t,e){return t>=0&&t<u&&e>=0&&e<l},z=function(t,e,r){var o=d[t]?d[t][e]:void 0;o?o.ksmval?o.ksmval+=r:o.ksmval=r:(d[t]||(d[t]={}),d[t][e]={x:i+t*n,y:f+e*n,ksmval:r,notInputCell:!0})},F=0;F<m;F++)for(var I=0;I<m;I++){var N=g[Math.abs(F)][Math.abs(I)];if(N){var L=N.val;L&&(L/=j)&&(R(_+F,O+I)&&z(_+F,O+I,L),0==F&&0==I||(R(_-F,O+I)&&z(_-F,O+I,L),0!=F&&(R(_+F,O-I)&&z(_+F,O-I,L),R(_-F,O-I)&&z(_-F,O-I,L))))}}}}}for(var B=[],D=0,G=Object.keys(d);D<G.length;D++)for(var Z=G[D],W=0,U=Object.keys(d[Z]);W<U.length;W++){var $=U[W];B.push(d[Z][$])}return B}},{key:"draw",value:function(t,e,n){if(t&&0!=t.length){var r=this.sigma(e,n.zf);t=this.kernelSmoothing(t,n.extGeo,e,r/e);var o,i=sf(this.styles);try{for(i.s();!(o=i.n()).done;)o.value.draw(t,e,n)}catch(t){i.e(t)}finally{i.f()}}}},{key:"getValue",value:function(){return this.value}},{key:"setValue",value:function(t){return this.value=t,this}},{key:"getSigma",value:function(){return this.sigma}},{key:"setSigma",value:function(t){return this.sigma=t,this}},{key:"getStyles",value:function(){return this.styles}},{key:"setStyles",value:function(t){return this.styles=t,this}}])&&df(e.prototype,n),r&&df(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function mf(t){return(mf="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})(t)}function wf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return xf(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return xf(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function xf(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 Sf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _f(t,e){return(_f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Of(t);if(e){var o=Of(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cf(this,n)}}function Cf(t,e){if(e&&("object"===mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Of(t){return(Of=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_f(t,e)}(i,t);var e,n,r,o=kf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.heightCol=t.heightCol,e.height=t.height,e.colorCol=t.colorCol,e.color=t.color||function(){return"#c08c59"},e.widthCol=t.widthCol,e.width=t.width||function(t,e){return.5*e},e.viewHeightFactor=5,e.shadowDirection=40.3*Math.PI/180,e.shadowFactor=.2,e.shadowColor="#00000033",e.viewSX=-.25,e.viewSY=-1.5,e.outlineCol="#FFFFFF",e.outlineWidthPix=.5,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o,i,a=this,f=n.getZf();this.heightCol&&(r=yr.getStatistics(t,(function(t){return t[a.heightCol]}),!0)),this.colorCol&&(o=yr.getStatistics(t,(function(t){return t[a.colorCol]}),!0)),this.widthCol&&(i=yr.getStatistics(t,(function(t){return t[a.widthCol]}),!0));var c=n.getCenter().x+this.viewSX*n.w*f,u=n.getCenter().y+this.viewSY*n.h*f,l=this.viewHeightFactor*(n.w+n.h)*.5*f;t.sort((function(t,e){return 1e8*(e.y-t.y)+t.x-e.x})),n.ctx.lineCap="round",n.setCanvasTransform(),n.ctx.strokeStyle=this.shadowColor;var s,h=wf(t);try{for(h.s();!(s=h.n()).done;){var d=s.value,y=this.width?this.width(d[this.widthCol],e,i,f):void 0;if(y&&!(y<0)){var p=this.height?this.height(d[this.heightCol],e,r,f):void 0;if(p&&!(p<0)){this.offset(d,e,f),n.ctx.lineWidth=y;var b=d.x+e/2,v=d.y+e/2,g=p*this.shadowFactor;n.ctx.beginPath(),n.ctx.moveTo(b,v),n.ctx.lineTo(b+g*Math.cos(this.shadowDirection),v+g*Math.sin(this.shadowDirection)),n.ctx.stroke(),n.ctx.fillStyle="gray",n.ctx.beginPath(),n.ctx.arc(b,v,.5*y,0,2*Math.PI,!1),n.ctx.fill()}}}}catch(t){h.e(t)}finally{h.f()}var m,w=wf(t);try{for(w.s();!(m=w.n()).done;){var x=m.value,S=this.color?this.color(x[this.colorCol],e,o):void 0;if(S){var _=this.width?this.width(x[this.widthCol],e,i,f):void 0;if(_&&!(_<0)){var k=this.height?this.height(x[this.heightCol],e,r,f):void 0;if(k&&!(k<0)){this.offset(x,e,f);var C=x.x+e/2,O=x.y+e/2,P=C-c,M=O-u,j=Math.atan2(M,P),A=Math.sqrt(P*P+M*M)*k/(l-k);n.ctx.strokeStyle=this.outlineCol,n.ctx.lineWidth=_+2*this.outlineWidthPix*f,n.ctx.beginPath(),n.ctx.moveTo(C,O),n.ctx.lineTo(C+A*Math.cos(j),O+A*Math.sin(j)),n.ctx.stroke(),n.ctx.strokeStyle=S,n.ctx.lineWidth=_,n.ctx.beginPath(),n.ctx.moveTo(C,O),n.ctx.lineTo(C+A*Math.cos(j),O+A*Math.sin(j)),n.ctx.stroke(),n.ctx.strokeStyle=this.outlineCol,n.ctx.lineWidth=this.outlineWidthPix*f,n.ctx.beginPath(),n.ctx.arc(C+A*Math.cos(j),O+A*Math.sin(j),.5*_,0,2*Math.PI,!1),n.ctx.stroke()}}}}}catch(t){w.e(t)}finally{w.f()}n.ctx.lineCap="butt",this.updateLegends({style:this,r:e,zf:f,sColor:o})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}},{key:"getHeight",value:function(){return this.height}},{key:"setHeight",value:function(t){return this.height=t,this}},{key:"getWidth",value:function(){return this.width}},{key:"setWidth",value:function(t){return this.width=t,this}}])&&Sf(e.prototype,n),r&&Sf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Mf(t){return(Mf="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})(t)}function jf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Af(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Af(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Af(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 Ef(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tf(t,e){return(Tf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ff(t);if(e){var o=Ff(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zf(this,n)}}function zf(t,e){if(e&&("object"===Mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ff(t){return(Ff=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var If=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tf(t,e)}(i,t);var e,n,r,o=Rf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.valueCol=t.valueCol,e.value=t.value||function(t,e,n,r,o){return 1},e.color=t.color||function(){return"#EA6BAC"},e.width=t.width||function(t,e,n,r){return e*t.value/5},e.orientation=t.orientation,e.fillColor=t.fillColor,e}return e=i,r=[{key:"getSideStatistics",value:function(t,e){if(t&&0!=t.length){var n,r=1/0,o=-1/0,i=jf(t);try{for(i.s();!(n=i.n()).done;){var a=n.value.value;e&&!a||(a<r&&(r=a),a>o&&(o=a))}}catch(t){i.e(t)}finally{i.f()}return{min:r,max:o}}}}],(n=[{key:"draw",value:function(t,e,n){var r,o=this,a=n.getZf();this.valueCol&&(r=yr.getStatistics(t,(function(t){return t[o.valueCol]}),!0));var f=[];t.sort((function(t,e){return e.x==t.x?t.y-e.y:t.x-e.x}));for(var c=t[0],u=1;u<t.length;u++){var l=t[u];c.y+e==l.y&&c.x==l.x?f.push({x:c.x,y:l.y,or:"h",value:this.value(c[this.valueCol],l[this.valueCol],e,r,a)}):(f.push({x:c.x,y:c.y+e,or:"h",value:this.value(c[this.valueCol],void 0,e,r,a)}),f.push({x:l.x,y:l.y,or:"h",value:this.value(void 0,l[this.valueCol],e,r,a)})),c=l}t.sort((function(t,e){return e.y==t.y?t.x-e.x:t.y-e.y})),c=t[0];for(var s=1;s<t.length;s++){var h=t[s];c.x+e==h.x&&c.y==h.y?f.push({x:c.x+e,y:c.y,or:"v",value:this.value(c[this.valueCol],h[this.valueCol],e,r,a)}):(f.push({x:c.x+e,y:c.y,or:"v",value:this.value(c[this.valueCol],void 0,e,r,a)}),f.push({x:h.x,y:h.y,or:"v",value:this.value(void 0,h[this.valueCol],e,r,a)})),c=h}var d=i.getSideStatistics(f,!0);if(n.setCanvasTransform(),this.fillColor){var y,p=jf(t);try{for(p.s();!(y=p.n()).done;){var b=y.value,v=this.fillColor(b);v&&"none"!=v&&(n.ctx.fillStyle=v,n.ctx.fillRect(b.x,b.y,e,e))}}catch(t){p.e(t)}finally{p.f()}}n.ctx.lineCap="butt";for(var g=e/2,m=0,w=f;m<w.length;m++){var x=w[m],S=this.color?this.color(x,e,d):void 0;if(S){var _=this.width?this.width(x,e,d,a):void 0;!_||_<0||(n.ctx.strokeStyle=S,n.ctx.lineWidth=_,n.ctx.beginPath(),90==this.orientation?(n.ctx.moveTo(x.x+g,x.y+g),"h"===x.or?n.ctx.lineTo(x.x+g,x.y-g):n.ctx.lineTo(x.x-g,x.y+g)):(n.ctx.moveTo(x.x,x.y),n.ctx.lineTo(x.x+("h"===x.or?e:0),x.y+("v"===x.or?e:0))),n.ctx.stroke())}}this.updateLegends({style:this,r:e,zf:a})}}])&&Ef(e.prototype,n),r&&Ef(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr),Nf=function t(e){function n(t,n){var r,o;return t=null==t?0:+t,n=null==n?1:+n,function(){var i;if(null!=r)i=r,r=null;else do{r=2*e()-1,i=2*e()-1,o=r*r+i*i}while(!o||o>1);return t+n*i*Math.sqrt(-2*Math.log(o)/o)}}return n.source=t,n}(Math.random);function Lf(t,e){var n=document.createElement("canvas");n.setAttribute("width",t),n.setAttribute("height",e);var r=n.getContext("webgl");if(!r)throw new Error("Unable to initialize WebGL. Your browser or machine may not support it.");return{canvas:n,gl:r}}function Bf(t){var e=t.createProgram();if(null==e)throw new Error("Cannot create webGL program");for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0,a=r;i<a.length;i++){var f=a[i];t.attachShader(e,f)}if(t.linkProgram(e),t.getProgramParameter(e,t.LINK_STATUS))return e;throw new Error(t.getProgramInfoLog(e)||"Cannot create webGL program (2)")}function Df(t,e){var n=t.createShader(e);if(null==n)throw new Error("Cannot create webGL shader");for(var r=arguments.length,o=new Array(r>2?r-2:0),i=2;i<r;i++)o[i-2]=arguments[i];if(t.shaderSource(n,o.join("\n")),t.compileShader(n),t.getShaderParameter(n,t.COMPILE_STATUS))return n;throw new Error(t.getShaderInfoLog(n)||"Cannot create webGL shader (2)")}function Gf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Zf=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.gl=e,this.sizePix=n||10,this.program=Bf(e,Df(e,e.VERTEX_SHADER,"\n attribute vec2 pos;\n uniform float sizePix;\n uniform mat3 mat;\n attribute vec4 color;\n varying vec4 vColor;\n void main() {\n gl_Position = vec4(mat * vec3(pos, 1.0), 1.0);\n gl_PointSize = sizePix;\n vColor = color;\n }\n "),Df(e,e.FRAGMENT_SHADER,"\n precision mediump float;\n varying vec4 vColor;\n void main(void) {\n vec4 vColor_ = vColor / 255.0;\n vColor_[3] = 255.0 * vColor_[3];\n gl_FragColor = vColor_;\n }")),e.useProgram(this.program),this.verticesBuffer=[],this.colorsBuffer=[]}var e,n,r;return e=t,(n=[{key:"addPointData",value:function(t,e,n){var r=Ee(n);r&&(this.verticesBuffer.push(t,e),this.colorsBuffer.push(r.r,r.g,r.b,r.opacity))}},{key:"addPointData2",value:function(t,e,n,r,o,i){this.verticesBuffer.push(t,e),this.colorsBuffer.push(n,r,o,i)}},{key:"draw",value:function(t){var e=this.gl;e.bindBuffer(e.ARRAY_BUFFER,e.createBuffer()),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.verticesBuffer),e.STATIC_DRAW);var n=e.getAttribLocation(this.program,"pos");e.vertexAttribPointer(n,2,e.FLOAT,!1,0,0),e.enableVertexAttribArray(n),e.bindBuffer(e.ARRAY_BUFFER,e.createBuffer()),e.bufferData(e.ARRAY_BUFFER,new Float32Array(this.colorsBuffer),e.STATIC_DRAW);var r=e.getAttribLocation(this.program,"color");e.vertexAttribPointer(r,4,e.FLOAT,!1,0,0),e.enableVertexAttribArray(r),e.uniform1f(e.getUniformLocation(this.program,"sizePix"),1*this.sizePix),e.uniformMatrix3fv(e.getUniformLocation(this.program,"mat"),!1,new Float32Array(t)),e.clear(e.COLOR_BUFFER_BIT),e.drawArrays(e.POINTS,0,this.verticesBuffer.length/2)}}])&&Gf(e.prototype,n),r&&Gf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Wf(t){return(Wf="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})(t)}function Uf(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return $f(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return $f(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function $f(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 Yf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Vf(t,e){return(Vf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Hf(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=qf(t);if(e){var o=qf(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Xf(this,n)}}function Xf(t,e){if(e&&("object"===Wf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function qf(t){return(qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Kf=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vf(t,e)}(i,t);var e,n,r,o=Hf(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.col=t.col,e.nb=t.nb||function(t,e,n,r){return.3*e*e/(r*r)*t/n.max},e.color=t.color||function(){return"#FF5733"},e.dotSize=t.dotSize,e.sigma=t.sigma,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();if(this.col&&(r=yr.getStatistics(t,(function(t){return t[o.col]}),!0)),r){var a=this.dotSize?this.dotSize(e,i):2*i,f=this.sigma?this.sigma(e):.4*e,c=Nf(0,f);if(function(){try{var t=document.createElement("canvas");return!(!window.WebGLRenderingContext||!t.getContext("webgl")&&!t.getContext("experimental-webgl"))}catch(t){return!1}}()){var u=Lf(n.w+"",n.h+"");if(!u)return void console.error("No webGL");var l,s,h,d,y,p,b,v=new Zf(u.gl,a/i),g=e/2,m=Uf(t);try{for(m.s();!(b=m.n()).done;){var w=b.value;if((l=this.color(w))&&"none"!==l){if(s=this.offset(w,e,i),h=this.nb(w[this.col],e,r,i),d=w.x+s.dx+g,y=w.y+s.dy+g,!(p=Ee(l)))return;for(var x=0;x<=h;x++)v.addPointData2(d+c(),y+c(),p.r,p.g,p.b,p.opacity)}}}catch(t){m.e(t)}finally{m.f()}v.draw(n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(u.canvas,0,0)}else{n.setCanvasTransform();var S,_=Uf(t);try{for(_.s();!(S=_.n()).done;){var k=S.value,C=this.color(k);if(C&&"none"!==C){n.ctx.fillStyle=C;for(var O=this.offset(k,e,i),P=this.nb(k[this.col],e,r,i),M=k.x+O.dx+e/2,j=k.y+O.dy+e/2,A=0;A<=P;A++)n.ctx.fillRect(M+c(),j+c(),a,a)}}}catch(t){_.e(t)}finally{_.f()}}this.updateLegends({style:this,r:e,zf:i})}}}])&&Yf(e.prototype,n),r&&Yf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Jf(t){return(Jf="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})(t)}function Qf(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function tc(t,e){return(tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function ec(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=rc(t);if(e){var o=rc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return nc(this,n)}}function nc(t,e){if(e&&("object"===Jf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function rc(t){return(rc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tc(t,e)}(i,t);var e,n,r,o=ec(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.size=t.size,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[o.colorCol]}),!0));var a=Lf(n.w+"",n.h+"");if(a){for(var f,c,u=this.size?this.size(e,i):e+.2*i,l=new Zf(a.gl,u/i),s=e/2,h=t.length,d=0;d<h;d++)c=t[d],(f=this.color?this.color(c[this.colorCol],e,r):void 0)&&"none"!==f&&l.addPointData(c.x+s,c.y+s,f);l.draw(n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(a.canvas,0,0),this.updateLegends({style:this,r:e,zf:i,sColor:r})}else console.error("No webGL")}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}}])&&Qf(e.prototype,n),r&&Qf(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function ic(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ac=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n,r;return e=t,r=[{key:"get",value:function(t,e){(e=e||{}).colors=e.colors||["#a9bb9e","#c9dcaa","#f0f1af","#fde89f","#f9a579","#eb444b"],e.breaks=e.breaks,e.valueStretch=e.valueStretch,e.colDark=e.colDark||"#111",e.colBright=e.colBright||"#ddd",e.widthFactor=e.widthFactor||.1;var n=function(t){if(e.breaks){for(var n=0;n<e.breaks.length;n++)if(t<e.breaks[n])return n;return e.breaks.length}if(e.valueStretch){for(var r=t,o=e.colors.length,i=0;i<o-1;i++)if(r<=(i+1)/o)return i;return o-1}return NaN};return[new oc({colorCol:t,color:function(t,r,o,i){if(0!=t||!e.valueStretch||!isNaN(e.valueStretch(t,r,o,i)))return e.colors[n(e.valueStretch?e.valueStretch(t,r,o,i):t)]},size:function(t,e){return t+.5*e}}),new If({valueCol:t,value:function(t,r,o,i,a){var f=e.valueStretch?e.valueStretch(t,o,i,a):t,c=e.valueStretch?e.valueStretch(r,o,i,a):r;return f&&!isNaN(f)||c&&!isNaN(c)?!f||isNaN(f)?n(c):!c||isNaN(c)?-n(f):n(c)-n(f):0},color:function(t,n,r,o){if(0!==t.value)return"v"===t.or?t.value>0?e.colBright:e.colDark:t.value>0?e.colDark:e.colBright},width:function(t,n,r,o){return e.widthFactor*n*Math.abs(t.value)*("v"===t.or?.5:1)}})]}}],(n=null)&&ic(e.prototype,n),r&&ic(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fc(t){return(fc="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})(t)}function cc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return uc(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return uc(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function uc(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 lc(t,e){return(lc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function sc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=dc(t);if(e){var o=dc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return hc(this,n)}}function hc(t,e){if(e&&("object"===fc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function dc(t){return(dc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function yc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function pc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bc(t,e,n){return e&&pc(t.prototype,e),n&&pc(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var vc=function(){function t(){yc(this,t)}return bc(t,null,[{key:"get",value:function(t,e){(e=e||{}).colors=e.colors||["#00852b","#afd246","#fac80a","#d67923","#bb805a","#cb4e29","#b40000","#720012"],e.breaks=e.breaks,e.valueStretch=e.valueStretch,e.colDark=e.colDark||"#333",e.colBright=e.colBright||"#aaa",e.widthFactor=e.widthFactor||.05;var n=function(t){if(e.breaks){for(var n=0;n<e.breaks.length;n++)if(t<e.breaks[n])return n;return e.breaks.length}if(e.valueStretch){for(var r=t,o=e.colors.length,i=0;i<o-1;i++)if(r<=(i+1)/o)return i;return o-1}return NaN};return[new oc({colorCol:t,color:function(t,r,o,i){if(0!=t||!e.valueStretch||!isNaN(e.valueStretch(t,r,o,i)))return e.colors[n(e.valueStretch?e.valueStretch(t,r,o,i):t)]}}),new If({valueCol:t,value:function(t,r,o,i,a){var f=e.valueStretch?e.valueStretch(t,o,i,a):t,c=e.valueStretch?e.valueStretch(r,o,i,a):r;return f&&!isNaN(f)||c&&!isNaN(c)?!f||isNaN(f)?n(c):!c||isNaN(c)?-n(f):n(c)-n(f):0},color:function(t,n,r,o){return 0===t.value?e.colDark:"v"===t.or?t.value>0?e.colBright:e.colDark:t.value>0?e.colDark:e.colBright},width:function(t,n,r,o){return 0==t.value?.75*o:e.widthFactor*n*Math.abs(t.value)*("v"===t.or?.5:1)}}),new(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&lc(t,e)}(r,t);var n=sc(r);function r(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return yc(this,r),n.call(this,t)}return bc(r,[{key:"draw",value:function(t,n,r){r.ctx.lineWidth=.6*r.getZf(),r.ctx.strokeStyle=e.colDark;var o,i=cc(t);try{for(i.s();!(o=i.n()).done;){var a=o.value;r.ctx.beginPath(),r.ctx.arc(a.x+.5*n,a.y+.5*n,.55*n*.5,Math.PI/4,-Math.PI*(3/4),!0),r.ctx.stroke()}}catch(t){i.e(t)}finally{i.f()}r.ctx.strokeStyle=e.colBright;var f,c=cc(t);try{for(c.s();!(f=c.n()).done;){var u=f.value;r.ctx.beginPath(),r.ctx.arc(u.x+.5*n,u.y+.5*n,.55*n*.5,Math.PI/4,-Math.PI*(3/4),!1),r.ctx.stroke()}}catch(t){c.e(t)}finally{c.f()}}}]),r}(yr))]}}]),t}();function gc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function mc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var wc=function(){function t(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;gc(this,t),this.gl=e;var i=Df(e,e.VERTEX_SHADER,"\n attribute vec2 pos;\n uniform float sizePix;\n uniform mat3 mat;\n\n attribute float t;\n varying float vt;\n\n void main() {\n gl_Position = vec4(mat * vec3(pos, 1.0), 1.0);\n gl_PointSize = sizePix;\n vt = t;\n }\n "),a="\n precision mediump float;\n varying float vt;\n uniform float deformationFactor;"+function(){for(var t=[],e=0;e<n.length;e++)t.push("uniform vec4 c"+e+";");return t.join("")}()+"void main(void) {\n float t = pow(vt, deformationFactor);";2==n.length?a+="\n vec4 cI=c0;\n vec4 cF=c1;":3==n.length?a+="\n vec4 cI;\n vec4 cF;\n if(t<0.5) { cI=c0; cF=c1; t=t*2.0; }\n else { cI=c1; cF=c2; t=(t-0.5)*2.0; }":4==n.length?a+="\n vec4 cI;\n vec4 cF;\n if(t<1.0/3.0) { cI=c0; cF=c1; t=t*3.0; }\n else if(t<2.0/3.0) { cI=c1; cF=c2; t=(t-1.0/3.0)*3.0; }\n else { cI=c2; cF=c3; t=(t-2.0/3.0)*3.0; }":5==n.length&&(a+="\n vec4 cI;\n vec4 cF;\n if(t<0.25) { cI=c0; cF=c1; t=t*4.0; }\n else if(t<0.5) { cI=c1; cF=c2; t=(t-0.25)*4.0; }\n else if(t<0.75) { cI=c2; cF=c3; t=(t-0.5)*4.0; }\n else { cI=c3; cF=c4; t=(t-0.75)*4.0; }"),1==n.length?a+="gl_FragColor = vec4(c0[0], c0[1], c0[2], c0[3]);}":n.length<=5&&n.length>1?a+="gl_FragColor = mix(cI, cF, t);}":a+="gl_FragColor = vec4(0.5, 0.5, 0.5, 1.0);}";var f=Df(e,e.FRAGMENT_SHADER,a);this.program=Bf(e,i,f),e.useProgram(this.program),e.uniform1f(e.getUniformLocation(this.program,"sizePix"),1*o),e.uniform1f(e.getUniformLocation(this.program,"deformationFactor"),1*r);for(var c=0;c<n.length;c++){var u=Ee(n[c]);e.uniform4fv(e.getUniformLocation(this.program,"c"+c),[+u.r/255,+u.g/255,+u.b/255,+u.opacity])}}var e,n,r;return e=t,(n=[{key:"draw",value:function(t,e,n){var r=this.gl,o=this.program;r.bindBuffer(r.ARRAY_BUFFER,r.createBuffer()),r.bufferData(r.ARRAY_BUFFER,new Float32Array(t),r.STATIC_DRAW);var i=r.getAttribLocation(o,"pos");r.vertexAttribPointer(i,2,r.FLOAT,!1,0,0),r.enableVertexAttribArray(i),r.bindBuffer(r.ARRAY_BUFFER,r.createBuffer()),r.bufferData(r.ARRAY_BUFFER,new Float32Array(e),r.STATIC_DRAW);var a=r.getAttribLocation(o,"t");r.vertexAttribPointer(a,1,r.FLOAT,!1,0,0),r.enableVertexAttribArray(a),r.uniformMatrix3fv(r.getUniformLocation(o,"mat"),!1,new Float32Array(n)),r.clear(r.COLOR_BUFFER_BIT),r.drawArrays(r.POINTS,0,t.length/2)}}])&&mc(e.prototype,n),r&&mc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function xc(t){return(xc="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})(t)}function Sc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _c(t,e){return(_c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function kc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Oc(t);if(e){var o=Oc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Cc(this,n)}}function Cc(t,e){if(e&&("object"===xc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Oc(t){return(Oc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Pc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_c(t,e)}(i,t);var e,n,r,o=kc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.tFun=t.tFun||function(t,e,n){return t/n.max},e.deformationFactor=t.deformationFactor||1,e.colors=t.colors||["rgb(158, 1, 66)","rgb(248, 142, 83)","rgb(251, 248, 176)","rgb(137, 207, 165)","rgb(94, 79, 162)"].reverse(),t.color&&(e.colors=[t.color(0),t.color(.25),t.color(.5),t.color(.75),t.color(1)]),e.size=t.size,e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r=this,o=n.getZf(),i=yr.getStatistics(t,(function(t){return t[r.colorCol]}),!0);if(i){var a=Lf(n.w+"",n.h+"");if(a){for(var f,c=e/2,u=t.length,l=[],s=[],h=0;h<u;h++){f=t[h];var d=this.tFun(f[this.colorCol],e,i);null!=d&&null!=d&&(l.push(f.x+c,f.y+c),s.push(d))}var y=this.size?this.size(e,o):e+.2*o;new wc(a.gl,this.colors,this.deformationFactor,y/o).draw(l,s,n.getWebGLTransform()),n.initCanvasTransform(),n.ctx.drawImage(a.canvas,0,0),this.updateLegends({style:this,r:e,zf:o,sColor:i})}else console.error("No webGL")}}}])&&Sc(e.prototype,n),r&&Sc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Mc(t){return(Mc="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})(t)}function jc(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return Ac(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ac(t,e)}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var r=0,o=function(){};return{s:o,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:o}}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 i,a=!0,f=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){f=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(f)throw i}}}}function Ac(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 Ec(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Tc(t,e){return(Tc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Rc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fc(t);if(e){var o=Fc(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return zc(this,n)}}function zc(t,e){if(e&&("object"===Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Fc(t){return(Fc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ic=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tc(t,e)}(i,t);var e,n,r,o=Rc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorCol=t.colorCol,e.color=t.color||function(){return"#EA6BAC"},e.mosaicFactor=t.mosaicFactor||.15,e.shadowFactor=t.shadowFactor||.2,e.shadowColor=t.shadowColor||"#555",e}return e=i,(n=[{key:"draw",value:function(t,e,n){var r,o=this,i=n.getZf();this.colorCol&&(r=yr.getStatistics(t,(function(t){return t[o.colorCol]}),!0)),n.ctx.strokeStyle=this.shadowColor,n.ctx.lineWidth=this.shadowFactor*e,n.ctx.lineJoin="round",n.ctx.lineCap="butt";var a=e*this.mosaicFactor,f=function(){return{x:Math.random()*a,y:Math.random()*a}};n.setCanvasTransform();var c,u=jc(t);try{for(u.s();!(c=u.n()).done;){var l=c.value,s=this.color?this.color(l[this.colorCol],e,r):void 0;if(s&&"none"!==s){n.ctx.fillStyle=s;var h=this.offset(l,e,i),d=f(),y=f(),p=f(),b=f();n.ctx.beginPath(),n.ctx.moveTo(l.x+h.dx+d.x,l.y+h.dy+d.y),n.ctx.lineTo(l.x+h.dx+e-p.x,l.y+h.dy+p.y),n.ctx.lineTo(l.x+h.dx+e-b.x,l.y+h.dy+e-b.y),n.ctx.stroke(),n.ctx.beginPath(),n.ctx.moveTo(l.x+h.dx+d.x,l.y+h.dy+d.y),n.ctx.lineTo(l.x+h.dx+e-p.x,l.y+h.dy+p.y),n.ctx.lineTo(l.x+h.dx+e-b.x,l.y+h.dy+e-b.y),n.ctx.lineTo(l.x+h.dx+y.x,l.y+h.dy+e-y.y),n.ctx.fill()}}}catch(t){u.e(t)}finally{u.f()}this.updateLegends({style:this,r:e,zf:i,sColor:r})}},{key:"getColor",value:function(){return this.color}},{key:"setColor",value:function(t){return this.color=t,this}}])&&Ec(e.prototype,n),r&&Ec(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(yr);function Nc(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)]}var Lc=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Bc(t){if(!(e=Lc.exec(t)))throw new Error("invalid format: "+t);var e;return new Dc({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 Dc(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+""}Bc.prototype=Dc.prototype,Dc.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 Gc,Zc,Wc,Uc=function(t,e){var n=Nc(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")},$c={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Uc(100*t,e),r:Uc,s:function(t,e){var n=Nc(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(Gc=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,a=r.length;return i===a?r:i>a?r+new Array(i-a+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+Nc(t,Math.max(0,e+i-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)},Yc=function(t){return t},Vc=Array.prototype.map,Hc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function Xc(t){return(Xc="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})(t)}function qc(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Kc(t,e){return(Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function Jc(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tu(t);if(e){var o=tu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Qc(this,n)}}function Qc(t,e){if(e&&("object"===Xc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function tu(t){return(tu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}Zc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Yc:(e=Vc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var o=t.length,i=[],a=0,f=e[0],c=0;o>0&&f>0&&(c+f+1>r&&(f=Math.max(1,r-c)),i.push(t.substring(o-=f,o+f)),!((c+=f+1)>r));)f=e[a=(a+1)%e.length];return i.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",f=void 0===t.numerals?Yc:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(Vc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function s(t){var e=(t=Bc(t)).fill,n=t.align,s=t.sign,h=t.symbol,d=t.zero,y=t.width,p=t.comma,b=t.precision,v=t.trim,g=t.type;"n"===g?(p=!0,g="g"):$c[g]||(void 0===b&&(b=12),v=!0,g="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var m="$"===h?o:"#"===h&&/[boxX]/.test(g)?"0"+g.toLowerCase():"",w="$"===h?i:/[%p]/.test(g)?c:"",x=$c[g],S=/[defgprs%]/.test(g);function _(t){var o,i,c,h=m,_=w;if("c"===g)_=x(t)+_,t="";else{var k=(t=+t)<0||1/t<0;if(t=isNaN(t)?l:x(Math.abs(t),b),v&&(t=function(t){t:for(var e,n=t.length,r=1,o=-1;r<n;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;default:if(!+t[r])break t;o>0&&(o=0)}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),k&&0==+t&&"+"!==s&&(k=!1),h=(k?"("===s?s:u:"-"===s||"("===s?"":s)+h,_=("s"===g?Hc[8+Gc/3]:"")+_+(k&&"("===s?")":""),S)for(o=-1,i=t.length;++o<i;)if(48>(c=t.charCodeAt(o))||c>57){_=(46===c?a+t.slice(o+1):t.slice(o))+_,t=t.slice(0,o);break}}p&&!d&&(t=r(t,1/0));var C=h.length+t.length+_.length,O=C<y?new Array(y-C+1).join(e):"";switch(p&&d&&(t=r(O+t,O.length?y-_.length:1/0),O=""),n){case"<":t=h+t+_+O;break;case"=":t=h+O+t+_;break;case"^":t=O.slice(0,C=O.length>>1)+h+t+_+O.slice(C);break;default:t=O+h+t+_}return f(t)}return b=void 0===b?6:/[gprs]/.test(g)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),_.toString=function(){return t+""},_}return{format:s,formatPrefix:function(t,e){var n,r=s(((t=Bc(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=Nc(Math.abs(n)))?n[1]:NaN)/3)))),i=Math.pow(10,-o),a=Hc[8+o/3];return function(t){return r(i*t)+a}}}}({thousands:",",grouping:[3],currency:["$",""]}),Wc=Zc.format,Zc.formatPrefix;var eu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kc(t,e)}(i,t);var e,n,r,o=Jc(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colorRamp=t.colorRamp,e.fun=t.fun,e.title=t.title,e.tickSize=t.tickSize||6,e.width=t.width||300,e.height=t.height||15,e.margin=t.margin||5,e.ticks=t.ticks||Math.floor(e.width/50),e.tickFormat=t.tickFormat||".0f",e.tickUnit=t.tickUnit,e.fontSize=t.fontSize||"0.8em",e.invert=t.invert,e}return e=i,(n=[{key:"update",value:function(t){if(t.sColor){this.div.selectAll("*").remove();var e=this.width+2*this.margin,n=this.height+3*this.margin+12+this.tickSize+10,r=this.div.append("svg").attr("width",e).attr("height",n);r.append("text").attr("x",this.margin).attr("y",this.margin).style("font-size","0.8em").style("font-weight","bold").style("alignment-baseline","top").style("dominant-baseline","hanging").style("pointer-events","none").text(this.title);for(var o=r.append("g").attr("transform","translate("+this.margin+" "+(2*this.margin+12)+")"),i=this.width,a=this.height,f=0;f<i;f+=5){var c=f/(i-1);this.invert&&(c=1-c),o.append("rect").attr("x",f).attr("y",0).attr("width",5).attr("height",a).style("fill",this.colorRamp(c))}for(var u=0;u<this.ticks;u++){var l=u/(this.ticks-1);o.append("line").attr("x1",i*l).attr("y1",0).attr("x2",i*l).attr("y2",a+this.tickSize).style("stroke","black"),o.append("text").attr("id","ticklabel_"+u).attr("x",i*l).attr("y",a+this.tickSize+2).style("font-size",this.fontSize).style("text-anchor",0==u?"start":u==this.ticks-1?"end":"middle").style("alignment-baseline","top").style("dominant-baseline","hanging").style("pointer-events","none")}for(var s=this.tickFormat&&"text"!=this.tickFormat?Wc(this.tickFormat):function(t){return t},h=0;h<this.ticks;h++){var d=h/(this.ticks-1),y=this.fun(d,t.r,t.sColor),p=(y?s(y):"0")+(this.tickUnit?this.tickUnit:"");this.div.select("#ticklabel_"+h).text(p)}}}}])&&qc(e.prototype,n),r&&qc(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function nu(t){return(nu="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})(t)}function ru(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function ou(t,e){return(ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function iu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fu(t);if(e){var o=fu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return au(this,n)}}function au(t,e){if(e&&("object"===nu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function fu(t){return(fu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ou(t,e)}(i,t);var e,n,r,o=iu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.colCat=t.colCat||[["gray","-"]],e.shape=t.shape||"circle",e.dimension=t.dimension||{r:8},e.strokeColor=t.strokeColor||"gray",e.strokeWidth=t.strokeWidth||1,e.title=t.title,e.titleFontSize=t.titleFontSize||"0.8em",e.titleFontWeight=t.titleFontWeight||"bold",e.labelFontSize=t.labelFontSize||"0.8em",e}return e=i,(n=[{key:"update",value:function(t){this.div.selectAll("*").remove(),this.title&&this.div.append("div").style("font-size",this.titleFontSize).style("font-weight",this.titleFontWeight).style("margin-bottom","7px").text(this.title);var e=this.colCat.length;if(0!=e)for(var n=0;n<e;n++){var r=this.colCat[n],o=this.div.append("div"),i=this.strokeWidth;if("square"===this.shape)o.append("svg").attr("width",(this.dimension.w||20)+2*i).attr("height",(this.dimension.h||15)+2*i).append("rect").attr("x",i).attr("y",i).attr("width",(this.dimension.w||20)+2*i).attr("height",(this.dimension.h||15)+2*i).style("fill",r[0]).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth);else{if("circle"!==this.shape)throw new Error("Unexpected shape:"+this.shape);var a=this.dimension.r||8;o.append("svg").attr("width",2*a+2*i).attr("height",2*a+2*i).append("circle").attr("cx",a+i).attr("cy",a+i).attr("r",a).style("fill",r[0]).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth)}o.append("div").style("float","right").style("padding-left","5px").style("font-size",this.labelFontSize).text(r[1])}}}])&&ru(e.prototype,n),r&&ru(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function uu(t){return(uu="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})(t)}function lu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function su(t,e){return(su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function hu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=yu(t);if(e){var o=yu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return du(this,n)}}function du(t,e){if(e&&("object"===uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function yu(t){return(yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var pu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&su(t,e)}(i,t);var e,n,r,o=hu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.exaggerationFactor=t.exaggerationFactor||.8,e.shape=t.shape||"circle",e.fillColor=t.fillColor||"none",e.strokeColor=t.strokeColor||"gray",e.strokeWidth=t.strokeWidth||1,e.labelFontSize=t.labelFontSize||"0.8em",e.labelUnitText=t.labelUnitText||"",e.labelFormat=t.labelFormat||",.2r",e}return e=i,(n=[{key:"update",value:function(t){if(t.sSize){this.div.selectAll("*").remove();var e=t.sSize.max*this.exaggerationFactor,n=Math.log10(e);n=Math.floor(n);var r=Math.pow(10,n);8*r<=e?r*=8:6*r<=e?r*=6:5*r<=e?r*=5:4*r<=e?r*=4:2.5*r<=e?r*=2.5:2*r<=e&&(r*=2);var o=t.style.getSize()(r,t.r,t.sSize,t.zf)/t.zf,i=this.div.append("svg").attr("width",o+this.strokeWidth+2).attr("height",o+this.strokeWidth+2).style("","inline-block");if("square"===this.shape)i.append("rect").attr("x",0).attr("y",0).attr("width",o).attr("height",o).style("fill",this.fillColor).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth);else if("circle"===this.shape){var a=.5*(o+this.strokeWidth);i.append("circle").attr("cx",a+1).attr("cy",a+1).attr("r",a).style("fill",this.fillColor).style("stroke",this.strokeColor).style("stroke-width",this.strokeWidth)}else if("donut"!==this.shape)throw new Error("Unexpected shape:"+this.shape);var f=Wc(this.labelFormat)(r);this.div.append("div").style("display","inline-block").style("left","4px").style("font-size",this.labelFontSize).text(f+(this.labelUnitText?" ":"")+this.labelUnitText)}}}])&&lu(e.prototype,n),r&&lu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function bu(t){return(bu="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})(t)}function vu(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function gu(t,e){return(gu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mu(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xu(t);if(e){var o=xu(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return wu(this,n)}}function wu(t,e){if(e&&("object"===bu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xu(t){return(xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Su=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gu(t,e)}(i,t);var e,n,r,o=mu(i);function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),e=o.call(this,t),t=t||{},e.exaggerationFactor=t.exaggerationFactor||.5,e.color=t.color||"gray",e.orientation=t.orientation||0,e.labelFontSize=t.labelFontSize||"0.8em",e.labelUnitText=t.labelUnitText||"",e.div.style("text-align","center"),e}return e=i,(n=[{key:"update",value:function(t){if(t.sWidth){this.div.selectAll("*").remove();var e=t.sWidth.max*this.exaggerationFactor,n=Math.log10(e);n=Math.floor(n);var r=Math.pow(10,n);8*r<=e?r*=8:6*r<=e?r*=6:5*r<=e?r*=5:4*r<=e?r*=4:2.5*r<=e?r*=2.5:2*r<=e&&(r*=2);var o=t.style.getWidth()(r,t.r,t.sWidth,t.zf)/t.zf,i=1*t.r/t.zf;this.div.append("svg").attr("width",i).attr("height",o).style("","inline-block").append("line").attr("x1",0).attr("y1",o/2).attr("x2",i).attr("y2",o/2).style("stroke",this.color).style("stroke-width",o);var a=Wc(",.2r")(r);this.div.append("div").style("font-size",this.labelFontSize).style("","inline-block").text(a+(this.labelUnitText?" ":"")+this.labelUnitText)}}}])&&vu(e.prototype,n),r&&vu(e,r),Object.defineProperty(e,"prototype",{writable:!1}),i}(lr);function _u(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1.01,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0;(n=n||1.01)<1&&console.error("Unexpected value for factor: "+n+". Set to default value 1.01");var a=t.getZoomFactor();if(e!=a){e<a&&(n=1/n);var f=a,c=setInterval((function(){f=t.getZoomFactor()*n,e>a&&f>e&&(f=e),e<a&&f<e&&(f=e),t.setZoomFactor(f),t.cg.redraw(),f==e&&(clearInterval(c),o&&setTimeout((function(){o()}),i))}),r);return c}}function ku(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:NaN,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:NaN,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:NaN,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:5,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,a=arguments.length>6?arguments[6]:void 0,f=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,c=t.getZoomFactor(),u=t.getGeoCenter();e=isNaN(e)?u.x:e,n=isNaN(n)?u.y:n,r=isNaN(r)?c:r;var l=e-u.x,s=n-u.y,h=Math.hypot(l,s),d=o*c*l/h,y=o*c*s/h,p=r/c,b=h/(o*c),v=h>0?Math.pow(p,1/b):Math.pow(p,.1),g=setInterval((function(){if(h>0){var o=t.getGeoCenter(),i=o.x+d,c=o.y+y;i<e&&e<o.x&&(i=e),o.x<e&&e<i&&(i=e),c<n&&n<o.y&&(c=n),o.y<n&&n<c&&(c=n),t.setGeoCenter({x:i,y:c}),i==e&&c==n&&(h=0)}if(1!=p){var u=t.getZoomFactor(),l=v*u;l<r&&r<u&&(l=r),u<r&&r<l&&(l=r),t.setZoomFactor(l),l==r&&(p=1)}t.cg.redraw(),0==h&&1==p&&(console.log("OK !"),clearInterval(g),a&&setTimeout((function(){a()}),f))}),i);return g}var Cu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return Math.pow(t,e)},Ou=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 1-Math.pow(1-t,1/e)},Pu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 0==e?t:(Math.exp(t*e)-1)/(Math.exp(e)-1)},Mu=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3;return 0==e?t:1-1/e*Math.log(Math.exp(e)*(1-t)+t)},ju=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.8;if(0==e)return t;if(1==e)return Math.sqrt(2*t-t*t);var n=e/(1-e);return Math.sqrt(1/(n*n)+2*t/n+2*t-t*t)-1/n},Au=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.8;return 1-ju(1-t,e)},Eu=1e-6,Tu=Math.PI,Ru=Tu/2,zu=Tu/4,Fu=2*Tu,Iu=180/Tu,Nu=Tu/180,Lu=Math.abs,Bu=Math.atan,Du=Math.atan2,Gu=Math.cos,Zu=(Math.ceil,Math.exp,Math.floor,Math.hypot,Math.log,Math.pow,Math.sin),Wu=Math.sign||function(t){return t>0?1:t<0?-1:0},Uu=Math.sqrt;Math.tan;function $u(t){return t>1?Ru:t<-1?-Ru:Math.asin(t)}function Yu(){}var Vu=function(){var t,e=[];return{point:function(e,n,r){t.push([e,n,r])},lineStart:function(){e.push(t=[])},lineEnd:Yu,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},Hu=function(t,e){return Lu(t[0]-e[0])<Eu&&Lu(t[1]-e[1])<Eu};function Xu(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var qu=function(t,e,n,r,o){var i,a,f=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],a=t[e];if(Hu(r,a)){if(!r[2]&&!a[2]){for(o.lineStart(),i=0;i<e;++i)o.point((r=t[i])[0],r[1]);return void o.lineEnd()}a[0]+=2*Eu}f.push(n=new Xu(r,t,null,!0)),c.push(n.o=new Xu(r,null,n,!1)),f.push(n=new Xu(a,t,null,!1)),c.push(n.o=new Xu(a,null,n,!0))}})),f.length){for(c.sort(e),Ku(f),Ku(c),i=0,a=c.length;i<a;++i)c[i].e=n=!n;for(var u,l,s=f[0];;){for(var h=s,d=!0;h.v;)if((h=h.n)===s)return;u=h.z,o.lineStart();do{if(h.v=h.o.v=!0,h.e){if(d)for(i=0,a=u.length;i<a;++i)o.point((l=u[i])[0],l[1]);else r(h.x,h.n.x,1,o);h=h.n}else{if(d)for(u=h.p.z,i=u.length-1;i>=0;--i)o.point((l=u[i])[0],l[1]);else r(h.x,h.p.x,-1,o);h=h.p}u=(h=h.o).z,d=!d}while(!h.v);o.lineEnd()}}};function Ku(t){if(e=t.length){for(var e,n,r=0,o=t[0];++r<e;)o.n=n=t[r],n.p=o,o=n;o.n=n=t[0],n.p=o}}class Ju{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let n=0;for(let r=0;r<this._n&&r<32;r++){const o=e[r],i=t+o,a=Math.abs(t)<Math.abs(o)?t-(i-o):o-(i-t);a&&(e[n++]=a),t=i}return e[n]=t,this._n=n+1,this}valueOf(){const t=this._partials;let e,n,r,o=this._n,i=0;if(o>0){for(i=t[--o];o>0&&(e=i,n=t[--o],i=e+n,r=n-(i-e),!r););o>0&&(r<0&&t[o-1]<0||r>0&&t[o-1]>0)&&(n=2*r,e=i+n,n==e-i&&(i=e))}return i}}function Qu(t){return[Du(t[1],t[0]),$u(t[2])]}function tl(t){var e=t[0],n=t[1],r=Gu(n);return[r*Gu(e),r*Zu(e),Zu(n)]}function el(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function nl(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 rl(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ol(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function il(t){var e=Uu(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}function al(t){return Lu(t[0])<=Tu?t[0]:Wu(t[0])*((Lu(t[0])+Tu)%Fu-Tu)}function fl(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}var cl=function(t,e,n,r){return function(o){var i,a,f,c=e(o),u=Vu(),l=e(u),s=!1,h={point:d,lineStart:p,lineEnd:b,polygonStart:function(){h.point=v,h.lineStart=g,h.lineEnd=m,a=[],i=[]},polygonEnd:function(){h.point=d,h.lineStart=p,h.lineEnd=b,a=fl(a);var t=function(t,e){var n=al(e),r=e[1],o=Zu(r),i=[Zu(n),-Gu(n),0],a=0,f=0,c=new Ju;1===o?r=Ru+Eu:-1===o&&(r=-Ru-Eu);for(var u=0,l=t.length;u<l;++u)if(h=(s=t[u]).length)for(var s,h,d=s[h-1],y=al(d),p=d[1]/2+zu,b=Zu(p),v=Gu(p),g=0;g<h;++g,y=w,b=S,v=_,d=m){var m=s[g],w=al(m),x=m[1]/2+zu,S=Zu(x),_=Gu(x),k=w-y,C=k>=0?1:-1,O=C*k,P=O>Tu,M=b*S;if(c.add(Du(M*C*Zu(O),v*_+M*Gu(O))),a+=P?k+C*Fu:k,P^y>=n^w>=n){var j=nl(tl(d),tl(m));il(j);var A=nl(i,j);il(A);var E=(P^k>=0?-1:1)*$u(A[2]);(r>E||r===E&&(j[0]||j[1]))&&(f+=P^k>=0?1:-1)}}return(a<-Eu||a<Eu&&c<-1e-12)^1&f}(i,r);a.length?(s||(o.polygonStart(),s=!0),qu(a,ll,t,n,o)):t&&(s||(o.polygonStart(),s=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),s&&(o.polygonEnd(),s=!1),a=i=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function d(e,n){t(e,n)&&o.point(e,n)}function y(t,e){c.point(t,e)}function p(){h.point=y,c.lineStart()}function b(){h.point=d,c.lineEnd()}function v(t,e){f.push([t,e]),l.point(t,e)}function g(){l.lineStart(),f=[]}function m(){v(f[0][0],f[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),h=u.result(),d=h.length;if(f.pop(),i.push(f),f=null,d)if(1&c){if((e=(n=h[0]).length-1)>0){for(s||(o.polygonStart(),s=!0),o.lineStart(),t=0;t<e;++t)o.point((r=n[t])[0],r[1]);o.lineEnd()}}else d>1&&2&c&&h.push(h.pop().concat(h.shift())),a.push(h.filter(ul))}return h}};function ul(t){return t.length>1}function ll(t,e){return((t=t.x)[0]<0?t[1]-Ru-Eu:Ru-t[1])-((e=e.x)[0]<0?e[1]-Ru-Eu:Ru-e[1])}var sl=cl((function(){return!0}),(function(t){var e,n=NaN,r=NaN,o=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(i,a){var f=i>0?Tu:-Tu,c=Lu(i-n);Lu(c-Tu)<Eu?(t.point(n,r=(r+a)/2>0?Ru:-Ru),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(f,r),t.point(i,r),e=0):o!==f&&c>=Tu&&(Lu(n-o)<Eu&&(n-=o*Eu),Lu(i-f)<Eu&&(i-=f*Eu),r=function(t,e,n,r){var o,i,a=Zu(t-n);return Lu(a)>Eu?Bu((Zu(e)*(i=Gu(r))*Zu(n)-Zu(r)*(o=Gu(e))*Zu(t))/(o*i*a)):(e+r)/2}(n,r,i,a),t.point(o,r),t.lineEnd(),t.lineStart(),t.point(f,r),e=0),t.point(n=i,r=a),o=f},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var o;if(null==t)o=n*Ru,r.point(-Tu,o),r.point(0,o),r.point(Tu,o),r.point(Tu,0),r.point(Tu,-o),r.point(0,-o),r.point(-Tu,-o),r.point(-Tu,0),r.point(-Tu,o);else if(Lu(t[0]-e[0])>Eu){var i=t[0]<e[0]?Tu:-Tu;o=n*i/2,r.point(-i,o),r.point(0,o),r.point(i,o)}else r.point(e[0],e[1])}),[-Tu,-Ru]);var hl=function(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 dl(t,e){return[Lu(t)>Tu?t+Math.round(-t/Fu)*Fu:t,e]}function yl(t,e,n){return(t%=Fu)?e||n?hl(bl(t),vl(e,n)):bl(t):e||n?vl(e,n):dl}function pl(t){return function(e,n){return[(e+=t)>Tu?e-Fu:e<-Tu?e+Fu:e,n]}}function bl(t){var e=pl(t);return e.invert=pl(-t),e}function vl(t,e){var n=Gu(t),r=Zu(t),o=Gu(e),i=Zu(e);function a(t,e){var a=Gu(e),f=Gu(t)*a,c=Zu(t)*a,u=Zu(e),l=u*n+f*r;return[Du(c*o-l*i,f*n-u*r),$u(l*o+c*i)]}return a.invert=function(t,e){var a=Gu(e),f=Gu(t)*a,c=Zu(t)*a,u=Zu(e),l=u*o-c*i;return[Du(c*o+u*i,f*n+l*r),$u(l*n-f*r)]},a}dl.invert=dl;function gl(t,e,n,r,o,i){if(n){var a=Gu(e),f=Zu(e),c=r*n;null==o?(o=e+r*Fu,i=e-c/2):(o=ml(a,o),i=ml(a,i),(r>0?o<i:o>i)&&(o+=r*Fu));for(var u,l=o;r>0?l>i:l<i;l-=c)u=Qu([a,-f*Gu(l),-f*Zu(l)]),t.point(u[0],u[1])}}function ml(t,e){(e=tl(e))[0]-=t,il(e);var n,r=(n=-e[1])>1?0:n<-1?Tu:Math.acos(n);return((-e[2]<0?-r:r)+Fu-Eu)%Fu}var wl=function(t){var e=Gu(t),n=6*Nu,r=e>0,o=Lu(e)>Eu;function i(t,n){return Gu(t)*Gu(n)>e}function a(t,n,r){var o=[1,0,0],i=nl(tl(t),tl(n)),a=el(i,i),f=i[0],c=a-f*f;if(!c)return!r&&t;var u=e*a/c,l=-e*f/c,s=nl(o,i),h=ol(o,u);rl(h,ol(i,l));var d=s,y=el(h,d),p=el(d,d),b=y*y-p*(el(h,h)-1);if(!(b<0)){var v=Uu(b),g=ol(d,(-y-v)/p);if(rl(g,h),g=Qu(g),!r)return g;var m,w=t[0],x=n[0],S=t[1],_=n[1];x<w&&(m=w,w=x,x=m);var k=x-w,C=Lu(k-Tu)<Eu;if(!C&&_<S&&(m=S,S=_,_=m),C||k<Eu?C?S+_>0^g[1]<(Lu(g[0]-w)<Eu?S:_):S<=g[1]&&g[1]<=_:k>Tu^(w<=g[0]&&g[0]<=x)){var O=ol(d,(-y+v)/p);return rl(O,h),[g,Qu(O)]}}}function f(e,n){var o=r?t:Tu-t,i=0;return e<-o?i|=1:e>o&&(i|=2),n<-o?i|=4:n>o&&(i|=8),i}return cl(i,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(s,h){var d,y=[s,h],p=i(s,h),b=r?p?0:f(s,h):p?f(s+(s<0?Tu:-Tu),h):0;if(!e&&(u=c=p)&&t.lineStart(),p!==c&&(!(d=a(e,y))||Hu(e,d)||Hu(y,d))&&(y[2]=1),p!==c)l=0,p?(t.lineStart(),d=a(y,e),t.point(d[0],d[1])):(d=a(e,y),t.point(d[0],d[1],2),t.lineEnd()),e=d;else if(o&&e&&r^p){var v;b&n||!(v=a(y,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1],3)))}!p||e&&Hu(e,y)||t.point(y[0],y[1]),e=y,c=p,n=b},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,o,i){gl(i,t,n,o,e,r)}),r?[0,-t]:[-Tu,t-Tu])};function xl(t,e,n,r){function o(o,i){return t<=o&&o<=n&&e<=i&&i<=r}function i(o,i,f,u){var l=0,s=0;if(null==o||(l=a(o,f))!==(s=a(i,f))||c(o,i)<0^f>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+f+4)%4)!==s);else u.point(i[0],i[1])}function a(r,o){return Lu(r[0]-t)<Eu?o>0?0:3:Lu(r[0]-n)<Eu?o>0?2:1:Lu(r[1]-e)<Eu?o>0?1:0:o>0?3:2}function f(t,e){return c(t.x,e.x)}function c(t,e){var n=a(t,1),r=a(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(a){var c,u,l,s,h,d,y,p,b,v,g,m=a,w=Vu(),x={point:S,lineStart:function(){x.point=_,u&&u.push(l=[]);v=!0,b=!1,y=p=NaN},lineEnd:function(){c&&(_(s,h),d&&b&&w.rejoin(),c.push(w.result()));x.point=S,b&&m.lineEnd()},polygonStart:function(){m=w,c=[],u=[],g=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,o=u.length;n<o;++n)for(var i,a,f=u[n],c=1,l=f.length,s=f[0],h=s[0],d=s[1];c<l;++c)i=h,a=d,s=f[c],h=s[0],d=s[1],a<=r?d>r&&(h-i)*(r-a)>(d-a)*(t-i)&&++e:d<=r&&(h-i)*(r-a)<(d-a)*(t-i)&&--e;return e}(),n=g&&e,o=(c=fl(c)).length;(n||o)&&(a.polygonStart(),n&&(a.lineStart(),i(null,null,1,a),a.lineEnd()),o&&qu(c,f,e,i,a),a.polygonEnd());m=a,c=u=l=null}};function S(t,e){o(t,e)&&m.point(t,e)}function _(i,a){var f=o(i,a);if(u&&l.push([i,a]),v)s=i,h=a,d=f,v=!1,f&&(m.lineStart(),m.point(i,a));else if(f&&b)m.point(i,a);else{var c=[y=Math.max(-1e9,Math.min(1e9,y)),p=Math.max(-1e9,Math.min(1e9,p))],w=[i=Math.max(-1e9,Math.min(1e9,i)),a=Math.max(-1e9,Math.min(1e9,a))];!function(t,e,n,r,o,i){var a,f=t[0],c=t[1],u=0,l=1,s=e[0]-f,h=e[1]-c;if(a=n-f,s||!(a>0)){if(a/=s,s<0){if(a<u)return;a<l&&(l=a)}else if(s>0){if(a>l)return;a>u&&(u=a)}if(a=o-f,s||!(a<0)){if(a/=s,s<0){if(a>l)return;a>u&&(u=a)}else if(s>0){if(a<u)return;a<l&&(l=a)}if(a=r-c,h||!(a>0)){if(a/=h,h<0){if(a<u)return;a<l&&(l=a)}else if(h>0){if(a>l)return;a>u&&(u=a)}if(a=i-c,h||!(a<0)){if(a/=h,h<0){if(a>l)return;a>u&&(u=a)}else if(h>0){if(a<u)return;a<l&&(l=a)}return u>0&&(t[0]=f+u*s,t[1]=c+u*h),l<1&&(e[0]=f+l*s,e[1]=c+l*h),!0}}}}}(c,w,t,e,n,r)?f&&(m.lineStart(),m.point(i,a),g=!1):(b||(m.lineStart(),m.point(c[0],c[1])),m.point(w[0],w[1]),f||m.lineEnd(),g=!1)}y=i,p=a,b=f}return x}}var Sl=t=>t;function _l(t){return function(e){var n=new kl;for(var r in t)n[r]=t[r];return n.stream=e,n}}function kl(){}function Cl(t,e){t&&Pl.hasOwnProperty(t.type)&&Pl[t.type](t,e)}kl.prototype={constructor:kl,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 Ol={Feature:function(t,e){Cl(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,o=n.length;++r<o;)Cl(n[r].geometry,e)}},Pl={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,o=n.length;++r<o;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Ml(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)Ml(n[r],e,0)},Polygon:function(t,e){jl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,o=n.length;++r<o;)jl(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,o=n.length;++r<o;)Cl(n[r],e)}};function Ml(t,e,n){var r,o=-1,i=t.length-n;for(e.lineStart();++o<i;)r=t[o],e.point(r[0],r[1],r[2]);e.lineEnd()}function jl(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Ml(t[n],e,1);e.polygonEnd()}var Al=1/0,El=Al,Tl=-Al,Rl=Tl;var zl={point:function(t,e){t<Al&&(Al=t);t>Tl&&(Tl=t);e<El&&(El=e);e>Rl&&(Rl=e)},lineStart:Yu,lineEnd:Yu,polygonStart:Yu,polygonEnd:Yu,result:function(){var t=[[Al,El],[Tl,Rl]];return Tl=Rl=-(El=Al=1/0),t}};function Fl(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),function(t,e){t&&Ol.hasOwnProperty(t.type)?Ol[t.type](t,e):Cl(t,e)}(n,t.stream(zl)),e(zl.result()),null!=r&&t.clipExtent(r),t}function Il(t,e,n){return Fl(t,(function(n){var r=e[1][0]-e[0][0],o=e[1][1]-e[0][1],i=Math.min(r/(n[1][0]-n[0][0]),o/(n[1][1]-n[0][1])),a=+e[0][0]+(r-i*(n[1][0]+n[0][0]))/2,f=+e[0][1]+(o-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,f])}),n)}var Nl=Gu(30*Nu),Ll=function(t,e){return+e?function(t,e){function n(r,o,i,a,f,c,u,l,s,h,d,y,p,b){var v=u-r,g=l-o,m=v*v+g*g;if(m>4*e&&p--){var w=a+h,x=f+d,S=c+y,_=Uu(w*w+x*x+S*S),k=$u(S/=_),C=Lu(Lu(S)-1)<Eu||Lu(i-s)<Eu?(i+s)/2:Du(x,w),O=t(C,k),P=O[0],M=O[1],j=P-r,A=M-o,E=g*j-v*A;(E*E/m>e||Lu((v*j+g*A)/m-.5)>.3||a*h+f*d+c*y<Nl)&&(n(r,o,i,a,f,c,P,M,C,w/=_,x/=_,S,p,b),b.point(P,M),n(P,M,C,w,x,S,u,l,s,h,d,y,p,b))}}return function(e){var r,o,i,a,f,c,u,l,s,h,d,y,p={point:b,lineStart:v,lineEnd:m,polygonStart:function(){e.polygonStart(),p.lineStart=w},polygonEnd:function(){e.polygonEnd(),p.lineStart=v}};function b(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,p.point=g,e.lineStart()}function g(r,o){var i=tl([r,o]),a=t(r,o);n(l,s,u,h,d,y,l=a[0],s=a[1],u=r,h=i[0],d=i[1],y=i[2],16,e),e.point(l,s)}function m(){p.point=b,e.lineEnd()}function w(){v(),p.point=x,p.lineEnd=S}function x(t,e){g(r=t,e),o=l,i=s,a=h,f=d,c=y,p.point=g}function S(){n(l,s,u,h,d,y,o,i,r,a,f,c,16,e),p.lineEnd=m,m()}return p}}(t,e):function(t){return _l({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var Bl=_l({point:function(t,e){this.stream.point(t*Nu,e*Nu)}});function Dl(t,e,n,r,o,i){if(!i)return function(t,e,n,r,o){function i(i,a){return[e+t*(i*=r),n-t*(a*=o)]}return i.invert=function(i,a){return[(i-e)/t*r,(n-a)/t*o]},i}(t,e,n,r,o);var a=Gu(i),f=Zu(i),c=a*t,u=f*t,l=a/t,s=f/t,h=(f*n-a*e)/t,d=(f*e+a*n)/t;function y(t,i){return[c*(t*=r)-u*(i*=o)+e,n-u*t-c*i]}return y.invert=function(t,e){return[r*(l*t-s*e+h),o*(d-s*t-l*e)]},y}function Gl(t){return function(t){var e,n,r,o,i,a,f,c,u,l,s=150,h=480,d=250,y=0,p=0,b=0,v=0,g=0,m=0,w=1,x=1,S=null,_=sl,k=null,C=Sl,O=.5;function P(t){return c(t[0]*Nu,t[1]*Nu)}function M(t){return(t=c.invert(t[0],t[1]))&&[t[0]*Iu,t[1]*Iu]}function j(){var t=Dl(s,0,0,w,x,m).apply(null,e(y,p)),r=Dl(s,h-t[0],d-t[1],w,x,m);return n=yl(b,v,g),f=hl(e,r),c=hl(n,f),a=Ll(f,O),A()}function A(){return u=l=null,P}return P.stream=function(t){return u&&l===t?u:u=Bl(function(t){return _l({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(a(C(l=t)))))},P.preclip=function(t){return arguments.length?(_=t,S=void 0,A()):_},P.postclip=function(t){return arguments.length?(C=t,k=r=o=i=null,A()):C},P.clipAngle=function(t){return arguments.length?(_=+t?wl(S=t*Nu):(S=null,sl),A()):S*Iu},P.clipExtent=function(t){return arguments.length?(C=null==t?(k=r=o=i=null,Sl):xl(k=+t[0][0],r=+t[0][1],o=+t[1][0],i=+t[1][1]),A()):null==k?null:[[k,r],[o,i]]},P.scale=function(t){return arguments.length?(s=+t,j()):s},P.translate=function(t){return arguments.length?(h=+t[0],d=+t[1],j()):[h,d]},P.center=function(t){return arguments.length?(y=t[0]%360*Nu,p=t[1]%360*Nu,j()):[y*Iu,p*Iu]},P.rotate=function(t){return arguments.length?(b=t[0]%360*Nu,v=t[1]%360*Nu,g=t.length>2?t[2]%360*Nu:0,j()):[b*Iu,v*Iu,g*Iu]},P.angle=function(t){return arguments.length?(m=t%360*Nu,j()):m*Iu},P.reflectX=function(t){return arguments.length?(w=t?-1:1,j()):w<0},P.reflectY=function(t){return arguments.length?(x=t?-1:1,j()):x<0},P.precision=function(t){return arguments.length?(a=Ll(f,O=t*t),A()):Uu(O)},P.fitExtent=function(t,e){return Il(P,t,e)},P.fitSize=function(t,e){return function(t,e,n){return Il(t,[[0,0],e],n)}(P,t,e)},P.fitWidth=function(t,e){return function(t,e,n){return Fl(t,(function(n){var r=+e,o=r/(n[1][0]-n[0][0]),i=(r-o*(n[1][0]+n[0][0]))/2,a=-o*n[0][1];t.scale(150*o).translate([i,a])}),n)}(P,t,e)},P.fitHeight=function(t,e){return function(t,e,n){return Fl(t,(function(n){var r=+e,o=r/(n[1][1]-n[0][1]),i=-o*n[0][0],a=(r-o*(n[1][1]+n[0][1]))/2;t.scale(150*o).translate([i,a])}),n)}(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&M,j()}}((function(){return t}))()}var Zl,Wl,Ul=(Zl=function(t){return Uu(2/(1+t))},function(t,e){var n=Gu(t),r=Gu(e),o=Zl(n*r);return o===1/0?[2,0]:[o*r*Zu(t),o*Zu(e)]});Ul.invert=(Wl=function(t){return 2*$u(t/2)},function(t,e){var n=Uu(t*t+e*e),r=Wl(n),o=Zu(r),i=Gu(r);return[Du(t*o,n*i),$u(n&&e*o/n)]});var $l=function(){return Gl(Ul).scale(124.75).clipAngle(179.999)},Yl=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"EUR",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:50,n=arguments.length>2?arguments[2]:void 0,r=(n=n||{}).ex||1.2;return n.style=n.style||function(t,e){if(!(t.rs<r*e))return t.r1<r*e?"1em Arial":"1.5em Arial"},n.proj=n.proj||$l().rotate([-10,-52]).reflectX(!1).reflectY(!0).scale(6378137).translate([4321e3,321e4]),n.preprocess=function(t){var e=n.proj([t.lon,t.lat]);t.x=e[0],t.y=e[1],delete t.lon,delete t.lat},n.url="https://raw.githubusercontent.com/eurostat/euronym/main/pub/v1/"+e+"/"+t+".csv",new ho(n)},Vl=function(t){var e=(t=t||{}).nutsYear||"2021",n=t.crs||"3035",r=t.scale||"03M",o=t.nutsLevel||"3",i="#888";return t.color=t.color||function(t,e){var n=t.properties;return"T"===n.co||e<400?i:e<1e3?n.lvl>=3?"":i:e<2e3?n.lvl>=2?"":i:n.lvl>=1?"":i},t.width=t.width||function(t,e){var n=t.properties;return"T"===n.co?.5:e<400?3==n.lvl||2==n.lvl||1==n.lvl?2.2:4:e<1e3?2==n.lvl||1==n.lvl?1.8:2.5:e<2e3?1==n.lvl?1.8:2.5:1.2},t.lineDash=t.lineDash||function(t,e){var n=t.properties;return"T"===n.co?[]:e<400?3==n.lvl?[2*e,2*e]:2==n.lvl||1==n.lvl?[5*e,2*e]:[10*e,3*e]:e<1e3?2==n.lvl||1==n.lvl?[5*e,2*e]:[10*e,3*e]:e<2e3&&1==n.lvl?[5*e,2*e]:[10*e,3*e]},new vo("https://raw.githubusercontent.com/eurostat/Nuts2json/master/pub/v2/"+e+"/"+n+"/"+r+"/nutsbn_"+o+".json",t)}},9:function(t,e,n){t.exports=n(10)}})}));