Socket
Socket
Sign inDemoInstall

d3-funnel

Package Overview
Dependencies
15
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.1.0 to 2.1.1

2

dist/d3-funnel.min.js

@@ -1,2 +0,2 @@

/*! d3-funnel - v2.1.0 | 2022 */
/*! d3-funnel - v2.1.1 | 2022 */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.D3Funnel=e():t.D3Funnel=e()}(self,(function(){return function(){var t={100:function(t,e,n){"use strict";n.d(e,{default:function(){return Wn}});const r=t=>+t;class i extends Map{constructor(t,e=a){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(o(this,t))}has(t){return super.has(o(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)&&(n=t.get(r),t.delete(r)),n}(this,t))}}function o({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function a(t){return null!==t&&"object"==typeof t?t.valueOf():t}function s(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}Set;const u=Symbol("implicit");var l=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}("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");function c(){}function h(t){return null==t?c:function(){return this.querySelector(t)}}function f(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function p(){return[]}function d(t){return null==t?p:function(){return this.querySelectorAll(t)}}function g(t){return function(){return this.matches(t)}}function v(t){return function(e){return e.matches(t)}}var y=Array.prototype.find;function m(){return this.firstElementChild}var b=Array.prototype.filter;function w(){return Array.from(this.children)}function _(t){return new Array(t.length)}function k(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function x(t){return function(){return t}}function A(t,e,n,r,i,o){for(var a,s=0,u=e.length,l=o.length;s<l;++s)(a=e[s])?(a.__data__=o[s],r[s]=a):n[s]=new k(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function E(t,e,n,r,i,o,a){var s,u,l,c=new Map,h=e.length,f=o.length,p=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(p[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<f;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new k(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(p[s])===u&&(i[s]=u)}function P(t){return t.__data__}function O(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function S(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}k.prototype={constructor:k,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 C="http://www.w3.org/1999/xhtml",M={svg:"http://www.w3.org/2000/svg",xhtml:C,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function N(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),M.hasOwnProperty(e)?{space:M[e],local:t}:t}function j(t){return function(){this.removeAttribute(t)}}function L(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D(t,e){return function(){this.setAttribute(t,e)}}function B(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function H(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function I(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function T(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function z(t){return function(){this.style.removeProperty(t)}}function F(t,e,n){return function(){this.style.setProperty(t,e,n)}}function R(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function X(t,e){return t.style.getPropertyValue(e)||T(t).getComputedStyle(t,null).getPropertyValue(e)}function q(t){return function(){delete this[t]}}function V(t,e){return function(){this[t]=e}}function Y(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Q(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new G(t)}function G(t){this._node=t,this._names=Q(t.getAttribute("class")||"")}function W(t,e){for(var n=$(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function U(t,e){for(var n=$(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function K(t){return function(){W(this,t)}}function J(t){return function(){U(this,t)}}function Z(t,e){return function(){(e.apply(this,arguments)?W:U)(this,t)}}function tt(){this.textContent=""}function et(t){return function(){this.textContent=t}}function nt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function rt(){this.innerHTML=""}function it(t){return function(){this.innerHTML=t}}function ot(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function at(){this.nextSibling&&this.parentNode.appendChild(this)}function st(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ut(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===C&&e.documentElement.namespaceURI===C?e.createElement(t):e.createElementNS(n,t)}}function lt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ct(t){var e=N(t);return(e.local?lt:ut)(e)}function ht(){return null}function ft(){var t=this.parentNode;t&&t.removeChild(this)}function pt(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function dt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function gt(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 vt(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function yt(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function mt(t,e,n){var r=T(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function bt(t,e){return function(){return mt(this,t,e)}}function wt(t,e){return function(){return mt(this,t,e.apply(this,arguments))}}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}};var _t=[null];function kt(t,e){this._groups=t,this._parents=e}function xt(){return new kt([[document.documentElement]],_t)}kt.prototype=xt.prototype={constructor:kt,select:function(t){"function"!=typeof t&&(t=h(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a,s=e[i],u=s.length,l=r[i]=new Array(u),c=0;c<u;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new kt(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return f(t.apply(this,arguments))}}(t):d(t);for(var e=this._groups,n=e.length,r=[],i=[],o=0;o<n;++o)for(var a,s=e[o],u=s.length,l=0;l<u;++l)(a=s[l])&&(r.push(t.call(a,a.__data__,l,s)),i.push(a));return new kt(r,i)},selectChild:function(t){return this.select(null==t?m:function(t){return function(){return y.call(this.children,t)}}("function"==typeof t?t:v(t)))},selectChildren:function(t){return this.selectAll(null==t?w:function(t){return function(){return b.call(this.children,t)}}("function"==typeof t?t:v(t)))},filter:function(t){"function"!=typeof t&&(t=g(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);return new kt(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,P);var n=e?E:A,r=this._parents,i=this._groups;"function"!=typeof t&&(t=x(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,p=O(t.call(c,c&&c.__data__,l,r)),d=p.length,g=s[l]=new Array(d),v=a[l]=new Array(d),y=u[l]=new Array(f);n(c,h,g,v,y,p,e);for(var m,b,w=0,_=0;w<d;++w)if(m=g[w]){for(w>=_&&(_=w+1);!(b=v[_])&&++_<d;);m._next=b||null}}return(a=new kt(a,r))._enter=s,a._exit=u,a},enter:function(){return new kt(this._enter||this._groups.map(_),this._parents)},exit:function(){return new kt(this._exit||this._groups.map(_),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l,c=n[u],h=r[u],f=c.length,p=s[u]=new Array(f),d=0;d<f;++d)(l=c[d]||h[d])&&(p[d]=l);for(;u<i;++u)s[u]=n[u];return new kt(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(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=S);for(var n=this._groups,r=n.length,i=new Array(r),o=0;o<r;++o){for(var a,s=n[o],u=s.length,l=i[o]=new Array(u),c=0;c<u;++c)(a=s[c])&&(l[c]=a);l.sort(e)}return new kt(i,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],i=0,o=r.length;i<o;++i){var a=r[i];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 i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=N(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?L:j:"function"==typeof e?n.local?I:H:n.local?B:D)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?z:"function"==typeof e?R:F)(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?q:"function"==typeof e?Y:V)(t,e)):this.node()[t]},classed:function(t,e){var n=Q(t+"");if(arguments.length<2){for(var r=$(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Z:e?K:J)(n,e))},text:function(t){return arguments.length?this.each(null==t?tt:("function"==typeof t?nt:et)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?rt:("function"==typeof t?ot:it)(t)):this.node().innerHTML},raise:function(){return this.each(at)},lower:function(){return this.each(st)},append:function(t){var e="function"==typeof t?t:ct(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ct(t),r=null==e?ht:"function"==typeof e?e:h(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ft)},clone:function(t){return this.select(t?dt:pt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=gt(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?yt:vt,r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?wt:bt)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}};var At=xt;function Et(t){return"string"==typeof t?new kt([[document.querySelector(t)]],[document.documentElement]):new kt([[t]],_t)}var Pt={value:()=>{}};function Ot(){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 St(r)}function St(t){this._=t}function Ct(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 Mt(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Nt(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Pt,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}St.prototype=Ot.prototype={constructor:St,on:function(t,e){var n,r=this._,i=Ct(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=Nt(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Nt(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Mt(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new St(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,n=(r=this._[t]).length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}};var jt,Lt,Dt=Ot,Bt=0,Ht=0,It=0,Tt=0,zt=0,Ft=0,Rt="object"==typeof performance&&performance.now?performance:Date,Xt="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function qt(){return zt||(Xt(Vt),zt=Rt.now()+Ft)}function Vt(){zt=0}function Yt(){this._call=this._time=this._next=null}function Qt(t,e,n){var r=new Yt;return r.restart(t,e,n),r}function $t(){zt=(Tt=Rt.now())+Ft,Bt=Ht=0;try{!function(){qt(),++Bt;for(var t,e=jt;e;)(t=zt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Bt}()}finally{Bt=0,function(){for(var t,e,n=jt,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:jt=e);Lt=t,Wt(r)}(),zt=0}}function Gt(){var t=Rt.now(),e=t-Tt;e>1e3&&(Ft-=e,Tt=t)}function Wt(t){Bt||(Ht&&(Ht=clearTimeout(Ht)),t-zt>24?(t<1/0&&(Ht=setTimeout($t,t-Rt.now()-Ft)),It&&(It=clearInterval(It))):(It||(Tt=Rt.now(),It=setInterval(Gt,1e3)),Bt=1,Xt($t)))}function Ut(t,e,n){var r=new Yt;return e=null==e?0:+e,r.restart((n=>{r.stop(),t(n+e)}),e,n),r}Yt.prototype=Qt.prototype={constructor:Yt,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?qt():+n)+(null==e?0:+e),this._next||Lt===this||(Lt?Lt._next=this:jt=this,Lt=this),this._call=t,this._time=n,Wt()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wt())}};var Kt=Dt("start","end","cancel","interrupt"),Jt=[];function Zt(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(u){var l,c,h,f;if(1!==n.state)return s();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return Ut(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(Ut((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),l=0,c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Qt((function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Kt,tween:Jt,time:o.time,delay:o.delay,duration:o.duration,ease:o.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}function re(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var ie,oe=180/Math.PI,ae={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function se(t,e,n,r,i,o){var a,s,u;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(u=t*n+e*r)&&(n-=t*u,r-=e*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),t*r<e*n&&(t=-t,e=-e,u=-u,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*oe,skewX:Math.atan(u)*oe,scaleX:a,scaleY:s}}function ue(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],u=[];return o=t(o),a=t(a),function(t,r,i,o,a,s){if(t!==i||r!==o){var u=a.push("translate(",null,e,null,n);s.push({i:u-4,x:re(t,i)},{i:u-2,x:re(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,s,u),function(t,e,n,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(i(n)+"rotate(",null,r)-2,x:re(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(o.rotate,a.rotate,s,u),function(t,e,n,o){t!==e?o.push({i:n.push(i(n)+"skewX(",null,r)-2,x:re(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(o.skewX,a.skewX,s,u),function(t,e,n,r,o,a){if(t!==n||e!==r){var s=o.push(i(o)+"scale(",null,",",null,")");a.push({i:s-4,x:re(t,n)},{i:s-2,x:re(e,r)})}else 1===n&&1===r||o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,u),o=a=null,function(t){for(var e,n=-1,r=u.length;++n<r;)s[(e=u[n]).i]=e.x(t);return s.join("")}}}var le=ue((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ae:se(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),ce=ue((function(t){return null==t?ae:(ie||(ie=document.createElementNS("http://www.w3.org/2000/svg","g")),ie.setAttribute("transform",t),(t=ie.transform.baseVal.consolidate())?se((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ae)}),", ",")",")");function he(t,e){var n,r;return function(){var i=ee(this,t),o=i.tween;if(o!==n)for(var a=0,s=(r=n=o).length;a<s;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}i.tween=r}}function fe(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=ee(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var s={name:e,value:n},u=0,l=i.length;u<l;++u)if(i[u].name===e){i[u]=s;break}u===l&&i.push(s)}o.tween=i}}function pe(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]}}function de(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ge(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function ve(){}var ye=.7,me=1/ye,be="\\s*([+-]?\\d+)\\s*",we="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",_e="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ke=/^#([0-9a-f]{3,8})$/,xe=new RegExp("^rgb\\("+[be,be,be]+"\\)$"),Ae=new RegExp("^rgb\\("+[_e,_e,_e]+"\\)$"),Ee=new RegExp("^rgba\\("+[be,be,be,we]+"\\)$"),Pe=new RegExp("^rgba\\("+[_e,_e,_e,we]+"\\)$"),Oe=new RegExp("^hsl\\("+[we,_e,_e]+"\\)$"),Se=new RegExp("^hsla\\("+[we,_e,_e,we]+"\\)$"),Ce={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 Me(){return this.rgb().formatHex()}function Ne(){return this.rgb().formatRgb()}function je(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ke.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Le(e):3===n?new Ie(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?De(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?De(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=xe.exec(t))?new Ie(e[1],e[2],e[3],1):(e=Ae.exec(t))?new Ie(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ee.exec(t))?De(e[1],e[2],e[3],e[4]):(e=Pe.exec(t))?De(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Oe.exec(t))?Re(e[1],e[2]/100,e[3]/100,1):(e=Se.exec(t))?Re(e[1],e[2]/100,e[3]/100,e[4]):Ce.hasOwnProperty(t)?Le(Ce[t]):"transparent"===t?new Ie(NaN,NaN,NaN,0):null}function Le(t){return new Ie(t>>16&255,t>>8&255,255&t,1)}function De(t,e,n,r){return r<=0&&(t=e=n=NaN),new Ie(t,e,n,r)}function Be(t){return t instanceof ve||(t=je(t)),t?new Ie((t=t.rgb()).r,t.g,t.b,t.opacity):new Ie}function He(t,e,n,r){return 1===arguments.length?Be(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 Te(){return"#"+Fe(this.r)+Fe(this.g)+Fe(this.b)}function ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Fe(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Re(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new qe(t,e,n,r)}function Xe(t){if(t instanceof qe)return new qe(t.h,t.s,t.l,t.opacity);if(t instanceof ve||(t=je(t)),!t)return new qe;if(t instanceof qe)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,s=o-i,u=(o+i)/2;return s?(a=e===o?(n-r)/s+6*(n<r):n===o?(r-e)/s+2:(e-n)/s+4,s/=u<.5?o+i:2-o-i,a*=60):s=u>0&&u<1?0:a,new qe(a,s,u,t.opacity)}function qe(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}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 Ye(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}de(ve,je,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Me,formatHex:Me,formatHsl:function(){return Xe(this).formatHsl()},formatRgb:Ne,toString:Ne}),de(Ie,He,ge(ve,{brighter:function(t){return t=null==t?me:Math.pow(me,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?ye:Math.pow(ye,t),new Ie(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Te,formatHex:Te,formatRgb:ze,toString:ze})),de(qe,(function(t,e,n,r){return 1===arguments.length?Xe(t):new qe(t,e,n,null==r?1:r)}),ge(ve,{brighter:function(t){return t=null==t?me:Math.pow(me,t),new qe(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?ye:Math.pow(ye,t),new qe(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new Ie(Ve(t>=240?t-240:t+120,i,r),Ve(t,i,r),Ve(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var Qe=t=>()=>t;function $e(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Qe(isNaN(t)?e:t)}var Ge=function t(e){var n=function(t){return 1==(t=+t)?$e: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):Qe(isNaN(e)?n:e)}}(e);function r(t,e){var r=n((t=He(t)).r,(e=He(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=$e(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function We(t){return function(e){var n,r,i=e.length,o=new Array(i),a=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=He(e[n]),o[n]=r.r||0,a[n]=r.g||0,s[n]=r.b||0;return o=t(o),a=t(a),s=t(s),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=s(t),r+""}}}We((function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,s=r<e-1?t[r+2]:2*o-i;return Ye((n-r/e)*e,a,i,o,s)}})),We((function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],s=t[(r+2)%e];return Ye((n-r/e)*e,i,o,a,s)}}));var Ue=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ke=new RegExp(Ue.source,"g");function Je(t,e){var n,r,i,o=Ue.lastIndex=Ke.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Ue.exec(t))&&(r=Ke.exec(e));)(i=r.index)>o&&(i=e.slice(o,i),s[a]?s[a]+=i:s[++a]=i),(n=n[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,u.push({i:a,x:re(n,r)})),o=Ke.lastIndex;return o<e.length&&(i=e.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?u[0]?function(t){return function(e){return t(e)+""}}(u[0].x):function(t){return function(){return t}}(e):(e=u.length,function(t){for(var n,r=0;r<e;++r)s[(n=u[r]).i]=n.x(t);return s.join("")})}function Ze(t,e){var n;return("number"==typeof e?re:e instanceof je?Ge:(n=je(e))?(e=n,Ge):Je)(t,e)}function tn(t){return function(){this.removeAttribute(t)}}function en(t){return function(){this.removeAttributeNS(t.space,t.local)}}function nn(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}}function rn(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}function on(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttribute(t))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttribute(t)}}function an(t,e,n){var r,i,o;return function(){var a,s,u=n(this);if(null!=u)return(a=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:a===r&&s===i?o:(i=s,o=e(r=a,u));this.removeAttributeNS(t.space,t.local)}}function sn(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function un(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ln(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&un(t,i)),n}return i._value=e,i}function cn(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sn(t,i)),n}return i._value=e,i}function hn(t,e){return function(){te(this,t).delay=+e.apply(this,arguments)}}function fn(t,e){return e=+e,function(){te(this,t).delay=e}}function pn(t,e){return function(){ee(this,t).duration=+e.apply(this,arguments)}}function dn(t,e){return e=+e,function(){ee(this,t).duration=e}}function gn(t,e){if("function"!=typeof e)throw new Error;return function(){ee(this,t).ease=e}}function vn(t,e,n){var r,i,o=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=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var yn=At.prototype.constructor;function mn(t){return function(){this.style.removeProperty(t)}}function bn(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function wn(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&bn(t,o,n)),r}return o._value=e,o}function _n(t){return function(e){this.textContent=t.call(this,e)}}function kn(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&_n(r)),e}return r._value=t,r}var xn=0;function An(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function En(){return++xn}var Pn=At.prototype;An.prototype=function(t){return At().transition(t)}.prototype={constructor:An,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=h(t));for(var r=this._groups,i=r.length,o=new Array(i),a=0;a<i;++a)for(var s,u,l=r[a],c=l.length,f=o[a]=new Array(c),p=0;p<c;++p)(s=l[p])&&(u=t.call(s,s.__data__,p,l))&&("__data__"in s&&(u.__data__=s.__data__),f[p]=u,Zt(f[p],e,n,p,f,ne(s,n)));return new An(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=d(t));for(var r=this._groups,i=r.length,o=[],a=[],s=0;s<i;++s)for(var u,l=r[s],c=l.length,h=0;h<c;++h)if(u=l[h]){for(var f,p=t.call(u,u.__data__,h,l),g=ne(u,n),v=0,y=p.length;v<y;++v)(f=p[v])&&Zt(f,e,n,v,p,g);o.push(p),a.push(u)}return new An(o,a,e,n)},selectChild:Pn.selectChild,selectChildren:Pn.selectChildren,filter:function(t){"function"!=typeof t&&(t=g(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var o,a=e[i],s=a.length,u=r[i]=[],l=0;l<s;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&u.push(o);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,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),p=0;p<h;++p)(u=l[p]||c[p])&&(f[p]=u);for(;s<r;++s)a[s]=e[s];return new An(a,this._parents,this._name,this._id)},selection:function(){return new yn(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=En(),r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)if(a=s[l]){var c=ne(a,e);Zt(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new An(r,this._parents,t,n)},call:Pn.call,nodes:Pn.nodes,node:Pn.node,size:Pn.size,empty:Pn.empty,each:Pn.each,on:function(t,e){var n=this._id;return arguments.length<2?ne(this.node(),n).on.on(t):this.each(vn(n,t,e))},attr:function(t,e){var n=N(t),r="transform"===n?ce:Ze;return this.attrTween(t,"function"==typeof e?(n.local?an:on)(n,r,pe(this,"attr."+t,e)):null==e?(n.local?en:tn)(n):(n.local?rn:nn)(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=N(t);return this.tween(n,(r.local?ln:cn)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?le:Ze;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=X(this,t),a=(this.style.removeProperty(t),X(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,mn(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=X(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=X(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,pe(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=ee(this,t),l=u.on,c=null==u.value[a]?o||(o=mn(e)):void 0;l===n&&i===c||(r=(n=l).copy()).on(s,i=c),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,o=n+"";return function(){var a=X(this,t);return a===o?null:a===r?i:i=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,wn(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}}(pe(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,kn(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=ne(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?he:fe)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?hn:fn)(e,t)):ne(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?pn:dn)(e,t)):ne(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(gn(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,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=ee(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e})),0===i&&o()}))},[Symbol.iterator]:Pn[Symbol.iterator]};var On={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Sn(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Cn(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)}}At.prototype.interrupt=function(t){return this.each((function(){!function(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o)(n=o[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]):a=!1;a&&delete t.__transition}}(this,t)}))},At.prototype.transition=function(t){var e,n;t instanceof An?(e=t._id,t=t._name):(e=En(),(n=On).time=qt(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;++o)for(var a,s=r[o],u=s.length,l=0;l<u;++l)(a=s[l])&&Zt(a,t,e,l,s,n||Sn(a,e));return new An(r,this._parents,t,e)};var Mn=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.hexExpression=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i,this.instanceId=null,this.labelFill=null,this.scale=null}var e,n;return e=t,n=[{key:"setInstanceId",value:function(t){this.instanceId=t}},{key:"setLabelFill",value:function(t){this.labelFill=t}},{key:"setScale",value:function(t){this.scale=t}},{key:"getBlockFill",value:function(t,e,n){var r=this.getBlockRawFill(t,e);return{raw:r,actual:this.getBlockActualFill(r,e,n)}}},{key:"getBlockRawFill",value:function(t,e){return this.hexExpression.test(t)?t:Array.isArray(this.scale)?this.scale[e]:this.scale(e)}},{key:"getBlockActualFill",value:function(t,e,n){return"solid"===n?t:"url(#".concat(this.getGradientId(e),")")}},{key:"getGradientId",value:function(t){return"".concat(this.instanceId,"-gradient-").concat(t)}},{key:"getLabelColor",value:function(t){return this.hexExpression.test(t)?t:this.labelFill}},{key:"shade",value:function(t,e){var n=this.hexToRgb(t),r=n.R,i=n.G,o=n.B,a=e<0?0:255,s=e<0?-1*e:e,u=16777216+65536*(Math.round((a-r)*s)+r)+256*(Math.round((a-i)*s)+i)+(Math.round((a-o)*s)+o);return"#".concat(u.toString(16).slice(1))}},{key:"hexToRgb",value:function(t){var e=t.slice(1);3===e.length&&(e=this.expandHex(e));var n=parseInt(e,16);return{R:n>>16,G:n>>8&255,B:255&n}}},{key:"expandHex",value:function(t){return t[0]+t[0]+t[1]+t[1]+t[2]+t[2]}}],n&&Cn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Nn=Mn;function jn(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 Ln=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;return e=t,(n=[{key:"getFormatter",value:function(t){var e=this;return"function"==typeof t?t:function(n,r,i){return e.stringFormatter(n,r,i,t)}}},{key:"format",value:function(t,e){var n=t.label,r=t.value,i=t.formattedValue;return e(n,r,void 0===i?null:i)}},{key:"stringFormatter",value:function(t,e,n,r){var i=n;return null===n&&(i=this.getDefaultFormattedValue(e)),r.split("{l}").join(t).split("{v}").join(e).split("{f}").join(i)}},{key:"getDefaultFormattedValue",value:function(t){return t.toLocaleString()}}])&&jn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Dn(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 Bn=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;return e=t,n=[{key:"plot",value:function(t){var e="";return t.forEach((function(t){e+="".concat(t[0]).concat(t[1],",").concat(t[2]," ")})),e.replace(/ +/g," ").trim()}},{key:"makeCurvedPaths",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.makeBezierPoints(t);return e?this.makeBezierPath(n,t.ratio):this.makeBezierPath(n)}},{key:"makeBezierPoints",value:function(t){var e=t.centerX,n=t.prevLeftX,r=t.prevRightX,i=t.prevHeight,o=t.nextLeftX,a=t.nextRightX,s=t.nextHeight,u=t.curveHeight;return{p00:{x:n,y:i},p01:{x:e,y:i+u/2},p02:{x:r,y:i},p10:{x:o,y:s},p11:{x:e,y:s+u},p12:{x:a,y:s}}}},{key:"makeBezierPath",value:function(t){var e=t.p00,n=t.p01,r=t.p02,i=t.p10,o=t.p11,a=t.p12,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,u=this.getQuadraticBezierCurve(e,n,r,s),l=this.getQuadraticBezierCurve(i,o,a,s);return[[u.p0.x,u.p0.y,"M"],[u.p1.x,u.p1.y,"Q"],[u.p2.x,u.p2.y,""],[l.p2.x,l.p2.y,"L"],[l.p2.x,l.p2.y,"M"],[l.p1.x,l.p1.y,"Q"],[l.p0.x,l.p0.y,""],[u.p0.x,u.p0.y,"L"]]}},{key:"getQuadraticBezierCurve",value:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;return{p0:t,p1:{x:this.getLinearInterpolation(t,e,r,"x"),y:this.getLinearInterpolation(t,e,r,"y")},p2:{x:this.getQuadraticInterpolation(t,e,n,r,"x"),y:this.getQuadraticInterpolation(t,e,n,r,"y")}}}},{key:"getLinearInterpolation",value:function(t,e,n,r){return t[r]+n*(e[r]-t[r])}},{key:"getQuadraticInterpolation",value:function(t,e,n,r,i){return Math.pow(1-r,2)*t[i]+2*(1-r)*r*e[i]+Math.pow(r,2)*n[i]}},{key:"makeStraightPaths",value:function(t){var e=t.prevLeftX,n=t.prevRightX,r=t.prevHeight,i=t.nextLeftX,o=t.nextRightX,a=t.nextHeight,s=t.ratio,u=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(u){var l=n-e,c=o-i,h=l*(s||0)+e,f=c*(s||0)+i;return[[e,r,"M"],[h=Math.min(h,l),r,"L"],[f=Math.min(f,c),a,"L"],[i,a,"L"],[e,r,"L"]]}return[[e,r,"M"],[n,r,"L"],[o,a,"L"],[i,a,"L"],[e,r,"L"]]}}],n&&Dn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Hn=Bn;function In(t){return In="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},In(t)}function Tn(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 zn=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;return e=t,n=[{key:"isExtendableObject",value:function(t){return"object"===In(t)&&null!==t&&!Array.isArray(t)}},{key:"extend",value:function(e,n){var r={};return Object.keys(e).length>0&&(r=t.extend({},e)),Object.keys(n).forEach((function(i){t.isExtendableObject(n[i])?t.isExtendableObject(e[i])?r[i]=t.extend(e[i],n[i]):r[i]=t.extend({},n[i]):r[i]=n[i]})),r}},{key:"convertLegacyBlock",value:function(e){return{label:e[0],value:t.getRawBlockCount(e),formattedValue:Array.isArray(e[1])?e[1][1]:null,backgroundColor:e[2],labelColor:e[3]}}},{key:"getRawBlockCount",value:function(t){return Array.isArray(t)?Array.isArray(t[1])?t[1][0]:t[1]:t.value}}],null&&Tn(e.prototype,null),n&&Tn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Fn(t){return function(t){if(Array.isArray(t))return Xn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Rn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Rn(t,e){if(t){if("string"==typeof t)return Xn(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)?Xn(t,e):void 0}}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){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Vn(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?qn(Object(n),!0).forEach((function(e){$n(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):qn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Yn(t){return Yn="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},Yn(t)}function Qn(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 $n(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var Gn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=Et(e).node(),this.colorizer=new Nn,this.formatter=new Ln,this.navigator=new Hn,this.id=null,this.onMouseOver=this.onMouseOver.bind(this),this.onMouseOut=this.onMouseOut.bind(this)}var e,n;return e=t,n=[{key:"destroy",value:function(){var t=Et(this.container);t.selectAll("svg").remove(),t.selectAll("*").remove(),t.text("")}},{key:"draw",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.destroy(),this.initialize(t,e),this.drawOntoDom()}},{key:"initialize",value:function(t,e){this.validateData(t);var n=this.getSettings(e);this.id="d3-funnel-".concat(((t=21)=>{let e="",n=crypto.getRandomValues(new Uint8Array(t));for(;t--;){let r=63&n[t];e+=r<36?r.toString(36):r<62?(r-26).toString(36).toUpperCase():r<63?"_":"-"}return e})()),this.labelFormatter=this.formatter.getFormatter(n.label.format),this.tooltipFormatter=this.formatter.getFormatter(n.tooltip.format),this.colorizer.setInstanceId(this.id),this.colorizer.setLabelFill(n.label.fill),this.colorizer.setScale(n.block.fill.scale),this.settings={width:n.chart.width,height:n.chart.height,bottomWidth:n.chart.width*n.chart.bottomWidth,bottomPinch:n.chart.bottomPinch,isInverted:n.chart.inverted,isCurved:n.chart.curve.enabled,curveHeight:n.chart.curve.height,curveShade:n.chart.curve.shade,addValueOverlay:n.block.barOverlay,animation:n.chart.animate,totalCount:n.chart.totalCount,fillType:n.block.fill.type,hoverEffects:n.block.highlight,dynamicHeight:n.block.dynamicHeight,dynamicSlope:n.block.dynamicSlope,minHeight:n.block.minHeight,label:n.label,tooltip:n.tooltip,onBlockClick:n.events.click.block},this.setBlocks(t)}},{key:"validateData",value:function(t){if(!1===Array.isArray(t))throw new Error("Data must be an array.");if(0===t.length)throw new Error("Data array must contain at least one element.");if("object"!==Yn(t[0]))throw new Error("Data array elements must be an object.");if(Array.isArray(t[0])&&t[0].length<2||!1===Array.isArray(t[0])&&(void 0===t[0].label||void 0===t[0].value))throw new Error("Data array elements must contain a label and value.")}},{key:"getSettings",value:function(t){var e=this.getContainerDimensions(),n=this.getDefaultSettings(e),r=zn.extend({},n);return(r=zn.extend(r,t)).chart=Vn(Vn({},r.chart),this.castDimensions(r,e)),r}},{key:"getDefaultSettings",value:function(e){var n=t.defaults;return n.chart=Vn(Vn({},n.chart),e),n}},{key:"getContainerDimensions",value:function(){var t={width:parseFloat(Et(this.container).style("width")),height:parseFloat(Et(this.container).style("height"))};return["width","height"].forEach((function(e){0===t[e]&&delete t[e]})),t}},{key:"castDimensions",value:function(e,n){var r=e.chart,i={};return Object.keys(n).forEach((function(e){var o=r[e],a=n[e];/%$/.test(String(o))?i[e]=parseFloat(o)/100*a:i[e]=o<=0?t.defaults.chart[e]:o})),i}},{key:"setBlocks",value:function(t){var e=this.getTotalCount(t);this.blocks=this.standardizeData(t,e)}},{key:"getTotalCount",value:function(t){return null!==this.settings.totalCount?this.settings.totalCount||0:t.reduce((function(t,e){return t+zn.getRawBlockCount(e)}),0)}},{key:"standardizeData",value:function(t,e){var n=this;return t.map((function(r,i){var o=Array.isArray(r)?zn.convertLegacyBlock(r):r,a=e>0?o.value/e||0:1/t.length;return{index:i,ratio:a,value:o.value,height:n.settings.height*a,fill:n.colorizer.getBlockFill(o.backgroundColor,i,n.settings.fillType),label:{enabled:!o.hideLabel,raw:o.label,formatted:n.formatter.format(o,n.labelFormatter),color:n.colorizer.getLabelColor(o.labelColor)},tooltip:{enabled:o.enabled,formatted:n.formatter.format(o,n.tooltipFormatter)}}}))}},{key:"drawOntoDom",value:function(){this.svg=Et(this.container).append("svg").attr("id",this.id).attr("width",this.settings.width).attr("height",this.settings.height);var t,e,n=(t=this.makePaths(),e=2,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){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(t);!(a=(r=n.next()).done)&&(o.push(r.value),!e||o.length!==e);a=!0);}catch(t){s=!0,i=t}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(t,e)||Rn(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.")}());this.blockPaths=n[0],this.overlayPaths=n[1],"gradient"===this.settings.fillType&&this.defineColorGradients(this.svg),this.settings.isCurved&&this.drawTopOval(this.svg,this.blockPaths),this.drawBlock(0)}},{key:"makePaths",value:function(){var t=this,e=(this.settings.width-this.settings.bottomWidth)/2,n=this.settings.width/2,r=[],i=[];this.dx=this.getDx(e),this.dy=this.getDy();var o=this.dx,a=this.dy,s=0,u=this.settings.width,l=0;this.settings.isInverted&&(s=e,u=this.settings.width-e);var c=0,h=0,f=0;this.settings.isCurved&&(l=this.settings.curveHeight/2);var p=this.settings.height;0!==this.settings.minHeight&&(p=this.settings.height-this.settings.minHeight*this.blocks.length);var d=this.settings.height;this.settings.bottomPinch>0&&this.blocks.forEach((function(e,n){var r=p*e.ratio;0!==t.settings.minHeight&&(r+=t.settings.minHeight),t.settings.isCurved&&(r+=t.settings.curveHeight/t.blocks.length),t.settings.isInverted?n<t.settings.bottomPinch&&(d-=r):n>=t.blocks.length-t.settings.bottomPinch&&(d-=r)}));var g=d/e;return this.blocks.forEach((function(e,d){if(t.settings.dynamicHeight&&(a=p*e.ratio,0!==t.settings.minHeight&&(a+=t.settings.minHeight),t.settings.isCurved&&(a-=t.settings.curveHeight/t.blocks.length),c=(l+a)/g,t.settings.isInverted&&(c=(l+a-t.settings.height)/(-1*g)),0===t.settings.bottomWidth&&d===t.blocks.length-1&&(c=t.settings.width/2,t.settings.isInverted&&(c=0)),t.settings.bottomWidth===t.settings.width&&(c=s),!Number.isNaN(c)&&Number.isFinite(c)||(c=0),o=c-s,t.settings.isInverted&&(o=s-c)),t.settings.dynamicSlope&&!t.settings.isInverted){var v=(t.blocks[d+1]?t.blocks[d+1].value:e.value)/e.value;o=(1-v)*(n-s)}t.settings.bottomPinch>0&&(t.settings.isInverted?(t.settings.dynamicHeight||(o=t.dx),o=d<t.settings.bottomPinch?0:o):d>=t.blocks.length-t.settings.bottomPinch&&(o=0)),c=s+o,h=u-o,f=l+a,t.blocks[d].height=a,t.settings.isInverted&&(c=s-o,h=u+o);var y={centerX:n,prevLeftX:s,prevRightX:u,prevHeight:l,nextLeftX:c,nextRightX:h,nextHeight:f,curveHeight:t.settings.curveHeight,ratio:e.ratio};t.settings.isCurved?(r=[].concat(Fn(r),[t.navigator.makeCurvedPaths(y)]),t.settings.addValueOverlay&&(i=[].concat(Fn(i),[t.navigator.makeCurvedPaths(y,!0)]))):(r=[].concat(Fn(r),[t.navigator.makeStraightPaths(y)]),t.settings.addValueOverlay&&(i=[].concat(Fn(i),[t.navigator.makeStraightPaths(y,!0)]))),s=c,u=h,l=f})),[r,i]}},{key:"getDx",value:function(t){return this.settings.bottomPinch>0?t/(this.blocks.length-this.settings.bottomPinch):t/this.blocks.length}},{key:"getDy",value:function(){return this.settings.isCurved?(this.settings.height-this.settings.curveHeight)/this.blocks.length:this.settings.height/this.blocks.length}},{key:"defineColorGradients",value:function(t){var e=this,n=t.append("defs");this.blocks.forEach((function(t,r){var i=t.fill.raw,o=e.colorizer.shade(i,-.2),a=n.append("linearGradient").attr("id",e.colorizer.getGradientId(r));[[0,o],[40,i],[60,i],[100,o]].forEach((function(t){a.append("stop").attr("offset","".concat(t[0],"%")).attr("style","stop-color: ".concat(t[1]))}))}))}},{key:"drawTopOval",value:function(t,e){var n=this.settings.width/2,r=e[0],i=r[1][1]+this.settings.curveHeight/2,o=this.navigator.plot([["M",r[0][0],r[0][1]],["Q",n,i],[" ",r[2][0],r[2][1]],["M",r[2][0],this.settings.curveHeight/2],["Q",n,0],[" ",r[0][0],this.settings.curveHeight/2]]);t.append("path").attr("fill",this.colorizer.shade(this.blocks[0].fill.raw,this.settings.curveShade)).attr("d",o)}},{key:"drawBlock",value:function(t){var e=this;if(t!==this.blocks.length){var n=this.svg.append("g"),i=this.blocks[t],o=this.getBlockPath(n,t);this.attachData(o,i);var a=null,s=i.fill.actual;this.settings.addValueOverlay&&(a=this.getOverlayPath(n,t),this.attachData(a,i),o.node().setAttribute("pathType","background"),a.node().setAttribute("pathType","foreground"),s=this.colorizer.shade(i.fill.raw,.3)),0!==this.settings.animation?o.transition().duration(this.settings.animation).ease(r).attr("fill",s).attr("d",this.getPathDefinition(t)).on("end",(function(){e.drawBlock(t+1)})):(o.attr("fill",s).attr("d",this.getPathDefinition(t)),this.drawBlock(t+1)),this.settings.addValueOverlay&&(o.attr("stroke",this.blocks[t].fill.raw),0!==this.settings.animation?a.transition().duration(this.settings.animation).ease(r).attr("fill",i.fill.actual).attr("d",this.getOverlayPathDefinition(t)):a.attr("fill",i.fill.actual).attr("d",this.getOverlayPathDefinition(t))),this.settings.hoverEffects&&[o,a].forEach((function(t){t&&t.on("mouseover",e.onMouseOver).on("mouseout",e.onMouseOut)})),null!==this.settings.onBlockClick&&[o,a].forEach((function(t){t&&t.style("cursor","pointer").on("click",e.settings.onBlockClick)})),this.settings.tooltip.enabled&&[o,a].forEach((function(t){t&&(t.node().addEventListener("mouseout",(function(){e.tooltip&&(e.container.removeChild(e.tooltip),e.tooltip=null)})),t.node().addEventListener("mousemove",(function(t){e.tooltip||(e.tooltip=document.createElement("div"),e.tooltip.setAttribute("class","d3-funnel-tooltip"),e.container.appendChild(e.tooltip)),e.tooltip.innerText=i.tooltip.formatted;var n=e.tooltip.offsetWidth,r=e.tooltip.offsetHeight+5,o=e.container.getBoundingClientRect().y+window.scrollY,a=t.pageY-r<o?t.pageY+5:t.pageY-r,s=["display: inline-block","position: absolute","left: ".concat(t.pageX-n/2,"px"),"top: ".concat(a,"px"),"border: 1px solid ".concat(i.fill.raw),"background: rgb(255,255,255,0.75)","padding: 5px 15px","color: #000","font-size: 14px","font-weight: bold","text-align: center","cursor: default","pointer-events: none"];e.tooltip.setAttribute("style",s.join(";"))})))})),this.settings.label.enabled&&i.label.enabled&&this.addBlockLabel(n,t)}}},{key:"getBlockPath",value:function(t,e){var n=t.append("path");return 0!==this.settings.animation&&this.addBeforeTransition(n,e,!1),n}},{key:"getOverlayPath",value:function(t,e){var n=t.append("path");return 0!==this.settings.animation&&this.addBeforeTransition(n,e,!0),n}},{key:"addBeforeTransition",value:function(t,e,n){var r,i,o=n?this.overlayPaths[e]:this.blockPaths[e];r=this.settings.isCurved?this.navigator.plot([["M",o[0][0],o[0][1]],["Q",o[1][0],o[1][1]],[" ",o[2][0],o[2][1]],["L",o[2][0],o[2][1]],["M",o[2][0],o[2][1]],["Q",o[1][0],o[1][1]],[" ",o[0][0],o[0][1]]]):this.navigator.plot([["M",o[0][0],o[0][1]],["L",o[1][0],o[1][1]],["L",o[1][0],o[1][1]],["L",o[0][0],o[0][1]]]),i="solid"===this.settings.fillType&&e>0?this.blocks[e-1].fill.actual:this.blocks[e].fill.actual,t.attr("d",r).attr("fill",i)}},{key:"attachData",value:function(t,e){var n=Vn(Vn({},e),{},{node:t.node()});t.data([n])}},{key:"getPathDefinition",value:function(t){var e=[];return this.blockPaths[t].forEach((function(t){e.push([t[2],t[0],t[1]])})),this.navigator.plot(e)}},{key:"getOverlayPathDefinition",value:function(t){var e=[];return this.overlayPaths[t].forEach((function(t){e.push([t[2],t[0],t[1]])})),this.navigator.plot(e)}},{key:"onMouseOver",value:function(t,e){var n=this;Fn(t.target.parentElement.childNodes).forEach((function(t){"path"===t.nodeName.toLowerCase()&&("foreground"===(t.getAttribute("pathType")||"")?Et(t).attr("fill",n.colorizer.shade(e.fill.raw,-.5)):Et(t).attr("fill",n.colorizer.shade(e.fill.raw,-.2)))}))}},{key:"onMouseOut",value:function(t,e){var n=this;Fn(t.target.parentElement.childNodes).forEach((function(t){if("path"===t.nodeName.toLowerCase())if("background"===(t.getAttribute("pathType")||"")){var r=n.colorizer.shade(e.fill.raw,.3);Et(t).attr("fill",r)}else Et(t).attr("fill",e.fill.actual)}))}},{key:"addBlockLabel",value:function(t,e){var n=this.blockPaths[e],r=this.blocks[e].label.formatted,i=this.blocks[e].label.color,o=this.settings.width/2,a=this.getTextY(n),s=t.append("text").attr("x",o).attr("y",a).attr("fill",i).attr("font-size",this.settings.label.fontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("pointer-events","none");null!==this.settings.label.fontFamily&&s.attr("font-family",this.settings.label.fontFamily),this.addLabelLines(s,r,o)}},{key:"addLabelLines",value:function(t,e,n){var r=e.split("\n"),i=-20*(r.length-1)/2;r.forEach((function(e,r){var o=0===r?i:20;t.append("tspan").attr("x",n).attr("dy",o).text(e)}))}},{key:"getTextY",value:function(t){var e=this.settings,n=e.isCurved,r=e.curveHeight;return n?(t[2][1]+t[3][1])/2+1.5*r/this.blocks.length:(t[1][1]+t[2][1])/2}}],n&&Qn(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();$n(Gn,"defaults",{chart:{width:350,height:400,bottomWidth:1/3,bottomPinch:0,inverted:!1,horizontal:!1,animate:0,curve:{enabled:!1,height:20,shade:-.4},totalCount:null},block:{dynamicHeight:!1,dynamicSlope:!1,barOverlay:!1,fill:{scale:function t(){var e=new i,n=[],r=[],o=u;function a(t){let i=e.get(t);if(void 0===i){if(o!==u)return o;e.set(t,i=n.push(t)-1)}return r[i%r.length]}return a.domain=function(t){if(!arguments.length)return n.slice();n=[],e=new i;for(const r of t)e.has(r)||e.set(r,n.push(r)-1);return a},a.range=function(t){return arguments.length?(r=Array.from(t),a):r.slice()},a.unknown=function(t){return arguments.length?(o=t,a):o},a.copy=function(){return t(n,r).unknown(o)},s.apply(a,arguments),a}(l).domain(function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}(0,10)),type:"solid"},minHeight:0,highlight:!1},label:{enabled:!0,fontFamily:null,fontSize:"14px",fill:"#fff",format:"{l}: {f}"},tooltip:{enabled:!1,format:"{l}: {f}"},events:{click:{block:null}}});var Wn=Gn},579:function(t,e,n){t.exports=n(100).default}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n(579)}()}));
{
"name": "d3-funnel",
"version": "2.1.0",
"version": "2.1.1",
"description": "A library for rendering SVG funnel charts using D3.js",

@@ -5,0 +5,0 @@ "author": "Jake Zatecky",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc