portfolio/assets/js/d3.bundle.min.js

1 line
62 KiB
JavaScript
Raw Normal View History

2019-11-22 20:51:44 +00:00
var d3=function(T){"use strict";var o={value:function(){}};function q(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r)throw new Error("illegal type: "+t);r[t]=[]}return new i(r)}function i(t){this._=t}function s(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function h(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=o,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}i.prototype=q.prototype={constructor:i,on:function(t,n){var e,r,i=this._,o=(r=i,(t+"").trim().split(/^|\s+/).map(function(t){var n="",e=t.indexOf(".");if(0<=e&&(n=t.slice(e+1),t=t.slice(0,e)),t&&!r.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})),u=-1,a=o.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++u<a;)if(e=(t=o[u]).type)i[e]=h(i[e],t.name,n);else if(null==n)for(e in i)i[e]=h(i[e],t.name,null);return this}for(;++u<a;)if((e=(t=o[u]).type)&&(e=s(i[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new i(t)},call:function(t,n){if(0<(e=arguments.length-2))for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){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(n,e)}};var r="http://www.w3.org/1999/xhtml",u={svg:"http://www.w3.org/2000/svg",xhtml:r,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},a=function(t){var n=t+="",e=n.indexOf(":");return 0<=e&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),u.hasOwnProperty(n)?{space:u[n],local:t}:t};var c=function(t){var n=a(t);return(n.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===r&&t.documentElement.namespaceURI===r?t.createElement(e):t.createElementNS(n,e)}})(n)};function n(){}var p=function(t){return null==t?n:function(){return this.querySelector(t)}};function e(){return[]}var g=function(t){return null==t?e:function(){return this.querySelectorAll(t)}},t=function(t){return function(){return this.matches(t)}};if("undefined"!=typeof document){var l=document.documentElement;if(!l.matches){var f=l.webkitMatchesSelector||l.msMatchesSelector||l.mozMatchesSelector||l.oMatchesSelector;t=function(t){return function(){return f.call(this,t)}}}}var v=t,y=function(t){return new Array(t.length)};function d(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}d.prototype={constructor:d,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function b(t,n,e,r,i,o){for(var u,a=0,s=n.length,h=o.length;a<h;++a)(u=n[a])?(u.__data__=o[a],r[a]=u):e[a]=new d(t,o[a]);for(;a<s;++a)(u=n[a])&&(i[a]=u)}function N(t,n,e,r,i,o,u){var a,s,h,c={},l=n.length,f=o.length,p=new Array(l);for(a=0;a<l;++a)(s=n[a])&&(p[a]=h="$"+u.call(s,s.__data__,a,n),h in c?i[a]=s:c[h]=s);for(a=0;a<f;++a)(s=c[h="$"+u.call(t,o[a],a,o)])?((r[a]=s).__data__=o[a],c[h]=null):e[a]=new d(t,o[a]);for(a=0;a<l;++a)(s=n[a])&&c[p[a]]===s&&(i[a]=s)}function m(t,n){return t<n?-1:n<t?1:n<=t?0:NaN}var _=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function x(t,n){return t.style.getPropertyValue(n)||_(t).getComputedStyle(t,null).getPropertyValue(n)}function w(t){return t.trim().split(/^|\s+/)}function M(t){return t.classList||new k(t)}function k(t){this._node=t,this._names=w(t.getAttribute("class")||"")}function A(t,n){for(var e=M(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function z(t,n){for(v