ui.js.vendor.d3.d3-collection.min.js Maven / Gradle / Ivy
The newest version!
// https://d3js.org/d3-collection/ Version 1.0.0. Copyright 2016 Mike Bostock.
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(n.d3=n.d3||{})}(this,function(n){"use strict";function t(){}function e(n,e){var r=new t;if(n instanceof t)n.each(function(n,t){r.set(t,n)});else if(Array.isArray(n)){var i,u=-1,o=n.length;if(null==e)for(;++u=a.length)return null!=f?f(t):null!=r?t.sort(r):t;for(var s,c,h,l=-1,v=t.length,p=a[i++],y=e(),d=u();++la.length)return n;var r,i=h[e-1];return null!=f&&e>=a.length?r=n.entries():(r=[],n.each(function(n,i){r.push({key:i,values:t(n,e)})})),null!=i?r.sort(function(n,t){return i(n.key,t.key)}):r}var r,f,c,a=[],h=[];return c={object:function(t){return n(t,0,i,u)},map:function(t){return n(t,0,o,s)},entries:function(e){return t(n(e,0,o,s),0)},key:function(n){return a.push(n),c},sortKeys:function(n){return h[a.length-1]=n,c},sortValues:function(n){return r=n,c},rollup:function(n){return f=n,c}}}function i(){return{}}function u(n,t,e){n[t]=e}function o(){return e()}function s(n,t,e){n.set(t,e)}function f(){}function c(n,t){var e=new f;if(n instanceof f)n.each(function(n){e.add(n)});else if(n){var r=-1,i=n.length;if(null==t)for(;++r