d3-rails 4.13.0 → 5.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 18a0ec27fe627e942b3ca97eee413f4acf0b76fe
4
- data.tar.gz: 9aa7e1d1756e686c2aff00b945eb55534728077f
2
+ SHA256:
3
+ metadata.gz: 16859016b5682cf08f3225a91021125d9248d15c20596075d59f85711beb8482
4
+ data.tar.gz: c9e0adc64df61d839e590369baeb7c879a2ee2519d80a9c6ac40752b355518a0
5
5
  SHA512:
6
- metadata.gz: 686e70d7a8311476dc5e512c33025b061b8ae4be3df05399208365eadcc153f2b48ba25a3655b24b2c957f8af33f5b85b45fa8e12c0f66d78d7d5eb62705316f
7
- data.tar.gz: 99f2e5671619436d1bed399d4bff651c662a55f713fd2eb6aeb5fd475cdd116a7d1a996526e7d20b3c58c0ec1acca45cdfddb27723b90696a3bf21ec30c17c17
6
+ metadata.gz: f1755ca52805fc136d16c3ca094517af45fea5f1e44cf1e03f776c60ff552c39ca9b81dfc5f68ad3d862aff11908f7032038f7a3f9553e491a44bade558ae065
7
+ data.tar.gz: 91d58c15e8395c55082f4d1d45540dbb3c6e84547a8225b690b1d8f3f3d5c728ae3d26066b467ce1e1464420d4bc5089d54b042d00bfd689fc77b1ec15349d6b
@@ -1,3 +1,6 @@
1
+ ## 5.4.0 (25 May 2018)
2
+ * Upgrade D3 to 5.4.0
3
+
1
4
  ## 4.13.0 (05 Mar 2018)
2
5
  * Upgrade D3 to 4.13.0
3
6
 
data/README.md CHANGED
@@ -8,7 +8,7 @@ d3-rails provides D3 for Rails 3.1 and higher.
8
8
 
9
9
  ## Version
10
10
 
11
- d3-rails comes with version 4.13.0 of D3.js. The d3-rails version will
11
+ d3-rails comes with version 5.4.0 of D3.js. The d3-rails version will
12
12
  always mirror the version of D3. If you need a newer version of
13
13
  d3-rails, see section Development (below).
14
14
 
data/Rakefile CHANGED
@@ -4,11 +4,15 @@ Bundler::GemHelper.install_tasks
4
4
  namespace :d3 do
5
5
  desc 'Update d3 version'
6
6
  task :update_version do
7
- `curl -o app/assets/javascripts/d3.js https://d3js.org/d3.v4.js`
8
- `curl -o app/assets/javascripts/d3.min.js https://d3js.org/d3.v4.min.js`
9
- `cp app/assets/javascripts/d3.js app/assets/javascripts/d3.v4.js`
10
- `cp app/assets/javascripts/d3.min.js app/assets/javascripts/d3.v4.min.js`
11
- version = `grep 'version: ".*"' app/assets/javascripts/d3.js | cut -d '"' -f 2`.strip
7
+ `curl -o app/assets/javascripts/d3.js https://d3js.org/d3.v5.js`
8
+ `curl -o app/assets/javascripts/d3.min.js https://d3js.org/d3.v5.min.js`
9
+ `cp app/assets/javascripts/d3.js app/assets/javascripts/d3.v5.js`
10
+ `cp app/assets/javascripts/d3.min.js app/assets/javascripts/d3.v5.min.js`
11
+ version = File.open("app/assets/javascripts/d3.js") { |f|
12
+ f.each_line.lazy.select { |line|
13
+ line.match(/((\d+\.)(\d+\.)(\*|\d+))/)
14
+ }.first; $1
15
+ }
12
16
  message = <<-MSG
13
17
  Please update the version to #{version} manually in the following files:
14
18
  * CHANGELOG.md
@@ -1,11 +1,11 @@
1
- // https://d3js.org Version 4.13.0. Copyright 2018 Mike Bostock.
1
+ // https://d3js.org Version 5.4.0. Copyright 2018 Mike Bostock.
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
4
4
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
5
5
  (factory((global.d3 = global.d3 || {})));
6
6
  }(this, (function (exports) { 'use strict';
7
7
 
8
- var version = "4.13.0";
8
+ var version = "5.4.0";
9
9
 
10
10
  function ascending(a, b) {
11
11
  return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
@@ -190,9 +190,9 @@ function sequence(start, stop, step) {
190
190
  return range;
191
191
  }
192
192
 
193
- var e10 = Math.sqrt(50);
194
- var e5 = Math.sqrt(10);
195
- var e2 = Math.sqrt(2);
193
+ var e10 = Math.sqrt(50),
194
+ e5 = Math.sqrt(10),
195
+ e2 = Math.sqrt(2);
196
196
 
197
197
  function ticks(start, stop, count) {
198
198
  var reverse,
@@ -242,14 +242,14 @@ function tickStep(start, stop, count) {
242
242
  return stop < start ? -step1 : step1;
243
243
  }
244
244
 
245
- function sturges(values) {
245
+ function thresholdSturges(values) {
246
246
  return Math.ceil(Math.log(values.length) / Math.LN2) + 1;
247
247
  }
248
248
 
249
249
  function histogram() {
250
250
  var value = identity,
251
251
  domain = extent,
252
- threshold = sturges;
252
+ threshold = thresholdSturges;
253
253
 
254
254
  function histogram(data) {
255
255
  var i,
@@ -561,11 +561,11 @@ function identity$1(x) {
561
561
  return x;
562
562
  }
563
563
 
564
- var top = 1;
565
- var right = 2;
566
- var bottom = 3;
567
- var left = 4;
568
- var epsilon = 1e-6;
564
+ var top = 1,
565
+ right = 2,
566
+ bottom = 3,
567
+ left = 4,
568
+ epsilon = 1e-6;
569
569
 
570
570
  function translateX(x) {
571
571
  return "translate(" + (x + 0.5) + ",0)";
@@ -878,12 +878,12 @@ function selection_select(select) {
878
878
  return new Selection(subgroups, this._parents);
879
879
  }
880
880
 
881
- function empty$1() {
881
+ function empty() {
882
882
  return [];
883
883
  }
884
884
 
885
885
  function selectorAll(selector) {
886
- return selector == null ? empty$1 : function() {
886
+ return selector == null ? empty : function() {
887
887
  return this.querySelectorAll(selector);
888
888
  };
889
889
  }
@@ -1702,7 +1702,7 @@ function create(name) {
1702
1702
 
1703
1703
  var nextId = 0;
1704
1704
 
1705
- function local$1() {
1705
+ function local() {
1706
1706
  return new Local;
1707
1707
  }
1708
1708
 
@@ -1710,7 +1710,7 @@ function Local() {
1710
1710
  this._ = "@" + (++nextId).toString(36);
1711
1711
  }
1712
1712
 
1713
- Local.prototype = local$1.prototype = {
1713
+ Local.prototype = local.prototype = {
1714
1714
  constructor: Local,
1715
1715
  get: function(node) {
1716
1716
  var id = this._;
@@ -1793,9 +1793,9 @@ function noevent() {
1793
1793
 
1794
1794
  function dragDisable(view) {
1795
1795
  var root = view.document.documentElement,
1796
- selection = select(view).on("dragstart.drag", noevent, true);
1796
+ selection$$1 = select(view).on("dragstart.drag", noevent, true);
1797
1797
  if ("onselectstart" in root) {
1798
- selection.on("selectstart.drag", noevent, true);
1798
+ selection$$1.on("selectstart.drag", noevent, true);
1799
1799
  } else {
1800
1800
  root.__noselect = root.style.MozUserSelect;
1801
1801
  root.style.MozUserSelect = "none";
@@ -1804,13 +1804,13 @@ function dragDisable(view) {
1804
1804
 
1805
1805
  function yesdrag(view, noclick) {
1806
1806
  var root = view.document.documentElement,
1807
- selection = select(view).on("dragstart.drag", null);
1807
+ selection$$1 = select(view).on("dragstart.drag", null);
1808
1808
  if (noclick) {
1809
- selection.on("click.drag", noevent, true);
1810
- setTimeout(function() { selection.on("click.drag", null); }, 0);
1809
+ selection$$1.on("click.drag", noevent, true);
1810
+ setTimeout(function() { selection$$1.on("click.drag", null); }, 0);
1811
1811
  }
1812
1812
  if ("onselectstart" in root) {
1813
- selection.on("selectstart.drag", null);
1813
+ selection$$1.on("selectstart.drag", null);
1814
1814
  } else {
1815
1815
  root.style.MozUserSelect = root.__noselect;
1816
1816
  delete root.__noselect;
@@ -1842,7 +1842,7 @@ DragEvent.prototype.on = function() {
1842
1842
  };
1843
1843
 
1844
1844
  // Ignore right-click, since that should open the context menu.
1845
- function defaultFilter$1() {
1845
+ function defaultFilter() {
1846
1846
  return !exports.event.button;
1847
1847
  }
1848
1848
 
@@ -1859,7 +1859,7 @@ function defaultTouchable() {
1859
1859
  }
1860
1860
 
1861
1861
  function drag() {
1862
- var filter = defaultFilter$1,
1862
+ var filter = defaultFilter,
1863
1863
  container = defaultContainer,
1864
1864
  subject = defaultSubject,
1865
1865
  touchable = defaultTouchable,
@@ -1872,8 +1872,8 @@ function drag() {
1872
1872
  touchending,
1873
1873
  clickDistance2 = 0;
1874
1874
 
1875
- function drag(selection) {
1876
- selection
1875
+ function drag(selection$$1) {
1876
+ selection$$1
1877
1877
  .on("mousedown.drag", mousedowned)
1878
1878
  .filter(touchable)
1879
1879
  .on("touchstart.drag", touchstarted)
@@ -1914,12 +1914,12 @@ function drag() {
1914
1914
 
1915
1915
  function touchstarted() {
1916
1916
  if (!filter.apply(this, arguments)) return;
1917
- var touches = exports.event.changedTouches,
1917
+ var touches$$1 = exports.event.changedTouches,
1918
1918
  c = container.apply(this, arguments),
1919
- n = touches.length, i, gesture;
1919
+ n = touches$$1.length, i, gesture;
1920
1920
 
1921
1921
  for (i = 0; i < n; ++i) {
1922
- if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {
1922
+ if (gesture = beforestart(touches$$1[i].identifier, c, touch, this, arguments)) {
1923
1923
  nopropagation();
1924
1924
  gesture("start");
1925
1925
  }
@@ -1927,11 +1927,11 @@ function drag() {
1927
1927
  }
1928
1928
 
1929
1929
  function touchmoved() {
1930
- var touches = exports.event.changedTouches,
1931
- n = touches.length, i, gesture;
1930
+ var touches$$1 = exports.event.changedTouches,
1931
+ n = touches$$1.length, i, gesture;
1932
1932
 
1933
1933
  for (i = 0; i < n; ++i) {
1934
- if (gesture = gestures[touches[i].identifier]) {
1934
+ if (gesture = gestures[touches$$1[i].identifier]) {
1935
1935
  noevent();
1936
1936
  gesture("drag");
1937
1937
  }
@@ -1939,21 +1939,21 @@ function drag() {
1939
1939
  }
1940
1940
 
1941
1941
  function touchended() {
1942
- var touches = exports.event.changedTouches,
1943
- n = touches.length, i, gesture;
1942
+ var touches$$1 = exports.event.changedTouches,
1943
+ n = touches$$1.length, i, gesture;
1944
1944
 
1945
1945
  if (touchending) clearTimeout(touchending);
1946
1946
  touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
1947
1947
  for (i = 0; i < n; ++i) {
1948
- if (gesture = gestures[touches[i].identifier]) {
1948
+ if (gesture = gestures[touches$$1[i].identifier]) {
1949
1949
  nopropagation();
1950
1950
  gesture("end");
1951
1951
  }
1952
1952
  }
1953
1953
  }
1954
1954
 
1955
- function beforestart(id, container, point, that, args) {
1956
- var p = point(container, id), s, dx, dy,
1955
+ function beforestart(id, container, point$$1, that, args) {
1956
+ var p = point$$1(container, id), s, dx, dy,
1957
1957
  sublisteners = listeners.copy();
1958
1958
 
1959
1959
  if (!customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {
@@ -1968,7 +1968,7 @@ function drag() {
1968
1968
  switch (type) {
1969
1969
  case "start": gestures[id] = gesture, n = active++; break;
1970
1970
  case "end": delete gestures[id], --active; // nobreak
1971
- case "drag": p = point(container, id), n = active; break;
1971
+ case "drag": p = point$$1(container, id), n = active; break;
1972
1972
  }
1973
1973
  customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);
1974
1974
  };
@@ -2018,17 +2018,17 @@ function Color() {}
2018
2018
  var darker = 0.7;
2019
2019
  var brighter = 1 / darker;
2020
2020
 
2021
- var reI = "\\s*([+-]?\\d+)\\s*";
2022
- var reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*";
2023
- var reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*";
2024
- var reHex3 = /^#([0-9a-f]{3})$/;
2025
- var reHex6 = /^#([0-9a-f]{6})$/;
2026
- var reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$");
2027
- var reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$");
2028
- var reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$");
2029
- var reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$");
2030
- var reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$");
2031
- var reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
2021
+ var reI = "\\s*([+-]?\\d+)\\s*",
2022
+ reN = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",
2023
+ reP = "\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",
2024
+ reHex3 = /^#([0-9a-f]{3})$/,
2025
+ reHex6 = /^#([0-9a-f]{6})$/,
2026
+ reRgbInteger = new RegExp("^rgb\\(" + [reI, reI, reI] + "\\)$"),
2027
+ reRgbPercent = new RegExp("^rgb\\(" + [reP, reP, reP] + "\\)$"),
2028
+ reRgbaInteger = new RegExp("^rgba\\(" + [reI, reI, reI, reN] + "\\)$"),
2029
+ reRgbaPercent = new RegExp("^rgba\\(" + [reP, reP, reP, reN] + "\\)$"),
2030
+ reHslPercent = new RegExp("^hsl\\(" + [reN, reP, reP] + "\\)$"),
2031
+ reHslaPercent = new RegExp("^hsla\\(" + [reN, reP, reP, reN] + "\\)$");
2032
2032
 
2033
2033
  var named = {
2034
2034
  aliceblue: 0xf0f8ff,
@@ -2185,6 +2185,9 @@ define(Color, color, {
2185
2185
  displayable: function() {
2186
2186
  return this.rgb().displayable();
2187
2187
  },
2188
+ hex: function() {
2189
+ return this.rgb().hex();
2190
+ },
2188
2191
  toString: function() {
2189
2192
  return this.rgb() + "";
2190
2193
  }
@@ -2251,6 +2254,9 @@ define(Rgb, rgb, extend(Color, {
2251
2254
  && (0 <= this.b && this.b <= 255)
2252
2255
  && (0 <= this.opacity && this.opacity <= 1);
2253
2256
  },
2257
+ hex: function() {
2258
+ return "#" + hex(this.r) + hex(this.g) + hex(this.b);
2259
+ },
2254
2260
  toString: function() {
2255
2261
  var a = this.opacity; a = isNaN(a) ? 1 : Math.max(0, Math.min(1, a));
2256
2262
  return (a === 1 ? "rgb(" : "rgba(")
@@ -2261,6 +2267,11 @@ define(Rgb, rgb, extend(Color, {
2261
2267
  }
2262
2268
  }));
2263
2269
 
2270
+ function hex(value) {
2271
+ value = Math.max(0, Math.min(255, Math.round(value) || 0));
2272
+ return (value < 16 ? "0" : "") + value.toString(16);
2273
+ }
2274
+
2264
2275
  function hsla(h, s, l, a) {
2265
2276
  if (a <= 0) h = s = l = NaN;
2266
2277
  else if (l <= 0 || l >= 1) h = s = NaN;
@@ -2345,31 +2356,39 @@ function hsl2rgb(h, m1, m2) {
2345
2356
  var deg2rad = Math.PI / 180;
2346
2357
  var rad2deg = 180 / Math.PI;
2347
2358
 
2348
- var Kn = 18;
2349
- var Xn = 0.950470;
2350
- var Yn = 1;
2351
- var Zn = 1.088830;
2352
- var t0 = 4 / 29;
2353
- var t1 = 6 / 29;
2354
- var t2 = 3 * t1 * t1;
2355
- var t3 = t1 * t1 * t1;
2359
+ // https://beta.observablehq.com/@mbostock/lab-and-rgb
2360
+ var K = 18,
2361
+ Xn = 0.96422,
2362
+ Yn = 1,
2363
+ Zn = 0.82521,
2364
+ t0 = 4 / 29,
2365
+ t1 = 6 / 29,
2366
+ t2 = 3 * t1 * t1,
2367
+ t3 = t1 * t1 * t1;
2356
2368
 
2357
2369
  function labConvert(o) {
2358
2370
  if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
2359
2371
  if (o instanceof Hcl) {
2372
+ if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
2360
2373
  var h = o.h * deg2rad;
2361
2374
  return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
2362
2375
  }
2363
2376
  if (!(o instanceof Rgb)) o = rgbConvert(o);
2364
- var b = rgb2xyz(o.r),
2365
- a = rgb2xyz(o.g),
2366
- l = rgb2xyz(o.b),
2367
- x = xyz2lab((0.4124564 * b + 0.3575761 * a + 0.1804375 * l) / Xn),
2368
- y = xyz2lab((0.2126729 * b + 0.7151522 * a + 0.0721750 * l) / Yn),
2369
- z = xyz2lab((0.0193339 * b + 0.1191920 * a + 0.9503041 * l) / Zn);
2377
+ var r = rgb2lrgb(o.r),
2378
+ g = rgb2lrgb(o.g),
2379
+ b = rgb2lrgb(o.b),
2380
+ y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn), x, z;
2381
+ if (r === g && g === b) x = z = y; else {
2382
+ x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
2383
+ z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
2384
+ }
2370
2385
  return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
2371
2386
  }
2372
2387
 
2388
+ function gray(l, opacity) {
2389
+ return new Lab(l, 0, 0, opacity == null ? 1 : opacity);
2390
+ }
2391
+
2373
2392
  function lab(l, a, b, opacity) {
2374
2393
  return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
2375
2394
  }
@@ -2383,22 +2402,22 @@ function Lab(l, a, b, opacity) {
2383
2402
 
2384
2403
  define(Lab, lab, extend(Color, {
2385
2404
  brighter: function(k) {
2386
- return new Lab(this.l + Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
2405
+ return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
2387
2406
  },
2388
2407
  darker: function(k) {
2389
- return new Lab(this.l - Kn * (k == null ? 1 : k), this.a, this.b, this.opacity);
2408
+ return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
2390
2409
  },
2391
2410
  rgb: function() {
2392
2411
  var y = (this.l + 16) / 116,
2393
2412
  x = isNaN(this.a) ? y : y + this.a / 500,
2394
2413
  z = isNaN(this.b) ? y : y - this.b / 200;
2395
- y = Yn * lab2xyz(y);
2396
2414
  x = Xn * lab2xyz(x);
2415
+ y = Yn * lab2xyz(y);
2397
2416
  z = Zn * lab2xyz(z);
2398
2417
  return new Rgb(
2399
- xyz2rgb( 3.2404542 * x - 1.5371385 * y - 0.4985314 * z), // D65 -> sRGB
2400
- xyz2rgb(-0.9692660 * x + 1.8760108 * y + 0.0415560 * z),
2401
- xyz2rgb( 0.0556434 * x - 0.2040259 * y + 1.0572252 * z),
2418
+ lrgb2rgb( 3.1338561 * x - 1.6168667 * y - 0.4906146 * z),
2419
+ lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z),
2420
+ lrgb2rgb( 0.0719453 * x - 0.2289914 * y + 1.4052427 * z),
2402
2421
  this.opacity
2403
2422
  );
2404
2423
  }
@@ -2412,21 +2431,26 @@ function lab2xyz(t) {
2412
2431
  return t > t1 ? t * t * t : t2 * (t - t0);
2413
2432
  }
2414
2433
 
2415
- function xyz2rgb(x) {
2434
+ function lrgb2rgb(x) {
2416
2435
  return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
2417
2436
  }
2418
2437
 
2419
- function rgb2xyz(x) {
2438
+ function rgb2lrgb(x) {
2420
2439
  return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
2421
2440
  }
2422
2441
 
2423
2442
  function hclConvert(o) {
2424
2443
  if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
2425
2444
  if (!(o instanceof Lab)) o = labConvert(o);
2445
+ if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0, o.l, o.opacity);
2426
2446
  var h = Math.atan2(o.b, o.a) * rad2deg;
2427
2447
  return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
2428
2448
  }
2429
2449
 
2450
+ function lch(l, c, h, opacity) {
2451
+ return arguments.length === 1 ? hclConvert(l) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
2452
+ }
2453
+
2430
2454
  function hcl(h, c, l, opacity) {
2431
2455
  return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
2432
2456
  }
@@ -2440,24 +2464,24 @@ function Hcl(h, c, l, opacity) {
2440
2464
 
2441
2465
  define(Hcl, hcl, extend(Color, {
2442
2466
  brighter: function(k) {
2443
- return new Hcl(this.h, this.c, this.l + Kn * (k == null ? 1 : k), this.opacity);
2467
+ return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
2444
2468
  },
2445
2469
  darker: function(k) {
2446
- return new Hcl(this.h, this.c, this.l - Kn * (k == null ? 1 : k), this.opacity);
2470
+ return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
2447
2471
  },
2448
2472
  rgb: function() {
2449
2473
  return labConvert(this).rgb();
2450
2474
  }
2451
2475
  }));
2452
2476
 
2453
- var A = -0.14861;
2454
- var B = +1.78277;
2455
- var C = -0.29227;
2456
- var D = -0.90649;
2457
- var E = +1.97294;
2458
- var ED = E * D;
2459
- var EB = E * B;
2460
- var BC_DA = B * C - D * A;
2477
+ var A = -0.14861,
2478
+ B = +1.78277,
2479
+ C = -0.29227,
2480
+ D = -0.90649,
2481
+ E = +1.97294,
2482
+ ED = E * D,
2483
+ EB = E * B,
2484
+ BC_DA = B * C - D * A;
2461
2485
 
2462
2486
  function cubehelixConvert(o) {
2463
2487
  if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
@@ -2676,8 +2700,8 @@ function object(a, b) {
2676
2700
  };
2677
2701
  }
2678
2702
 
2679
- var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g;
2680
- var reB = new RegExp(reA.source, "g");
2703
+ var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
2704
+ reB = new RegExp(reA.source, "g");
2681
2705
 
2682
2706
  function zero(b) {
2683
2707
  return function() {
@@ -2784,10 +2808,10 @@ function decompose(a, b, c, d, e, f) {
2784
2808
  };
2785
2809
  }
2786
2810
 
2787
- var cssNode;
2788
- var cssRoot;
2789
- var cssView;
2790
- var svgNode;
2811
+ var cssNode,
2812
+ cssRoot,
2813
+ cssView,
2814
+ svgNode;
2791
2815
 
2792
2816
  function parseCss(value) {
2793
2817
  if (value === "none") return identity$2;
@@ -2869,10 +2893,10 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
2869
2893
  var interpolateTransformCss = interpolateTransform(parseCss, "px, ", "px)", "deg)");
2870
2894
  var interpolateTransformSvg = interpolateTransform(parseSvg, ", ", ")", ")");
2871
2895
 
2872
- var rho = Math.SQRT2;
2873
- var rho2 = 2;
2874
- var rho4 = 4;
2875
- var epsilon2 = 1e-12;
2896
+ var rho = Math.SQRT2,
2897
+ rho2 = 2,
2898
+ rho4 = 4,
2899
+ epsilon2 = 1e-12;
2876
2900
 
2877
2901
  function cosh(x) {
2878
2902
  return ((x = Math.exp(x)) + 1 / x) / 2;
@@ -3013,23 +3037,32 @@ function cubehelix$1(hue$$1) {
3013
3037
  var cubehelix$2 = cubehelix$1(hue);
3014
3038
  var cubehelixLong = cubehelix$1(nogamma);
3015
3039
 
3040
+ function piecewise(interpolate, values) {
3041
+ var i = 0, n = values.length - 1, v = values[0], I = new Array(n < 0 ? 0 : n);
3042
+ while (i < n) I[i] = interpolate(v, v = values[++i]);
3043
+ return function(t) {
3044
+ var i = Math.max(0, Math.min(n - 1, Math.floor(t *= n)));
3045
+ return I[i](t - i);
3046
+ };
3047
+ }
3048
+
3016
3049
  function quantize(interpolator, n) {
3017
3050
  var samples = new Array(n);
3018
3051
  for (var i = 0; i < n; ++i) samples[i] = interpolator(i / (n - 1));
3019
3052
  return samples;
3020
3053
  }
3021
3054
 
3022
- var frame = 0;
3023
- var timeout = 0;
3024
- var interval = 0;
3025
- var pokeDelay = 1000;
3026
- var taskHead;
3027
- var taskTail;
3028
- var clockLast = 0;
3029
- var clockNow = 0;
3030
- var clockSkew = 0;
3031
- var clock = typeof performance === "object" && performance.now ? performance : Date;
3032
- var setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
3055
+ var frame = 0, // is an animation frame pending?
3056
+ timeout = 0, // is a timeout pending?
3057
+ interval = 0, // are any timers active?
3058
+ pokeDelay = 1000, // how frequently we check for clock skew
3059
+ taskHead,
3060
+ taskTail,
3061
+ clockLast = 0,
3062
+ clockNow = 0,
3063
+ clockSkew = 0,
3064
+ clock = typeof performance === "object" && performance.now ? performance : Date,
3065
+ setFrame = typeof window === "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(f) { setTimeout(f, 17); };
3033
3066
 
3034
3067
  function now() {
3035
3068
  return clockNow || (setFrame(clearNow), clockNow = clock.now() + clockSkew);
@@ -3657,15 +3690,15 @@ function transition_remove() {
3657
3690
  return this.on("end.remove", removeFunction(this._id));
3658
3691
  }
3659
3692
 
3660
- function transition_select(select) {
3693
+ function transition_select(select$$1) {
3661
3694
  var name = this._name,
3662
3695
  id = this._id;
3663
3696
 
3664
- if (typeof select !== "function") select = selector(select);
3697
+ if (typeof select$$1 !== "function") select$$1 = selector(select$$1);
3665
3698
 
3666
3699
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
3667
3700
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
3668
- if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
3701
+ if ((node = group[i]) && (subnode = select$$1.call(node, node.__data__, i, group))) {
3669
3702
  if ("__data__" in node) subnode.__data__ = node.__data__;
3670
3703
  subgroup[i] = subnode;
3671
3704
  schedule(subgroup[i], name, id, i, subgroup, get$1(node, id));
@@ -3676,16 +3709,16 @@ function transition_select(select) {
3676
3709
  return new Transition(subgroups, this._parents, name, id);
3677
3710
  }
3678
3711
 
3679
- function transition_selectAll(select) {
3712
+ function transition_selectAll(select$$1) {
3680
3713
  var name = this._name,
3681
3714
  id = this._id;
3682
3715
 
3683
- if (typeof select !== "function") select = selectorAll(select);
3716
+ if (typeof select$$1 !== "function") select$$1 = selectorAll(select$$1);
3684
3717
 
3685
3718
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
3686
3719
  for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
3687
3720
  if (node = group[i]) {
3688
- for (var children = select.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) {
3721
+ for (var children = select$$1.call(node, node.__data__, i, group), child, inherit = get$1(node, id), k = 0, l = children.length; k < l; ++k) {
3689
3722
  if (child = children[k]) {
3690
3723
  schedule(child, name, id, k, children, inherit);
3691
3724
  }
@@ -3931,8 +3964,8 @@ var polyInOut = (function custom(e) {
3931
3964
  return polyInOut;
3932
3965
  })(exponent);
3933
3966
 
3934
- var pi = Math.PI;
3935
- var halfPi = pi / 2;
3967
+ var pi = Math.PI,
3968
+ halfPi = pi / 2;
3936
3969
 
3937
3970
  function sinIn(t) {
3938
3971
  return 1 - Math.cos(t * halfPi);
@@ -3970,16 +4003,16 @@ function circleInOut(t) {
3970
4003
  return ((t *= 2) <= 1 ? 1 - Math.sqrt(1 - t * t) : Math.sqrt(1 - (t -= 2) * t) + 1) / 2;
3971
4004
  }
3972
4005
 
3973
- var b1 = 4 / 11;
3974
- var b2 = 6 / 11;
3975
- var b3 = 8 / 11;
3976
- var b4 = 3 / 4;
3977
- var b5 = 9 / 11;
3978
- var b6 = 10 / 11;
3979
- var b7 = 15 / 16;
3980
- var b8 = 21 / 22;
3981
- var b9 = 63 / 64;
3982
- var b0 = 1 / b1 / b1;
4006
+ var b1 = 4 / 11,
4007
+ b2 = 6 / 11,
4008
+ b3 = 8 / 11,
4009
+ b4 = 3 / 4,
4010
+ b5 = 9 / 11,
4011
+ b6 = 10 / 11,
4012
+ b7 = 15 / 16,
4013
+ b8 = 21 / 22,
4014
+ b9 = 63 / 64,
4015
+ b0 = 1 / b1 / b1;
3983
4016
 
3984
4017
  function bounceIn(t) {
3985
4018
  return 1 - bounceOut(1 - t);
@@ -4031,9 +4064,9 @@ var backInOut = (function custom(s) {
4031
4064
  return backInOut;
4032
4065
  })(overshoot);
4033
4066
 
4034
- var tau = 2 * Math.PI;
4035
- var amplitude = 1;
4036
- var period = 0.3;
4067
+ var tau = 2 * Math.PI,
4068
+ amplitude = 1,
4069
+ period = 0.3;
4037
4070
 
4038
4071
  var elasticIn = (function custom(a, p) {
4039
4072
  var s = Math.asin(1 / (a = Math.max(1, a))) * (p /= tau);
@@ -4157,10 +4190,10 @@ function noevent$1() {
4157
4190
  exports.event.stopImmediatePropagation();
4158
4191
  }
4159
4192
 
4160
- var MODE_DRAG = {name: "drag"};
4161
- var MODE_SPACE = {name: "space"};
4162
- var MODE_HANDLE = {name: "handle"};
4163
- var MODE_CENTER = {name: "center"};
4193
+ var MODE_DRAG = {name: "drag"},
4194
+ MODE_SPACE = {name: "space"},
4195
+ MODE_HANDLE = {name: "handle"},
4196
+ MODE_CENTER = {name: "center"};
4164
4197
 
4165
4198
  var X = {
4166
4199
  name: "x",
@@ -4245,7 +4278,7 @@ function type(t) {
4245
4278
  }
4246
4279
 
4247
4280
  // Ignore right-click, since that should open the context menu.
4248
- function defaultFilter() {
4281
+ function defaultFilter$1() {
4249
4282
  return !exports.event.button;
4250
4283
  }
4251
4284
 
@@ -4255,12 +4288,12 @@ function defaultExtent() {
4255
4288
  }
4256
4289
 
4257
4290
  // Like d3.local, but with the name “__brush” rather than auto-generated.
4258
- function local(node) {
4291
+ function local$1(node) {
4259
4292
  while (!node.__brush) if (!(node = node.parentNode)) return;
4260
4293
  return node.__brush;
4261
4294
  }
4262
4295
 
4263
- function empty(extent) {
4296
+ function empty$1(extent) {
4264
4297
  return extent[0][0] === extent[1][0]
4265
4298
  || extent[0][1] === extent[1][1];
4266
4299
  }
@@ -4284,7 +4317,7 @@ function brush() {
4284
4317
 
4285
4318
  function brush$1(dim) {
4286
4319
  var extent = defaultExtent,
4287
- filter = defaultFilter,
4320
+ filter = defaultFilter$1,
4288
4321
  listeners = dispatch(brush, "start", "brush", "end"),
4289
4322
  handleSize = 6,
4290
4323
  touchending;
@@ -4301,7 +4334,7 @@ function brush$1(dim) {
4301
4334
  .attr("cursor", cursors.overlay)
4302
4335
  .merge(overlay)
4303
4336
  .each(function() {
4304
- var extent = local(this).extent;
4337
+ var extent = local$1(this).extent;
4305
4338
  select(this)
4306
4339
  .attr("x", extent[0][0])
4307
4340
  .attr("y", extent[0][1])
@@ -4336,7 +4369,7 @@ function brush$1(dim) {
4336
4369
  .on("mousedown.brush touchstart.brush", started);
4337
4370
  }
4338
4371
 
4339
- brush.move = function(group, selection) {
4372
+ brush.move = function(group, selection$$1) {
4340
4373
  if (group.selection) {
4341
4374
  group
4342
4375
  .on("start.brush", function() { emitter(this, arguments).beforestart().start(); })
@@ -4346,11 +4379,11 @@ function brush$1(dim) {
4346
4379
  state = that.__brush,
4347
4380
  emit = emitter(that, arguments),
4348
4381
  selection0 = state.selection,
4349
- selection1 = dim.input(typeof selection === "function" ? selection.apply(this, arguments) : selection, state.extent),
4382
+ selection1 = dim.input(typeof selection$$1 === "function" ? selection$$1.apply(this, arguments) : selection$$1, state.extent),
4350
4383
  i = interpolateValue(selection0, selection1);
4351
4384
 
4352
4385
  function tween(t) {
4353
- state.selection = t === 1 && empty(selection1) ? null : i(t);
4386
+ state.selection = t === 1 && empty$1(selection1) ? null : i(t);
4354
4387
  redraw.call(that);
4355
4388
  emit.brush();
4356
4389
  }
@@ -4363,11 +4396,11 @@ function brush$1(dim) {
4363
4396
  var that = this,
4364
4397
  args = arguments,
4365
4398
  state = that.__brush,
4366
- selection1 = dim.input(typeof selection === "function" ? selection.apply(that, args) : selection, state.extent),
4399
+ selection1 = dim.input(typeof selection$$1 === "function" ? selection$$1.apply(that, args) : selection$$1, state.extent),
4367
4400
  emit = emitter(that, args).beforestart();
4368
4401
 
4369
4402
  interrupt(that);
4370
- state.selection = selection1 == null || empty(selection1) ? null : selection1;
4403
+ state.selection = selection1 == null || empty$1(selection1) ? null : selection1;
4371
4404
  redraw.call(that);
4372
4405
  emit.start().brush().end();
4373
4406
  });
@@ -4376,22 +4409,22 @@ function brush$1(dim) {
4376
4409
 
4377
4410
  function redraw() {
4378
4411
  var group = select(this),
4379
- selection = local(this).selection;
4412
+ selection$$1 = local$1(this).selection;
4380
4413
 
4381
- if (selection) {
4414
+ if (selection$$1) {
4382
4415
  group.selectAll(".selection")
4383
4416
  .style("display", null)
4384
- .attr("x", selection[0][0])
4385
- .attr("y", selection[0][1])
4386
- .attr("width", selection[1][0] - selection[0][0])
4387
- .attr("height", selection[1][1] - selection[0][1]);
4417
+ .attr("x", selection$$1[0][0])
4418
+ .attr("y", selection$$1[0][1])
4419
+ .attr("width", selection$$1[1][0] - selection$$1[0][0])
4420
+ .attr("height", selection$$1[1][1] - selection$$1[0][1]);
4388
4421
 
4389
4422
  group.selectAll(".handle")
4390
4423
  .style("display", null)
4391
- .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection[1][0] - handleSize / 2 : selection[0][0] - handleSize / 2; })
4392
- .attr("y", function(d) { return d.type[0] === "s" ? selection[1][1] - handleSize / 2 : selection[0][1] - handleSize / 2; })
4393
- .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection[1][0] - selection[0][0] + handleSize : handleSize; })
4394
- .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection[1][1] - selection[0][1] + handleSize : handleSize; });
4424
+ .attr("x", function(d) { return d.type[d.type.length - 1] === "e" ? selection$$1[1][0] - handleSize / 2 : selection$$1[0][0] - handleSize / 2; })
4425
+ .attr("y", function(d) { return d.type[0] === "s" ? selection$$1[1][1] - handleSize / 2 : selection$$1[0][1] - handleSize / 2; })
4426
+ .attr("width", function(d) { return d.type === "n" || d.type === "s" ? selection$$1[1][0] - selection$$1[0][0] + handleSize : handleSize; })
4427
+ .attr("height", function(d) { return d.type === "e" || d.type === "w" ? selection$$1[1][1] - selection$$1[0][1] + handleSize : handleSize; });
4395
4428
  }
4396
4429
 
4397
4430
  else {
@@ -4447,9 +4480,9 @@ function brush$1(dim) {
4447
4480
  mode = (exports.event.metaKey ? type = "overlay" : type) === "selection" ? MODE_DRAG : (exports.event.altKey ? MODE_CENTER : MODE_HANDLE),
4448
4481
  signX = dim === Y ? null : signsX[type],
4449
4482
  signY = dim === X ? null : signsY[type],
4450
- state = local(that),
4483
+ state = local$1(that),
4451
4484
  extent = state.extent,
4452
- selection = state.selection,
4485
+ selection$$1 = state.selection,
4453
4486
  W = extent[0][0], w0, w1,
4454
4487
  N = extent[0][1], n0, n1,
4455
4488
  E = extent[1][0], e0, e1,
@@ -4461,19 +4494,19 @@ function brush$1(dim) {
4461
4494
  lockX,
4462
4495
  lockY,
4463
4496
  point0 = mouse(that),
4464
- point = point0,
4497
+ point$$1 = point0,
4465
4498
  emit = emitter(that, arguments).beforestart();
4466
4499
 
4467
4500
  if (type === "overlay") {
4468
- state.selection = selection = [
4501
+ state.selection = selection$$1 = [
4469
4502
  [w0 = dim === Y ? W : point0[0], n0 = dim === X ? N : point0[1]],
4470
4503
  [e0 = dim === Y ? E : w0, s0 = dim === X ? S : n0]
4471
4504
  ];
4472
4505
  } else {
4473
- w0 = selection[0][0];
4474
- n0 = selection[0][1];
4475
- e0 = selection[1][0];
4476
- s0 = selection[1][1];
4506
+ w0 = selection$$1[0][0];
4507
+ n0 = selection$$1[0][1];
4508
+ e0 = selection$$1[1][0];
4509
+ s0 = selection$$1[1][1];
4477
4510
  }
4478
4511
 
4479
4512
  w1 = w0;
@@ -4509,10 +4542,10 @@ function brush$1(dim) {
4509
4542
  function moved() {
4510
4543
  var point1 = mouse(that);
4511
4544
  if (shifting && !lockX && !lockY) {
4512
- if (Math.abs(point1[0] - point[0]) > Math.abs(point1[1] - point[1])) lockY = true;
4545
+ if (Math.abs(point1[0] - point$$1[0]) > Math.abs(point1[1] - point$$1[1])) lockY = true;
4513
4546
  else lockX = true;
4514
4547
  }
4515
- point = point1;
4548
+ point$$1 = point1;
4516
4549
  moving = true;
4517
4550
  noevent$1();
4518
4551
  move();
@@ -4521,8 +4554,8 @@ function brush$1(dim) {
4521
4554
  function move() {
4522
4555
  var t;
4523
4556
 
4524
- dx = point[0] - point0[0];
4525
- dy = point[1] - point0[1];
4557
+ dx = point$$1[0] - point0[0];
4558
+ dy = point$$1[1] - point0[1];
4526
4559
 
4527
4560
  switch (mode) {
4528
4561
  case MODE_SPACE:
@@ -4559,14 +4592,14 @@ function brush$1(dim) {
4559
4592
  if (type in flipY) overlay.attr("cursor", cursors[type = flipY[type]]);
4560
4593
  }
4561
4594
 
4562
- if (state.selection) selection = state.selection; // May be set by brush.move!
4563
- if (lockX) w1 = selection[0][0], e1 = selection[1][0];
4564
- if (lockY) n1 = selection[0][1], s1 = selection[1][1];
4595
+ if (state.selection) selection$$1 = state.selection; // May be set by brush.move!
4596
+ if (lockX) w1 = selection$$1[0][0], e1 = selection$$1[1][0];
4597
+ if (lockY) n1 = selection$$1[0][1], s1 = selection$$1[1][1];
4565
4598
 
4566
- if (selection[0][0] !== w1
4567
- || selection[0][1] !== n1
4568
- || selection[1][0] !== e1
4569
- || selection[1][1] !== s1) {
4599
+ if (selection$$1[0][0] !== w1
4600
+ || selection$$1[0][1] !== n1
4601
+ || selection$$1[1][0] !== e1
4602
+ || selection$$1[1][1] !== s1) {
4570
4603
  state.selection = [[w1, n1], [e1, s1]];
4571
4604
  redraw.call(that);
4572
4605
  emit.brush();
@@ -4586,8 +4619,8 @@ function brush$1(dim) {
4586
4619
  }
4587
4620
  group.attr("pointer-events", "all");
4588
4621
  overlay.attr("cursor", cursors.overlay);
4589
- if (state.selection) selection = state.selection; // May be set by brush.move (on start)!
4590
- if (empty(selection)) state.selection = null, redraw.call(that);
4622
+ if (state.selection) selection$$1 = state.selection; // May be set by brush.move (on start)!
4623
+ if (empty$1(selection$$1)) state.selection = null, redraw.call(that);
4591
4624
  emit.end();
4592
4625
  }
4593
4626
 
@@ -4822,10 +4855,10 @@ function constant$5(x) {
4822
4855
  };
4823
4856
  }
4824
4857
 
4825
- var pi$2 = Math.PI;
4826
- var tau$2 = 2 * pi$2;
4827
- var epsilon$1 = 1e-6;
4828
- var tauEpsilon = tau$2 - epsilon$1;
4858
+ var pi$2 = Math.PI,
4859
+ tau$2 = 2 * pi$2,
4860
+ epsilon$1 = 1e-6,
4861
+ tauEpsilon = tau$2 - epsilon$1;
4829
4862
 
4830
4863
  function Path() {
4831
4864
  this._x0 = this._y0 = // start of current subpath
@@ -5234,11 +5267,419 @@ function entries(map) {
5234
5267
  return entries;
5235
5268
  }
5236
5269
 
5237
- var EOL = {};
5238
- var EOF = {};
5239
- var QUOTE = 34;
5240
- var NEWLINE = 10;
5241
- var RETURN = 13;
5270
+ var array$2 = Array.prototype;
5271
+
5272
+ var slice$3 = array$2.slice;
5273
+
5274
+ function ascending$2(a, b) {
5275
+ return a - b;
5276
+ }
5277
+
5278
+ function area(ring) {
5279
+ var i = 0, n = ring.length, area = ring[n - 1][1] * ring[0][0] - ring[n - 1][0] * ring[0][1];
5280
+ while (++i < n) area += ring[i - 1][1] * ring[i][0] - ring[i - 1][0] * ring[i][1];
5281
+ return area;
5282
+ }
5283
+
5284
+ function constant$6(x) {
5285
+ return function() {
5286
+ return x;
5287
+ };
5288
+ }
5289
+
5290
+ function contains(ring, hole) {
5291
+ var i = -1, n = hole.length, c;
5292
+ while (++i < n) if (c = ringContains(ring, hole[i])) return c;
5293
+ return 0;
5294
+ }
5295
+
5296
+ function ringContains(ring, point) {
5297
+ var x = point[0], y = point[1], contains = -1;
5298
+ for (var i = 0, n = ring.length, j = n - 1; i < n; j = i++) {
5299
+ var pi = ring[i], xi = pi[0], yi = pi[1], pj = ring[j], xj = pj[0], yj = pj[1];
5300
+ if (segmentContains(pi, pj, point)) return 0;
5301
+ if (((yi > y) !== (yj > y)) && ((x < (xj - xi) * (y - yi) / (yj - yi) + xi))) contains = -contains;
5302
+ }
5303
+ return contains;
5304
+ }
5305
+
5306
+ function segmentContains(a, b, c) {
5307
+ var i; return collinear(a, b, c) && within(a[i = +(a[0] === b[0])], c[i], b[i]);
5308
+ }
5309
+
5310
+ function collinear(a, b, c) {
5311
+ return (b[0] - a[0]) * (c[1] - a[1]) === (c[0] - a[0]) * (b[1] - a[1]);
5312
+ }
5313
+
5314
+ function within(p, q, r) {
5315
+ return p <= q && q <= r || r <= q && q <= p;
5316
+ }
5317
+
5318
+ function noop$1() {}
5319
+
5320
+ var cases = [
5321
+ [],
5322
+ [[[1.0, 1.5], [0.5, 1.0]]],
5323
+ [[[1.5, 1.0], [1.0, 1.5]]],
5324
+ [[[1.5, 1.0], [0.5, 1.0]]],
5325
+ [[[1.0, 0.5], [1.5, 1.0]]],
5326
+ [[[1.0, 1.5], [0.5, 1.0]], [[1.0, 0.5], [1.5, 1.0]]],
5327
+ [[[1.0, 0.5], [1.0, 1.5]]],
5328
+ [[[1.0, 0.5], [0.5, 1.0]]],
5329
+ [[[0.5, 1.0], [1.0, 0.5]]],
5330
+ [[[1.0, 1.5], [1.0, 0.5]]],
5331
+ [[[0.5, 1.0], [1.0, 0.5]], [[1.5, 1.0], [1.0, 1.5]]],
5332
+ [[[1.5, 1.0], [1.0, 0.5]]],
5333
+ [[[0.5, 1.0], [1.5, 1.0]]],
5334
+ [[[1.0, 1.5], [1.5, 1.0]]],
5335
+ [[[0.5, 1.0], [1.0, 1.5]]],
5336
+ []
5337
+ ];
5338
+
5339
+ function contours() {
5340
+ var dx = 1,
5341
+ dy = 1,
5342
+ threshold$$1 = thresholdSturges,
5343
+ smooth = smoothLinear;
5344
+
5345
+ function contours(values) {
5346
+ var tz = threshold$$1(values);
5347
+
5348
+ // Convert number of thresholds into uniform thresholds.
5349
+ if (!Array.isArray(tz)) {
5350
+ var domain = extent(values), start = domain[0], stop = domain[1];
5351
+ tz = tickStep(start, stop, tz);
5352
+ tz = sequence(Math.floor(start / tz) * tz, Math.floor(stop / tz) * tz, tz);
5353
+ } else {
5354
+ tz = tz.slice().sort(ascending$2);
5355
+ }
5356
+
5357
+ return tz.map(function(value) {
5358
+ return contour(values, value);
5359
+ });
5360
+ }
5361
+
5362
+ // Accumulate, smooth contour rings, assign holes to exterior rings.
5363
+ // Based on https://github.com/mbostock/shapefile/blob/v0.6.2/shp/polygon.js
5364
+ function contour(values, value) {
5365
+ var polygons = [],
5366
+ holes = [];
5367
+
5368
+ isorings(values, value, function(ring) {
5369
+ smooth(ring, values, value);
5370
+ if (area(ring) > 0) polygons.push([ring]);
5371
+ else holes.push(ring);
5372
+ });
5373
+
5374
+ holes.forEach(function(hole) {
5375
+ for (var i = 0, n = polygons.length, polygon; i < n; ++i) {
5376
+ if (contains((polygon = polygons[i])[0], hole) !== -1) {
5377
+ polygon.push(hole);
5378
+ return;
5379
+ }
5380
+ }
5381
+ });
5382
+
5383
+ return {
5384
+ type: "MultiPolygon",
5385
+ value: value,
5386
+ coordinates: polygons
5387
+ };
5388
+ }
5389
+
5390
+ // Marching squares with isolines stitched into rings.
5391
+ // Based on https://github.com/topojson/topojson-client/blob/v3.0.0/src/stitch.js
5392
+ function isorings(values, value, callback) {
5393
+ var fragmentByStart = new Array,
5394
+ fragmentByEnd = new Array,
5395
+ x, y, t0, t1, t2, t3;
5396
+
5397
+ // Special case for the first row (y = -1, t2 = t3 = 0).
5398
+ x = y = -1;
5399
+ t1 = values[0] >= value;
5400
+ cases[t1 << 1].forEach(stitch);
5401
+ while (++x < dx - 1) {
5402
+ t0 = t1, t1 = values[x + 1] >= value;
5403
+ cases[t0 | t1 << 1].forEach(stitch);
5404
+ }
5405
+ cases[t1 << 0].forEach(stitch);
5406
+
5407
+ // General case for the intermediate rows.
5408
+ while (++y < dy - 1) {
5409
+ x = -1;
5410
+ t1 = values[y * dx + dx] >= value;
5411
+ t2 = values[y * dx] >= value;
5412
+ cases[t1 << 1 | t2 << 2].forEach(stitch);
5413
+ while (++x < dx - 1) {
5414
+ t0 = t1, t1 = values[y * dx + dx + x + 1] >= value;
5415
+ t3 = t2, t2 = values[y * dx + x + 1] >= value;
5416
+ cases[t0 | t1 << 1 | t2 << 2 | t3 << 3].forEach(stitch);
5417
+ }
5418
+ cases[t1 | t2 << 3].forEach(stitch);
5419
+ }
5420
+
5421
+ // Special case for the last row (y = dy - 1, t0 = t1 = 0).
5422
+ x = -1;
5423
+ t2 = values[y * dx] >= value;
5424
+ cases[t2 << 2].forEach(stitch);
5425
+ while (++x < dx - 1) {
5426
+ t3 = t2, t2 = values[y * dx + x + 1] >= value;
5427
+ cases[t2 << 2 | t3 << 3].forEach(stitch);
5428
+ }
5429
+ cases[t2 << 3].forEach(stitch);
5430
+
5431
+ function stitch(line) {
5432
+ var start = [line[0][0] + x, line[0][1] + y],
5433
+ end = [line[1][0] + x, line[1][1] + y],
5434
+ startIndex = index(start),
5435
+ endIndex = index(end),
5436
+ f, g;
5437
+ if (f = fragmentByEnd[startIndex]) {
5438
+ if (g = fragmentByStart[endIndex]) {
5439
+ delete fragmentByEnd[f.end];
5440
+ delete fragmentByStart[g.start];
5441
+ if (f === g) {
5442
+ f.ring.push(end);
5443
+ callback(f.ring);
5444
+ } else {
5445
+ fragmentByStart[f.start] = fragmentByEnd[g.end] = {start: f.start, end: g.end, ring: f.ring.concat(g.ring)};
5446
+ }
5447
+ } else {
5448
+ delete fragmentByEnd[f.end];
5449
+ f.ring.push(end);
5450
+ fragmentByEnd[f.end = endIndex] = f;
5451
+ }
5452
+ } else if (f = fragmentByStart[endIndex]) {
5453
+ if (g = fragmentByEnd[startIndex]) {
5454
+ delete fragmentByStart[f.start];
5455
+ delete fragmentByEnd[g.end];
5456
+ if (f === g) {
5457
+ f.ring.push(end);
5458
+ callback(f.ring);
5459
+ } else {
5460
+ fragmentByStart[g.start] = fragmentByEnd[f.end] = {start: g.start, end: f.end, ring: g.ring.concat(f.ring)};
5461
+ }
5462
+ } else {
5463
+ delete fragmentByStart[f.start];
5464
+ f.ring.unshift(start);
5465
+ fragmentByStart[f.start = startIndex] = f;
5466
+ }
5467
+ } else {
5468
+ fragmentByStart[startIndex] = fragmentByEnd[endIndex] = {start: startIndex, end: endIndex, ring: [start, end]};
5469
+ }
5470
+ }
5471
+ }
5472
+
5473
+ function index(point) {
5474
+ return point[0] * 2 + point[1] * (dx + 1) * 4;
5475
+ }
5476
+
5477
+ function smoothLinear(ring, values, value) {
5478
+ ring.forEach(function(point) {
5479
+ var x = point[0],
5480
+ y = point[1],
5481
+ xt = x | 0,
5482
+ yt = y | 0,
5483
+ v0,
5484
+ v1 = values[yt * dx + xt];
5485
+ if (x > 0 && x < dx && xt === x) {
5486
+ v0 = values[yt * dx + xt - 1];
5487
+ point[0] = x + (value - v0) / (v1 - v0) - 0.5;
5488
+ }
5489
+ if (y > 0 && y < dy && yt === y) {
5490
+ v0 = values[(yt - 1) * dx + xt];
5491
+ point[1] = y + (value - v0) / (v1 - v0) - 0.5;
5492
+ }
5493
+ });
5494
+ }
5495
+
5496
+ contours.contour = contour;
5497
+
5498
+ contours.size = function(_) {
5499
+ if (!arguments.length) return [dx, dy];
5500
+ var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
5501
+ if (!(_0 > 0) || !(_1 > 0)) throw new Error("invalid size");
5502
+ return dx = _0, dy = _1, contours;
5503
+ };
5504
+
5505
+ contours.thresholds = function(_) {
5506
+ return arguments.length ? (threshold$$1 = typeof _ === "function" ? _ : Array.isArray(_) ? constant$6(slice$3.call(_)) : constant$6(_), contours) : threshold$$1;
5507
+ };
5508
+
5509
+ contours.smooth = function(_) {
5510
+ return arguments.length ? (smooth = _ ? smoothLinear : noop$1, contours) : smooth === smoothLinear;
5511
+ };
5512
+
5513
+ return contours;
5514
+ }
5515
+
5516
+ // TODO Optimize edge cases.
5517
+ // TODO Optimize index calculation.
5518
+ // TODO Optimize arguments.
5519
+ function blurX(source, target, r) {
5520
+ var n = source.width,
5521
+ m = source.height,
5522
+ w = (r << 1) + 1;
5523
+ for (var j = 0; j < m; ++j) {
5524
+ for (var i = 0, sr = 0; i < n + r; ++i) {
5525
+ if (i < n) {
5526
+ sr += source.data[i + j * n];
5527
+ }
5528
+ if (i >= r) {
5529
+ if (i >= w) {
5530
+ sr -= source.data[i - w + j * n];
5531
+ }
5532
+ target.data[i - r + j * n] = sr / Math.min(i + 1, n - 1 + w - i, w);
5533
+ }
5534
+ }
5535
+ }
5536
+ }
5537
+
5538
+ // TODO Optimize edge cases.
5539
+ // TODO Optimize index calculation.
5540
+ // TODO Optimize arguments.
5541
+ function blurY(source, target, r) {
5542
+ var n = source.width,
5543
+ m = source.height,
5544
+ w = (r << 1) + 1;
5545
+ for (var i = 0; i < n; ++i) {
5546
+ for (var j = 0, sr = 0; j < m + r; ++j) {
5547
+ if (j < m) {
5548
+ sr += source.data[i + j * n];
5549
+ }
5550
+ if (j >= r) {
5551
+ if (j >= w) {
5552
+ sr -= source.data[i + (j - w) * n];
5553
+ }
5554
+ target.data[i + (j - r) * n] = sr / Math.min(j + 1, m - 1 + w - j, w);
5555
+ }
5556
+ }
5557
+ }
5558
+ }
5559
+
5560
+ function defaultX(d) {
5561
+ return d[0];
5562
+ }
5563
+
5564
+ function defaultY(d) {
5565
+ return d[1];
5566
+ }
5567
+
5568
+ function density() {
5569
+ var x = defaultX,
5570
+ y = defaultY,
5571
+ dx = 960,
5572
+ dy = 500,
5573
+ r = 20, // blur radius
5574
+ k = 2, // log2(grid cell size)
5575
+ o = r * 3, // grid offset, to pad for blur
5576
+ n = (dx + o * 2) >> k, // grid width
5577
+ m = (dy + o * 2) >> k, // grid height
5578
+ threshold$$1 = constant$6(20);
5579
+
5580
+ function density(data) {
5581
+ var values0 = new Float32Array(n * m),
5582
+ values1 = new Float32Array(n * m);
5583
+
5584
+ data.forEach(function(d, i, data) {
5585
+ var xi = (x(d, i, data) + o) >> k,
5586
+ yi = (y(d, i, data) + o) >> k;
5587
+ if (xi >= 0 && xi < n && yi >= 0 && yi < m) {
5588
+ ++values0[xi + yi * n];
5589
+ }
5590
+ });
5591
+
5592
+ // TODO Optimize.
5593
+ blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
5594
+ blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
5595
+ blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
5596
+ blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
5597
+ blurX({width: n, height: m, data: values0}, {width: n, height: m, data: values1}, r >> k);
5598
+ blurY({width: n, height: m, data: values1}, {width: n, height: m, data: values0}, r >> k);
5599
+
5600
+ var tz = threshold$$1(values0);
5601
+
5602
+ // Convert number of thresholds into uniform thresholds.
5603
+ if (!Array.isArray(tz)) {
5604
+ var stop = max(values0);
5605
+ tz = tickStep(0, stop, tz);
5606
+ tz = sequence(0, Math.floor(stop / tz) * tz, tz);
5607
+ tz.shift();
5608
+ }
5609
+
5610
+ return contours()
5611
+ .thresholds(tz)
5612
+ .size([n, m])
5613
+ (values0)
5614
+ .map(transform);
5615
+ }
5616
+
5617
+ function transform(geometry) {
5618
+ geometry.value *= Math.pow(2, -2 * k); // Density in points per square pixel.
5619
+ geometry.coordinates.forEach(transformPolygon);
5620
+ return geometry;
5621
+ }
5622
+
5623
+ function transformPolygon(coordinates) {
5624
+ coordinates.forEach(transformRing);
5625
+ }
5626
+
5627
+ function transformRing(coordinates) {
5628
+ coordinates.forEach(transformPoint);
5629
+ }
5630
+
5631
+ // TODO Optimize.
5632
+ function transformPoint(coordinates) {
5633
+ coordinates[0] = coordinates[0] * Math.pow(2, k) - o;
5634
+ coordinates[1] = coordinates[1] * Math.pow(2, k) - o;
5635
+ }
5636
+
5637
+ function resize() {
5638
+ o = r * 3;
5639
+ n = (dx + o * 2) >> k;
5640
+ m = (dy + o * 2) >> k;
5641
+ return density;
5642
+ }
5643
+
5644
+ density.x = function(_) {
5645
+ return arguments.length ? (x = typeof _ === "function" ? _ : constant$6(+_), density) : x;
5646
+ };
5647
+
5648
+ density.y = function(_) {
5649
+ return arguments.length ? (y = typeof _ === "function" ? _ : constant$6(+_), density) : y;
5650
+ };
5651
+
5652
+ density.size = function(_) {
5653
+ if (!arguments.length) return [dx, dy];
5654
+ var _0 = Math.ceil(_[0]), _1 = Math.ceil(_[1]);
5655
+ if (!(_0 >= 0) && !(_0 >= 0)) throw new Error("invalid size");
5656
+ return dx = _0, dy = _1, resize();
5657
+ };
5658
+
5659
+ density.cellSize = function(_) {
5660
+ if (!arguments.length) return 1 << k;
5661
+ if (!((_ = +_) >= 1)) throw new Error("invalid cell size");
5662
+ return k = Math.floor(Math.log(_) / Math.LN2), resize();
5663
+ };
5664
+
5665
+ density.thresholds = function(_) {
5666
+ return arguments.length ? (threshold$$1 = typeof _ === "function" ? _ : Array.isArray(_) ? constant$6(slice$3.call(_)) : constant$6(_), density) : threshold$$1;
5667
+ };
5668
+
5669
+ density.bandwidth = function(_) {
5670
+ if (!arguments.length) return Math.sqrt(r * (r + 1));
5671
+ if (!((_ = +_) >= 0)) throw new Error("invalid bandwidth");
5672
+ return r = Math.round((Math.sqrt(4 * _ * _ + 1) - 1) / 2), resize();
5673
+ };
5674
+
5675
+ return density;
5676
+ }
5677
+
5678
+ var EOL = {},
5679
+ EOF = {},
5680
+ QUOTE = 34,
5681
+ NEWLINE = 10,
5682
+ RETURN = 13;
5242
5683
 
5243
5684
  function objectConverter(columns) {
5244
5685
  return new Function("d", "return {" + columns.map(function(name, i) {
@@ -5269,7 +5710,7 @@ function inferColumns(rows) {
5269
5710
  return columns;
5270
5711
  }
5271
5712
 
5272
- function dsv(delimiter) {
5713
+ function dsvFormat(delimiter) {
5273
5714
  var reFormat = new RegExp("[\"" + delimiter + "\n\r]"),
5274
5715
  DELIMITER = delimiter.charCodeAt(0);
5275
5716
 
@@ -5362,20 +5803,100 @@ function dsv(delimiter) {
5362
5803
  };
5363
5804
  }
5364
5805
 
5365
- var csv = dsv(",");
5806
+ var csv = dsvFormat(",");
5366
5807
 
5367
5808
  var csvParse = csv.parse;
5368
5809
  var csvParseRows = csv.parseRows;
5369
5810
  var csvFormat = csv.format;
5370
5811
  var csvFormatRows = csv.formatRows;
5371
5812
 
5372
- var tsv = dsv("\t");
5813
+ var tsv = dsvFormat("\t");
5373
5814
 
5374
5815
  var tsvParse = tsv.parse;
5375
5816
  var tsvParseRows = tsv.parseRows;
5376
5817
  var tsvFormat = tsv.format;
5377
5818
  var tsvFormatRows = tsv.formatRows;
5378
5819
 
5820
+ function responseBlob(response) {
5821
+ if (!response.ok) throw new Error(response.status + " " + response.statusText);
5822
+ return response.blob();
5823
+ }
5824
+
5825
+ function blob(input, init) {
5826
+ return fetch(input, init).then(responseBlob);
5827
+ }
5828
+
5829
+ function responseArrayBuffer(response) {
5830
+ if (!response.ok) throw new Error(response.status + " " + response.statusText);
5831
+ return response.arrayBuffer();
5832
+ }
5833
+
5834
+ function buffer(input, init) {
5835
+ return fetch(input, init).then(responseArrayBuffer);
5836
+ }
5837
+
5838
+ function responseText(response) {
5839
+ if (!response.ok) throw new Error(response.status + " " + response.statusText);
5840
+ return response.text();
5841
+ }
5842
+
5843
+ function text(input, init) {
5844
+ return fetch(input, init).then(responseText);
5845
+ }
5846
+
5847
+ function dsvParse(parse) {
5848
+ return function(input, init, row) {
5849
+ if (arguments.length === 2 && typeof init === "function") row = init, init = undefined;
5850
+ return text(input, init).then(function(response) {
5851
+ return parse(response, row);
5852
+ });
5853
+ };
5854
+ }
5855
+
5856
+ function dsv(delimiter, input, init, row) {
5857
+ if (arguments.length === 3 && typeof init === "function") row = init, init = undefined;
5858
+ var format = dsvFormat(delimiter);
5859
+ return text(input, init).then(function(response) {
5860
+ return format.parse(response, row);
5861
+ });
5862
+ }
5863
+
5864
+ var csv$1 = dsvParse(csvParse);
5865
+ var tsv$1 = dsvParse(tsvParse);
5866
+
5867
+ function image(input, init) {
5868
+ return new Promise(function(resolve, reject) {
5869
+ var image = new Image;
5870
+ for (var key in init) image[key] = init[key];
5871
+ image.onerror = reject;
5872
+ image.onload = function() { resolve(image); };
5873
+ image.src = input;
5874
+ });
5875
+ }
5876
+
5877
+ function responseJson(response) {
5878
+ if (!response.ok) throw new Error(response.status + " " + response.statusText);
5879
+ return response.json();
5880
+ }
5881
+
5882
+ function json(input, init) {
5883
+ return fetch(input, init).then(responseJson);
5884
+ }
5885
+
5886
+ function parser(type) {
5887
+ return function(input, init) {
5888
+ return text(input, init).then(function(text$$1) {
5889
+ return (new DOMParser).parseFromString(text$$1, type);
5890
+ });
5891
+ };
5892
+ }
5893
+
5894
+ var xml = parser("application/xml");
5895
+
5896
+ var html = parser("text/html");
5897
+
5898
+ var svg = parser("image/svg+xml");
5899
+
5379
5900
  function center$1(x, y) {
5380
5901
  var nodes;
5381
5902
 
@@ -5413,7 +5934,7 @@ function center$1(x, y) {
5413
5934
  return force;
5414
5935
  }
5415
5936
 
5416
- function constant$6(x) {
5937
+ function constant$7(x) {
5417
5938
  return function() {
5418
5939
  return x;
5419
5940
  };
@@ -5769,7 +6290,7 @@ function tree_visitAfter(callback) {
5769
6290
  return this;
5770
6291
  }
5771
6292
 
5772
- function defaultX(d) {
6293
+ function defaultX$1(d) {
5773
6294
  return d[0];
5774
6295
  }
5775
6296
 
@@ -5777,7 +6298,7 @@ function tree_x(_) {
5777
6298
  return arguments.length ? (this._x = _, this) : this._x;
5778
6299
  }
5779
6300
 
5780
- function defaultY(d) {
6301
+ function defaultY$1(d) {
5781
6302
  return d[1];
5782
6303
  }
5783
6304
 
@@ -5786,7 +6307,7 @@ function tree_y(_) {
5786
6307
  }
5787
6308
 
5788
6309
  function quadtree(nodes, x, y) {
5789
- var tree = new Quadtree(x == null ? defaultX : x, y == null ? defaultY : y, NaN, NaN, NaN, NaN);
6310
+ var tree = new Quadtree(x == null ? defaultX$1 : x, y == null ? defaultY$1 : y, NaN, NaN, NaN, NaN);
5790
6311
  return nodes == null ? tree : tree.addAll(nodes);
5791
6312
  }
5792
6313
 
@@ -5860,7 +6381,7 @@ function collide(radius) {
5860
6381
  strength = 1,
5861
6382
  iterations = 1;
5862
6383
 
5863
- if (typeof radius !== "function") radius = constant$6(radius == null ? 1 : +radius);
6384
+ if (typeof radius !== "function") radius = constant$7(radius == null ? 1 : +radius);
5864
6385
 
5865
6386
  function force() {
5866
6387
  var i, n = nodes.length,
@@ -5935,7 +6456,7 @@ function collide(radius) {
5935
6456
  };
5936
6457
 
5937
6458
  force.radius = function(_) {
5938
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : radius;
6459
+ return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : radius;
5939
6460
  };
5940
6461
 
5941
6462
  return force;
@@ -5955,7 +6476,7 @@ function link(links) {
5955
6476
  var id = index,
5956
6477
  strength = defaultStrength,
5957
6478
  strengths,
5958
- distance = constant$6(30),
6479
+ distance = constant$7(30),
5959
6480
  distances,
5960
6481
  nodes,
5961
6482
  count,
@@ -6044,11 +6565,11 @@ function link(links) {
6044
6565
  };
6045
6566
 
6046
6567
  force.strength = function(_) {
6047
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initializeStrength(), force) : strength;
6568
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initializeStrength(), force) : strength;
6048
6569
  };
6049
6570
 
6050
6571
  force.distance = function(_) {
6051
- return arguments.length ? (distance = typeof _ === "function" ? _ : constant$6(+_), initializeDistance(), force) : distance;
6572
+ return arguments.length ? (distance = typeof _ === "function" ? _ : constant$7(+_), initializeDistance(), force) : distance;
6052
6573
  };
6053
6574
 
6054
6575
  return force;
@@ -6062,8 +6583,8 @@ function y$1(d) {
6062
6583
  return d.y;
6063
6584
  }
6064
6585
 
6065
- var initialRadius = 10;
6066
- var initialAngle = Math.PI * (3 - Math.sqrt(5));
6586
+ var initialRadius = 10,
6587
+ initialAngle = Math.PI * (3 - Math.sqrt(5));
6067
6588
 
6068
6589
  function simulation(nodes) {
6069
6590
  var simulation,
@@ -6198,7 +6719,7 @@ function manyBody() {
6198
6719
  var nodes,
6199
6720
  node,
6200
6721
  alpha,
6201
- strength = constant$6(-30),
6722
+ strength = constant$7(-30),
6202
6723
  strengths,
6203
6724
  distanceMin2 = 1,
6204
6725
  distanceMax2 = Infinity,
@@ -6286,7 +6807,7 @@ function manyBody() {
6286
6807
  };
6287
6808
 
6288
6809
  force.strength = function(_) {
6289
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
6810
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength;
6290
6811
  };
6291
6812
 
6292
6813
  force.distanceMin = function(_) {
@@ -6306,11 +6827,11 @@ function manyBody() {
6306
6827
 
6307
6828
  function radial(radius, x, y) {
6308
6829
  var nodes,
6309
- strength = constant$6(0.1),
6830
+ strength = constant$7(0.1),
6310
6831
  strengths,
6311
6832
  radiuses;
6312
6833
 
6313
- if (typeof radius !== "function") radius = constant$6(+radius);
6834
+ if (typeof radius !== "function") radius = constant$7(+radius);
6314
6835
  if (x == null) x = 0;
6315
6836
  if (y == null) y = 0;
6316
6837
 
@@ -6342,11 +6863,11 @@ function radial(radius, x, y) {
6342
6863
  };
6343
6864
 
6344
6865
  force.strength = function(_) {
6345
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
6866
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength;
6346
6867
  };
6347
6868
 
6348
6869
  force.radius = function(_) {
6349
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : radius;
6870
+ return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : radius;
6350
6871
  };
6351
6872
 
6352
6873
  force.x = function(_) {
@@ -6361,12 +6882,12 @@ function radial(radius, x, y) {
6361
6882
  }
6362
6883
 
6363
6884
  function x$2(x) {
6364
- var strength = constant$6(0.1),
6885
+ var strength = constant$7(0.1),
6365
6886
  nodes,
6366
6887
  strengths,
6367
6888
  xz;
6368
6889
 
6369
- if (typeof x !== "function") x = constant$6(x == null ? 0 : +x);
6890
+ if (typeof x !== "function") x = constant$7(x == null ? 0 : +x);
6370
6891
 
6371
6892
  function force(alpha) {
6372
6893
  for (var i = 0, n = nodes.length, node; i < n; ++i) {
@@ -6390,23 +6911,23 @@ function x$2(x) {
6390
6911
  };
6391
6912
 
6392
6913
  force.strength = function(_) {
6393
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
6914
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength;
6394
6915
  };
6395
6916
 
6396
6917
  force.x = function(_) {
6397
- return arguments.length ? (x = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : x;
6918
+ return arguments.length ? (x = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : x;
6398
6919
  };
6399
6920
 
6400
6921
  return force;
6401
6922
  }
6402
6923
 
6403
6924
  function y$2(y) {
6404
- var strength = constant$6(0.1),
6925
+ var strength = constant$7(0.1),
6405
6926
  nodes,
6406
6927
  strengths,
6407
6928
  yz;
6408
6929
 
6409
- if (typeof y !== "function") y = constant$6(y == null ? 0 : +y);
6930
+ if (typeof y !== "function") y = constant$7(y == null ? 0 : +y);
6410
6931
 
6411
6932
  function force(alpha) {
6412
6933
  for (var i = 0, n = nodes.length, node; i < n; ++i) {
@@ -6430,11 +6951,11 @@ function y$2(y) {
6430
6951
  };
6431
6952
 
6432
6953
  force.strength = function(_) {
6433
- return arguments.length ? (strength = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : strength;
6954
+ return arguments.length ? (strength = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : strength;
6434
6955
  };
6435
6956
 
6436
6957
  force.y = function(_) {
6437
- return arguments.length ? (y = typeof _ === "function" ? _ : constant$6(+_), initialize(), force) : y;
6958
+ return arguments.length ? (y = typeof _ === "function" ? _ : constant$7(+_), initialize(), force) : y;
6438
6959
  };
6439
6960
 
6440
6961
  return force;
@@ -6486,19 +7007,53 @@ function formatNumerals(numerals) {
6486
7007
  };
6487
7008
  }
6488
7009
 
6489
- function formatDefault(x, p) {
6490
- x = x.toPrecision(p);
7010
+ // [[fill]align][sign][symbol][0][width][,][.precision][~][type]
7011
+ var re = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
7012
+
7013
+ function formatSpecifier(specifier) {
7014
+ return new FormatSpecifier(specifier);
7015
+ }
7016
+
7017
+ formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
7018
+
7019
+ function FormatSpecifier(specifier) {
7020
+ if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
7021
+ var match;
7022
+ this.fill = match[1] || " ";
7023
+ this.align = match[2] || ">";
7024
+ this.sign = match[3] || "-";
7025
+ this.symbol = match[4] || "";
7026
+ this.zero = !!match[5];
7027
+ this.width = match[6] && +match[6];
7028
+ this.comma = !!match[7];
7029
+ this.precision = match[8] && +match[8].slice(1);
7030
+ this.trim = !!match[9];
7031
+ this.type = match[10] || "";
7032
+ }
7033
+
7034
+ FormatSpecifier.prototype.toString = function() {
7035
+ return this.fill
7036
+ + this.align
7037
+ + this.sign
7038
+ + this.symbol
7039
+ + (this.zero ? "0" : "")
7040
+ + (this.width == null ? "" : Math.max(1, this.width | 0))
7041
+ + (this.comma ? "," : "")
7042
+ + (this.precision == null ? "" : "." + Math.max(0, this.precision | 0))
7043
+ + (this.trim ? "~" : "")
7044
+ + this.type;
7045
+ };
6491
7046
 
6492
- out: for (var n = x.length, i = 1, i0 = -1, i1; i < n; ++i) {
6493
- switch (x[i]) {
7047
+ // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
7048
+ function formatTrim(s) {
7049
+ out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
7050
+ switch (s[i]) {
6494
7051
  case ".": i0 = i1 = i; break;
6495
7052
  case "0": if (i0 === 0) i0 = i; i1 = i; break;
6496
- case "e": break out;
6497
- default: if (i0 > 0) i0 = 0; break;
7053
+ default: if (i0 > 0) { if (!+s[i]) break out; i0 = 0; } break;
6498
7054
  }
6499
7055
  }
6500
-
6501
- return i0 > 0 ? x.slice(0, i0) + x.slice(i1 + 1) : x;
7056
+ return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
6502
7057
  }
6503
7058
 
6504
7059
  var prefixExponent;
@@ -6527,7 +7082,6 @@ function formatRounded(x, p) {
6527
7082
  }
6528
7083
 
6529
7084
  var formatTypes = {
6530
- "": formatDefault,
6531
7085
  "%": function(x, p) { return (x * 100).toFixed(p); },
6532
7086
  "b": function(x) { return Math.round(x).toString(2); },
6533
7087
  "c": function(x) { return x + ""; },
@@ -6543,61 +7097,6 @@ var formatTypes = {
6543
7097
  "x": function(x) { return Math.round(x).toString(16); }
6544
7098
  };
6545
7099
 
6546
- // [[fill]align][sign][symbol][0][width][,][.precision][type]
6547
- var re = /^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?([a-z%])?$/i;
6548
-
6549
- function formatSpecifier(specifier) {
6550
- return new FormatSpecifier(specifier);
6551
- }
6552
-
6553
- formatSpecifier.prototype = FormatSpecifier.prototype; // instanceof
6554
-
6555
- function FormatSpecifier(specifier) {
6556
- if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
6557
-
6558
- var match,
6559
- fill = match[1] || " ",
6560
- align = match[2] || ">",
6561
- sign = match[3] || "-",
6562
- symbol = match[4] || "",
6563
- zero = !!match[5],
6564
- width = match[6] && +match[6],
6565
- comma = !!match[7],
6566
- precision = match[8] && +match[8].slice(1),
6567
- type = match[9] || "";
6568
-
6569
- // The "n" type is an alias for ",g".
6570
- if (type === "n") comma = true, type = "g";
6571
-
6572
- // Map invalid types to the default format.
6573
- else if (!formatTypes[type]) type = "";
6574
-
6575
- // If zero fill is specified, padding goes after sign and before digits.
6576
- if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
6577
-
6578
- this.fill = fill;
6579
- this.align = align;
6580
- this.sign = sign;
6581
- this.symbol = symbol;
6582
- this.zero = zero;
6583
- this.width = width;
6584
- this.comma = comma;
6585
- this.precision = precision;
6586
- this.type = type;
6587
- }
6588
-
6589
- FormatSpecifier.prototype.toString = function() {
6590
- return this.fill
6591
- + this.align
6592
- + this.sign
6593
- + this.symbol
6594
- + (this.zero ? "0" : "")
6595
- + (this.width == null ? "" : Math.max(1, this.width | 0))
6596
- + (this.comma ? "," : "")
6597
- + (this.precision == null ? "" : "." + Math.max(0, this.precision | 0))
6598
- + this.type;
6599
- };
6600
-
6601
7100
  function identity$3(x) {
6602
7101
  return x;
6603
7102
  }
@@ -6622,8 +7121,18 @@ function formatLocale(locale) {
6622
7121
  width = specifier.width,
6623
7122
  comma = specifier.comma,
6624
7123
  precision = specifier.precision,
7124
+ trim = specifier.trim,
6625
7125
  type = specifier.type;
6626
7126
 
7127
+ // The "n" type is an alias for ",g".
7128
+ if (type === "n") comma = true, type = "g";
7129
+
7130
+ // The "" type, and any invalid type, is an alias for ".12~g".
7131
+ else if (!formatTypes[type]) precision == null && (precision = 12), trim = true, type = "g";
7132
+
7133
+ // If zero fill is specified, padding goes after sign and before digits.
7134
+ if (zero || (fill === "0" && align === "=")) zero = true, fill = "0", align = "=";
7135
+
6627
7136
  // Compute the prefix and suffix.
6628
7137
  // For SI-prefix, the suffix is lazily computed.
6629
7138
  var prefix = symbol === "$" ? currency[0] : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "",
@@ -6633,13 +7142,13 @@ function formatLocale(locale) {
6633
7142
  // Is this an integer type?
6634
7143
  // Can this type generate exponential notation?
6635
7144
  var formatType = formatTypes[type],
6636
- maybeSuffix = !type || /[defgprs%]/.test(type);
7145
+ maybeSuffix = /[defgprs%]/.test(type);
6637
7146
 
6638
7147
  // Set the default precision if not specified,
6639
7148
  // or clamp the specified precision to the supported range.
6640
7149
  // For significant precision, it must be in [1, 21].
6641
7150
  // For fixed precision, it must be in [0, 20].
6642
- precision = precision == null ? (type ? 6 : 12)
7151
+ precision = precision == null ? 6
6643
7152
  : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision))
6644
7153
  : Math.max(0, Math.min(20, precision));
6645
7154
 
@@ -6658,6 +7167,9 @@ function formatLocale(locale) {
6658
7167
  var valueNegative = value < 0;
6659
7168
  value = formatType(Math.abs(value), precision);
6660
7169
 
7170
+ // Trim insignificant zeros.
7171
+ if (trim) value = formatTrim(value);
7172
+
6661
7173
  // If a negative value rounds to zero during formatting, treat as positive.
6662
7174
  if (valueNegative && +value === 0) valueNegative = false;
6663
7175
 
@@ -6725,8 +7237,6 @@ function formatLocale(locale) {
6725
7237
 
6726
7238
  var locale;
6727
7239
 
6728
-
6729
-
6730
7240
  defaultLocale({
6731
7241
  decimal: ".",
6732
7242
  thousands: ",",
@@ -6811,7 +7321,6 @@ var atan2 = Math.atan2;
6811
7321
  var cos$1 = Math.cos;
6812
7322
  var ceil = Math.ceil;
6813
7323
  var exp = Math.exp;
6814
-
6815
7324
  var log = Math.log;
6816
7325
  var pow = Math.pow;
6817
7326
  var sin$1 = Math.sin;
@@ -6831,7 +7340,7 @@ function haversin(x) {
6831
7340
  return (x = sin$1(x / 2)) * x;
6832
7341
  }
6833
7342
 
6834
- function noop$1() {}
7343
+ function noop$2() {}
6835
7344
 
6836
7345
  function streamGeometry(geometry, stream) {
6837
7346
  if (geometry && streamGeometryType.hasOwnProperty(geometry.type)) {
@@ -6905,17 +7414,17 @@ function geoStream(object, stream) {
6905
7414
 
6906
7415
  var areaRingSum = adder();
6907
7416
 
6908
- var areaSum = adder();
6909
- var lambda00;
6910
- var phi00;
6911
- var lambda0;
6912
- var cosPhi0;
6913
- var sinPhi0;
7417
+ var areaSum = adder(),
7418
+ lambda00,
7419
+ phi00,
7420
+ lambda0,
7421
+ cosPhi0,
7422
+ sinPhi0;
6914
7423
 
6915
7424
  var areaStream = {
6916
- point: noop$1,
6917
- lineStart: noop$1,
6918
- lineEnd: noop$1,
7425
+ point: noop$2,
7426
+ lineStart: noop$2,
7427
+ lineEnd: noop$2,
6919
7428
  polygonStart: function() {
6920
7429
  areaRingSum.reset();
6921
7430
  areaStream.lineStart = areaRingStart;
@@ -6924,7 +7433,7 @@ var areaStream = {
6924
7433
  polygonEnd: function() {
6925
7434
  var areaRing = +areaRingSum;
6926
7435
  areaSum.add(areaRing < 0 ? tau$3 + areaRing : areaRing);
6927
- this.lineStart = this.lineEnd = this.point = noop$1;
7436
+ this.lineStart = this.lineEnd = this.point = noop$2;
6928
7437
  },
6929
7438
  sphere: function() {
6930
7439
  areaSum.add(tau$3);
@@ -6967,7 +7476,7 @@ function areaPoint(lambda, phi) {
6967
7476
  lambda0 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
6968
7477
  }
6969
7478
 
6970
- function area(object) {
7479
+ function area$1(object) {
6971
7480
  areaSum.reset();
6972
7481
  geoStream(object, areaStream);
6973
7482
  return areaSum * 2;
@@ -7005,17 +7514,13 @@ function cartesianNormalizeInPlace(d) {
7005
7514
  d[0] /= l, d[1] /= l, d[2] /= l;
7006
7515
  }
7007
7516
 
7008
- var lambda0$1;
7009
- var phi0;
7010
- var lambda1;
7011
- var phi1;
7012
- var lambda2;
7013
- var lambda00$1;
7014
- var phi00$1;
7015
- var p0;
7016
- var deltaSum = adder();
7017
- var ranges;
7018
- var range;
7517
+ var lambda0$1, phi0, lambda1, phi1, // bounds
7518
+ lambda2, // previous lambda-coordinate
7519
+ lambda00$1, phi00$1, // first point
7520
+ p0, // previous 3D point
7521
+ deltaSum = adder(),
7522
+ ranges,
7523
+ range;
7019
7524
 
7020
7525
  var boundsStream = {
7021
7526
  point: boundsPoint,
@@ -7180,25 +7685,15 @@ function bounds(feature) {
7180
7685
  : [[lambda0$1, phi0], [lambda1, phi1]];
7181
7686
  }
7182
7687
 
7183
- var W0;
7184
- var W1;
7185
- var X0;
7186
- var Y0;
7187
- var Z0;
7188
- var X1;
7189
- var Y1;
7190
- var Z1;
7191
- var X2;
7192
- var Y2;
7193
- var Z2;
7194
- var lambda00$2;
7195
- var phi00$2;
7196
- var x0;
7197
- var y0;
7198
- var z0; // previous point
7688
+ var W0, W1,
7689
+ X0, Y0, Z0,
7690
+ X1, Y1, Z1,
7691
+ X2, Y2, Z2,
7692
+ lambda00$2, phi00$2, // first point
7693
+ x0, y0, z0; // previous point
7199
7694
 
7200
7695
  var centroidStream = {
7201
- sphere: noop$1,
7696
+ sphere: noop$2,
7202
7697
  point: centroidPoint,
7203
7698
  lineStart: centroidLineStart,
7204
7699
  lineEnd: centroidLineEnd,
@@ -7327,7 +7822,7 @@ function centroid(object) {
7327
7822
  return [atan2(y, x) * degrees$1, asin(z / sqrt(m)) * degrees$1];
7328
7823
  }
7329
7824
 
7330
- function constant$7(x) {
7825
+ function constant$8(x) {
7331
7826
  return function() {
7332
7827
  return x;
7333
7828
  };
@@ -7449,9 +7944,9 @@ function circleRadius(cosRadius, point) {
7449
7944
  }
7450
7945
 
7451
7946
  function circle() {
7452
- var center = constant$7([0, 0]),
7453
- radius = constant$7(90),
7454
- precision = constant$7(6),
7947
+ var center = constant$8([0, 0]),
7948
+ radius = constant$8(90),
7949
+ precision = constant$8(6),
7455
7950
  ring,
7456
7951
  rotate,
7457
7952
  stream = {point: point};
@@ -7474,15 +7969,15 @@ function circle() {
7474
7969
  }
7475
7970
 
7476
7971
  circle.center = function(_) {
7477
- return arguments.length ? (center = typeof _ === "function" ? _ : constant$7([+_[0], +_[1]]), circle) : center;
7972
+ return arguments.length ? (center = typeof _ === "function" ? _ : constant$8([+_[0], +_[1]]), circle) : center;
7478
7973
  };
7479
7974
 
7480
7975
  circle.radius = function(_) {
7481
- return arguments.length ? (radius = typeof _ === "function" ? _ : constant$7(+_), circle) : radius;
7976
+ return arguments.length ? (radius = typeof _ === "function" ? _ : constant$8(+_), circle) : radius;
7482
7977
  };
7483
7978
 
7484
7979
  circle.precision = function(_) {
7485
- return arguments.length ? (precision = typeof _ === "function" ? _ : constant$7(+_), circle) : precision;
7980
+ return arguments.length ? (precision = typeof _ === "function" ? _ : constant$8(+_), circle) : precision;
7486
7981
  };
7487
7982
 
7488
7983
  return circle;
@@ -7498,7 +7993,7 @@ function clipBuffer() {
7498
7993
  lineStart: function() {
7499
7994
  lines.push(line = []);
7500
7995
  },
7501
- lineEnd: noop$1,
7996
+ lineEnd: noop$2,
7502
7997
  rejoin: function() {
7503
7998
  if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
7504
7999
  },
@@ -7620,12 +8115,16 @@ var sum$1 = adder();
7620
8115
  function polygonContains(polygon, point) {
7621
8116
  var lambda = point[0],
7622
8117
  phi = point[1],
8118
+ sinPhi = sin$1(phi),
7623
8119
  normal = [sin$1(lambda), -cos$1(lambda), 0],
7624
8120
  angle = 0,
7625
8121
  winding = 0;
7626
8122
 
7627
8123
  sum$1.reset();
7628
8124
 
8125
+ if (sinPhi === 1) phi = halfPi$2 + epsilon$2;
8126
+ else if (sinPhi === -1) phi = -halfPi$2 - epsilon$2;
8127
+
7629
8128
  for (var i = 0, n = polygon.length; i < n; ++i) {
7630
8129
  if (!(m = (ring = polygon[i]).length)) continue;
7631
8130
  var ring,
@@ -8133,8 +8632,7 @@ function clipLine(a, b, x0, y0, x1, y1) {
8133
8632
  return true;
8134
8633
  }
8135
8634
 
8136
- var clipMax = 1e9;
8137
- var clipMin = -clipMax;
8635
+ var clipMax = 1e9, clipMin = -clipMax;
8138
8636
 
8139
8637
  // TODO Use d3-polygon’s polygonContains here for the ring check?
8140
8638
  // TODO Eliminate duplicate buffering in clipBuffer and polygon.push?
@@ -8316,18 +8814,18 @@ function extent$1() {
8316
8814
  };
8317
8815
  }
8318
8816
 
8319
- var lengthSum = adder();
8320
- var lambda0$2;
8321
- var sinPhi0$1;
8322
- var cosPhi0$1;
8817
+ var lengthSum = adder(),
8818
+ lambda0$2,
8819
+ sinPhi0$1,
8820
+ cosPhi0$1;
8323
8821
 
8324
8822
  var lengthStream = {
8325
- sphere: noop$1,
8326
- point: noop$1,
8823
+ sphere: noop$2,
8824
+ point: noop$2,
8327
8825
  lineStart: lengthLineStart,
8328
- lineEnd: noop$1,
8329
- polygonStart: noop$1,
8330
- polygonEnd: noop$1
8826
+ lineEnd: noop$2,
8827
+ polygonStart: noop$2,
8828
+ polygonEnd: noop$2
8331
8829
  };
8332
8830
 
8333
8831
  function lengthLineStart() {
@@ -8336,7 +8834,7 @@ function lengthLineStart() {
8336
8834
  }
8337
8835
 
8338
8836
  function lengthLineEnd() {
8339
- lengthStream.point = lengthStream.lineEnd = noop$1;
8837
+ lengthStream.point = lengthStream.lineEnd = noop$2;
8340
8838
  }
8341
8839
 
8342
8840
  function lengthPointFirst(lambda, phi) {
@@ -8365,8 +8863,8 @@ function length$1(object) {
8365
8863
  return +lengthSum;
8366
8864
  }
8367
8865
 
8368
- var coordinates = [null, null];
8369
- var object$1 = {type: "LineString", coordinates: coordinates};
8866
+ var coordinates = [null, null],
8867
+ object$1 = {type: "LineString", coordinates: coordinates};
8370
8868
 
8371
8869
  function distance(a, b) {
8372
8870
  coordinates[0] = a;
@@ -8449,7 +8947,7 @@ function pointRadians(point) {
8449
8947
  return [point[0] * radians, point[1] * radians];
8450
8948
  }
8451
8949
 
8452
- function contains(object, point) {
8950
+ function contains$1(object, point) {
8453
8951
  return (object && containsObjectType.hasOwnProperty(object.type)
8454
8952
  ? containsObjectType[object.type]
8455
8953
  : containsGeometry)(object, point);
@@ -8597,23 +9095,23 @@ function identity$4(x) {
8597
9095
  return x;
8598
9096
  }
8599
9097
 
8600
- var areaSum$1 = adder();
8601
- var areaRingSum$1 = adder();
8602
- var x00;
8603
- var y00;
8604
- var x0$1;
8605
- var y0$1;
9098
+ var areaSum$1 = adder(),
9099
+ areaRingSum$1 = adder(),
9100
+ x00,
9101
+ y00,
9102
+ x0$1,
9103
+ y0$1;
8606
9104
 
8607
9105
  var areaStream$1 = {
8608
- point: noop$1,
8609
- lineStart: noop$1,
8610
- lineEnd: noop$1,
9106
+ point: noop$2,
9107
+ lineStart: noop$2,
9108
+ lineEnd: noop$2,
8611
9109
  polygonStart: function() {
8612
9110
  areaStream$1.lineStart = areaRingStart$1;
8613
9111
  areaStream$1.lineEnd = areaRingEnd$1;
8614
9112
  },
8615
9113
  polygonEnd: function() {
8616
- areaStream$1.lineStart = areaStream$1.lineEnd = areaStream$1.point = noop$1;
9114
+ areaStream$1.lineStart = areaStream$1.lineEnd = areaStream$1.point = noop$2;
8617
9115
  areaSum$1.add(abs(areaRingSum$1));
8618
9116
  areaRingSum$1.reset();
8619
9117
  },
@@ -8642,17 +9140,17 @@ function areaRingEnd$1() {
8642
9140
  areaPoint$1(x00, y00);
8643
9141
  }
8644
9142
 
8645
- var x0$2 = Infinity;
8646
- var y0$2 = x0$2;
8647
- var x1 = -x0$2;
8648
- var y1 = x1;
9143
+ var x0$2 = Infinity,
9144
+ y0$2 = x0$2,
9145
+ x1 = -x0$2,
9146
+ y1 = x1;
8649
9147
 
8650
9148
  var boundsStream$1 = {
8651
9149
  point: boundsPoint$1,
8652
- lineStart: noop$1,
8653
- lineEnd: noop$1,
8654
- polygonStart: noop$1,
8655
- polygonEnd: noop$1,
9150
+ lineStart: noop$2,
9151
+ lineEnd: noop$2,
9152
+ polygonStart: noop$2,
9153
+ polygonEnd: noop$2,
8656
9154
  result: function() {
8657
9155
  var bounds = [[x0$2, y0$2], [x1, y1]];
8658
9156
  x1 = y1 = -(y0$2 = x0$2 = Infinity);
@@ -8669,19 +9167,19 @@ function boundsPoint$1(x, y) {
8669
9167
 
8670
9168
  // TODO Enforce positive area for exterior, negative area for interior?
8671
9169
 
8672
- var X0$1 = 0;
8673
- var Y0$1 = 0;
8674
- var Z0$1 = 0;
8675
- var X1$1 = 0;
8676
- var Y1$1 = 0;
8677
- var Z1$1 = 0;
8678
- var X2$1 = 0;
8679
- var Y2$1 = 0;
8680
- var Z2$1 = 0;
8681
- var x00$1;
8682
- var y00$1;
8683
- var x0$3;
8684
- var y0$3;
9170
+ var X0$1 = 0,
9171
+ Y0$1 = 0,
9172
+ Z0$1 = 0,
9173
+ X1$1 = 0,
9174
+ Y1$1 = 0,
9175
+ Z1$1 = 0,
9176
+ X2$1 = 0,
9177
+ Y2$1 = 0,
9178
+ Z2$1 = 0,
9179
+ x00$1,
9180
+ y00$1,
9181
+ x0$3,
9182
+ y0$3;
8685
9183
 
8686
9184
  var centroidStream$1 = {
8687
9185
  point: centroidPoint$1,
@@ -8804,24 +9302,24 @@ PathContext.prototype = {
8804
9302
  }
8805
9303
  }
8806
9304
  },
8807
- result: noop$1
9305
+ result: noop$2
8808
9306
  };
8809
9307
 
8810
- var lengthSum$1 = adder();
8811
- var lengthRing;
8812
- var x00$2;
8813
- var y00$2;
8814
- var x0$4;
8815
- var y0$4;
9308
+ var lengthSum$1 = adder(),
9309
+ lengthRing,
9310
+ x00$2,
9311
+ y00$2,
9312
+ x0$4,
9313
+ y0$4;
8816
9314
 
8817
9315
  var lengthStream$1 = {
8818
- point: noop$1,
9316
+ point: noop$2,
8819
9317
  lineStart: function() {
8820
9318
  lengthStream$1.point = lengthPointFirst$1;
8821
9319
  },
8822
9320
  lineEnd: function() {
8823
9321
  if (lengthRing) lengthPoint$1(x00$2, y00$2);
8824
- lengthStream$1.point = noop$1;
9322
+ lengthStream$1.point = noop$2;
8825
9323
  },
8826
9324
  polygonStart: function() {
8827
9325
  lengthRing = true;
@@ -9032,8 +9530,8 @@ function fitHeight(projection, height, object) {
9032
9530
  }, object);
9033
9531
  }
9034
9532
 
9035
- var maxDepth = 16;
9036
- var cosMinDistance = cos$1(30 * radians); // cos(minimum angular distance)
9533
+ var maxDepth = 16, // maximum depth of subdivision
9534
+ cosMinDistance = cos$1(30 * radians); // cos(minimum angular distance)
9037
9535
 
9038
9536
  function resample(project, delta2) {
9039
9537
  return +delta2 ? resample$1(project, delta2) : resampleNone(project);
@@ -9146,6 +9644,34 @@ function transformRotate(rotate) {
9146
9644
  });
9147
9645
  }
9148
9646
 
9647
+ function scaleTranslate(k, dx, dy) {
9648
+ function transform$$1(x, y) {
9649
+ return [dx + k * x, dy - k * y];
9650
+ }
9651
+ transform$$1.invert = function(x, y) {
9652
+ return [(x - dx) / k, (dy - y) / k];
9653
+ };
9654
+ return transform$$1;
9655
+ }
9656
+
9657
+ function scaleTranslateRotate(k, dx, dy, alpha) {
9658
+ var cosAlpha = cos$1(alpha),
9659
+ sinAlpha = sin$1(alpha),
9660
+ a = cosAlpha * k,
9661
+ b = sinAlpha * k,
9662
+ ai = cosAlpha / k,
9663
+ bi = sinAlpha / k,
9664
+ ci = (sinAlpha * dy - cosAlpha * dx) / k,
9665
+ fi = (sinAlpha * dx + cosAlpha * dy) / k;
9666
+ function transform$$1(x, y) {
9667
+ return [a * x - b * y + dx, dy - b * x - a * y];
9668
+ }
9669
+ transform$$1.invert = function(x, y) {
9670
+ return [ai * x - bi * y + ci, fi - bi * x - ai * y];
9671
+ };
9672
+ return transform$$1;
9673
+ }
9674
+
9149
9675
  function projection(project) {
9150
9676
  return projectionMutator(function() { return project; })();
9151
9677
  }
@@ -9154,28 +9680,27 @@ function projectionMutator(projectAt) {
9154
9680
  var project,
9155
9681
  k = 150, // scale
9156
9682
  x = 480, y = 250, // translate
9157
- dx, dy, lambda = 0, phi = 0, // center
9158
- deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, projectRotate, // rotate
9159
- theta = null, preclip = clipAntimeridian, // clip angle
9160
- x0 = null, y0, x1, y1, postclip = identity$4, // clip extent
9161
- delta2 = 0.5, projectResample = resample(projectTransform, delta2), // precision
9683
+ lambda = 0, phi = 0, // center
9684
+ deltaLambda = 0, deltaPhi = 0, deltaGamma = 0, rotate, // pre-rotate
9685
+ alpha = 0, // post-rotate
9686
+ theta = null, preclip = clipAntimeridian, // pre-clip angle
9687
+ x0 = null, y0, x1, y1, postclip = identity$4, // post-clip extent
9688
+ delta2 = 0.5, // precision
9689
+ projectResample,
9690
+ projectTransform,
9691
+ projectRotateTransform,
9162
9692
  cache,
9163
9693
  cacheStream;
9164
9694
 
9165
9695
  function projection(point) {
9166
- point = projectRotate(point[0] * radians, point[1] * radians);
9167
- return [point[0] * k + dx, dy - point[1] * k];
9696
+ return projectRotateTransform(point[0] * radians, point[1] * radians);
9168
9697
  }
9169
9698
 
9170
9699
  function invert(point) {
9171
- point = projectRotate.invert((point[0] - dx) / k, (dy - point[1]) / k);
9700
+ point = projectRotateTransform.invert(point[0], point[1]);
9172
9701
  return point && [point[0] * degrees$1, point[1] * degrees$1];
9173
9702
  }
9174
9703
 
9175
- function projectTransform(x, y) {
9176
- return x = project(x, y), [x[0] * k + dx, dy - x[1] * k];
9177
- }
9178
-
9179
9704
  projection.stream = function(stream) {
9180
9705
  return cache && cacheStream === stream ? cache : cache = transformRadians(transformRotate(rotate)(preclip(projectResample(postclip(cacheStream = stream)))));
9181
9706
  };
@@ -9212,6 +9737,10 @@ function projectionMutator(projectAt) {
9212
9737
  return arguments.length ? (deltaLambda = _[0] % 360 * radians, deltaPhi = _[1] % 360 * radians, deltaGamma = _.length > 2 ? _[2] % 360 * radians : 0, recenter()) : [deltaLambda * degrees$1, deltaPhi * degrees$1, deltaGamma * degrees$1];
9213
9738
  };
9214
9739
 
9740
+ projection.angle = function(_) {
9741
+ return arguments.length ? (alpha = _ % 360 * radians, recenter()) : alpha * degrees$1;
9742
+ };
9743
+
9215
9744
  projection.precision = function(_) {
9216
9745
  return arguments.length ? (projectResample = resample(projectTransform, delta2 = _ * _), reset()) : sqrt(delta2);
9217
9746
  };
@@ -9233,10 +9762,12 @@ function projectionMutator(projectAt) {
9233
9762
  };
9234
9763
 
9235
9764
  function recenter() {
9236
- projectRotate = compose(rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma), project);
9237
- var center = project(lambda, phi);
9238
- dx = x - center[0] * k;
9239
- dy = y + center[1] * k;
9765
+ var center = scaleTranslateRotate(k, 0, 0, alpha).apply(null, project(lambda, phi)),
9766
+ transform$$1 = (alpha ? scaleTranslateRotate : scaleTranslate)(k, x - center[0], y - center[1], alpha);
9767
+ rotate = rotateRadians(deltaLambda, deltaPhi, deltaGamma);
9768
+ projectTransform = compose(project, transform$$1);
9769
+ projectRotateTransform = compose(rotate, projectTransform);
9770
+ projectResample = resample(projectTransform, delta2);
9240
9771
  return reset();
9241
9772
  }
9242
9773
 
@@ -9605,7 +10136,7 @@ function gnomonic() {
9605
10136
  .clipAngle(60);
9606
10137
  }
9607
10138
 
9608
- function scaleTranslate(kx, ky, tx, ty) {
10139
+ function scaleTranslate$1(kx, ky, tx, ty) {
9609
10140
  return kx === 1 && ky === 1 && tx === 0 && ty === 0 ? identity$4 : transformer({
9610
10141
  point: function(x, y) {
9611
10142
  this.stream.point(x * kx + tx, y * ky + ty);
@@ -9637,16 +10168,16 @@ function identity$5() {
9637
10168
  return arguments.length ? (postclip = _ == null ? (x0 = y0 = x1 = y1 = null, identity$4) : clipRectangle(x0 = +_[0][0], y0 = +_[0][1], x1 = +_[1][0], y1 = +_[1][1]), reset()) : x0 == null ? null : [[x0, y0], [x1, y1]];
9638
10169
  },
9639
10170
  scale: function(_) {
9640
- return arguments.length ? (transform$$1 = scaleTranslate((k = +_) * sx, k * sy, tx, ty), reset()) : k;
10171
+ return arguments.length ? (transform$$1 = scaleTranslate$1((k = +_) * sx, k * sy, tx, ty), reset()) : k;
9641
10172
  },
9642
10173
  translate: function(_) {
9643
- return arguments.length ? (transform$$1 = scaleTranslate(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty];
10174
+ return arguments.length ? (transform$$1 = scaleTranslate$1(k * sx, k * sy, tx = +_[0], ty = +_[1]), reset()) : [tx, ty];
9644
10175
  },
9645
10176
  reflectX: function(_) {
9646
- return arguments.length ? (transform$$1 = scaleTranslate(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0;
10177
+ return arguments.length ? (transform$$1 = scaleTranslate$1(k * (sx = _ ? -1 : 1), k * sy, tx, ty), reset()) : sx < 0;
9647
10178
  },
9648
10179
  reflectY: function(_) {
9649
- return arguments.length ? (transform$$1 = scaleTranslate(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0;
10180
+ return arguments.length ? (transform$$1 = scaleTranslate$1(k * sx, k * (sy = _ ? -1 : 1), tx, ty), reset()) : sy < 0;
9650
10181
  },
9651
10182
  fitExtent: function(extent, object) {
9652
10183
  return fitExtent(projection, extent, object);
@@ -10031,7 +10562,7 @@ Node.prototype = hierarchy.prototype = {
10031
10562
  copy: node_copy
10032
10563
  };
10033
10564
 
10034
- var slice$3 = Array.prototype.slice;
10565
+ var slice$4 = Array.prototype.slice;
10035
10566
 
10036
10567
  function shuffle$1(array) {
10037
10568
  var m = array.length,
@@ -10049,7 +10580,7 @@ function shuffle$1(array) {
10049
10580
  }
10050
10581
 
10051
10582
  function enclose(circles) {
10052
- var i = 0, n = (circles = shuffle$1(slice$3.call(circles))).length, B = [], p, e;
10583
+ var i = 0, n = (circles = shuffle$1(slice$4.call(circles))).length, B = [], p, e;
10053
10584
 
10054
10585
  while (i < n) {
10055
10586
  p = circles[i];
@@ -10165,30 +10696,33 @@ function encloseBasis3(a, b, c) {
10165
10696
  };
10166
10697
  }
10167
10698
 
10168
- function place(a, b, c) {
10169
- var ax = a.x,
10170
- ay = a.y,
10171
- da = b.r + c.r,
10172
- db = a.r + c.r,
10173
- dx = b.x - ax,
10174
- dy = b.y - ay,
10175
- dc = dx * dx + dy * dy;
10176
- if (dc) {
10177
- var x = 0.5 + ((db *= db) - (da *= da)) / (2 * dc),
10178
- y = Math.sqrt(Math.max(0, 2 * da * (db + dc) - (db -= dc) * db - da * da)) / (2 * dc);
10179
- c.x = ax + x * dx + y * dy;
10180
- c.y = ay + x * dy - y * dx;
10699
+ function place(b, a, c) {
10700
+ var dx = b.x - a.x, x, a2,
10701
+ dy = b.y - a.y, y, b2,
10702
+ d2 = dx * dx + dy * dy;
10703
+ if (d2) {
10704
+ a2 = a.r + c.r, a2 *= a2;
10705
+ b2 = b.r + c.r, b2 *= b2;
10706
+ if (a2 > b2) {
10707
+ x = (d2 + b2 - a2) / (2 * d2);
10708
+ y = Math.sqrt(Math.max(0, b2 / d2 - x * x));
10709
+ c.x = b.x - x * dx - y * dy;
10710
+ c.y = b.y - x * dy + y * dx;
10711
+ } else {
10712
+ x = (d2 + a2 - b2) / (2 * d2);
10713
+ y = Math.sqrt(Math.max(0, a2 / d2 - x * x));
10714
+ c.x = a.x + x * dx - y * dy;
10715
+ c.y = a.y + x * dy + y * dx;
10716
+ }
10181
10717
  } else {
10182
- c.x = ax + db;
10183
- c.y = ay;
10718
+ c.x = a.x + c.r;
10719
+ c.y = a.y;
10184
10720
  }
10185
10721
  }
10186
10722
 
10187
10723
  function intersects(a, b) {
10188
- var dx = b.x - a.x,
10189
- dy = b.y - a.y,
10190
- dr = a.r + b.r;
10191
- return dr * dr - 1e-6 > dx * dx + dy * dy;
10724
+ var dr = a.r + b.r - 1e-6, dx = b.x - a.x, dy = b.y - a.y;
10725
+ return dr > 0 && dr * dr > dx * dx + dy * dy;
10192
10726
  }
10193
10727
 
10194
10728
  function score(node) {
@@ -10292,7 +10826,7 @@ function constantZero() {
10292
10826
  return 0;
10293
10827
  }
10294
10828
 
10295
- function constant$8(x) {
10829
+ function constant$9(x) {
10296
10830
  return function() {
10297
10831
  return x;
10298
10832
  };
@@ -10332,7 +10866,7 @@ function index$2() {
10332
10866
  };
10333
10867
 
10334
10868
  pack.padding = function(x) {
10335
- return arguments.length ? (padding = typeof x === "function" ? x : constant$8(+x), pack) : padding;
10869
+ return arguments.length ? (padding = typeof x === "function" ? x : constant$9(+x), pack) : padding;
10336
10870
  };
10337
10871
 
10338
10872
  return pack;
@@ -10444,9 +10978,9 @@ function partition() {
10444
10978
  return partition;
10445
10979
  }
10446
10980
 
10447
- var keyPrefix$1 = "$";
10448
- var preroot = {depth: -1};
10449
- var ambiguous = {};
10981
+ var keyPrefix$1 = "$", // Protect against keys like “__proto__”.
10982
+ preroot = {depth: -1},
10983
+ ambiguous = {};
10450
10984
 
10451
10985
  function defaultId(d) {
10452
10986
  return d.id;
@@ -10892,7 +11426,7 @@ function index$3() {
10892
11426
  };
10893
11427
 
10894
11428
  treemap.paddingInner = function(x) {
10895
- return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$8(+x), treemap) : paddingInner;
11429
+ return arguments.length ? (paddingInner = typeof x === "function" ? x : constant$9(+x), treemap) : paddingInner;
10896
11430
  };
10897
11431
 
10898
11432
  treemap.paddingOuter = function(x) {
@@ -10900,19 +11434,19 @@ function index$3() {
10900
11434
  };
10901
11435
 
10902
11436
  treemap.paddingTop = function(x) {
10903
- return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$8(+x), treemap) : paddingTop;
11437
+ return arguments.length ? (paddingTop = typeof x === "function" ? x : constant$9(+x), treemap) : paddingTop;
10904
11438
  };
10905
11439
 
10906
11440
  treemap.paddingRight = function(x) {
10907
- return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$8(+x), treemap) : paddingRight;
11441
+ return arguments.length ? (paddingRight = typeof x === "function" ? x : constant$9(+x), treemap) : paddingRight;
10908
11442
  };
10909
11443
 
10910
11444
  treemap.paddingBottom = function(x) {
10911
- return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$8(+x), treemap) : paddingBottom;
11445
+ return arguments.length ? (paddingBottom = typeof x === "function" ? x : constant$9(+x), treemap) : paddingBottom;
10912
11446
  };
10913
11447
 
10914
11448
  treemap.paddingLeft = function(x) {
10915
- return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$8(+x), treemap) : paddingLeft;
11449
+ return arguments.length ? (paddingLeft = typeof x === "function" ? x : constant$9(+x), treemap) : paddingLeft;
10916
11450
  };
10917
11451
 
10918
11452
  return treemap;
@@ -11002,7 +11536,7 @@ var resquarify = (function custom(ratio) {
11002
11536
  return resquarify;
11003
11537
  })(phi);
11004
11538
 
11005
- function area$1(polygon) {
11539
+ function area$2(polygon) {
11006
11540
  var i = -1,
11007
11541
  n = polygon.length,
11008
11542
  a,
@@ -11095,7 +11629,7 @@ function hull(points) {
11095
11629
  return hull;
11096
11630
  }
11097
11631
 
11098
- function contains$1(polygon, point) {
11632
+ function contains$2(polygon, point) {
11099
11633
  var n = polygon.length,
11100
11634
  p = polygon[n - 1],
11101
11635
  x = point[0], y = point[1],
@@ -11136,128 +11670,6 @@ function length$2(polygon) {
11136
11670
  return perimeter;
11137
11671
  }
11138
11672
 
11139
- var slice$4 = [].slice;
11140
-
11141
- var noabort = {};
11142
-
11143
- function Queue(size) {
11144
- this._size = size;
11145
- this._call =
11146
- this._error = null;
11147
- this._tasks = [];
11148
- this._data = [];
11149
- this._waiting =
11150
- this._active =
11151
- this._ended =
11152
- this._start = 0; // inside a synchronous task callback?
11153
- }
11154
-
11155
- Queue.prototype = queue.prototype = {
11156
- constructor: Queue,
11157
- defer: function(callback) {
11158
- if (typeof callback !== "function") throw new Error("invalid callback");
11159
- if (this._call) throw new Error("defer after await");
11160
- if (this._error != null) return this;
11161
- var t = slice$4.call(arguments, 1);
11162
- t.push(callback);
11163
- ++this._waiting, this._tasks.push(t);
11164
- poke$1(this);
11165
- return this;
11166
- },
11167
- abort: function() {
11168
- if (this._error == null) abort(this, new Error("abort"));
11169
- return this;
11170
- },
11171
- await: function(callback) {
11172
- if (typeof callback !== "function") throw new Error("invalid callback");
11173
- if (this._call) throw new Error("multiple await");
11174
- this._call = function(error, results) { callback.apply(null, [error].concat(results)); };
11175
- maybeNotify(this);
11176
- return this;
11177
- },
11178
- awaitAll: function(callback) {
11179
- if (typeof callback !== "function") throw new Error("invalid callback");
11180
- if (this._call) throw new Error("multiple await");
11181
- this._call = callback;
11182
- maybeNotify(this);
11183
- return this;
11184
- }
11185
- };
11186
-
11187
- function poke$1(q) {
11188
- if (!q._start) {
11189
- try { start$1(q); } // let the current task complete
11190
- catch (e) {
11191
- if (q._tasks[q._ended + q._active - 1]) abort(q, e); // task errored synchronously
11192
- else if (!q._data) throw e; // await callback errored synchronously
11193
- }
11194
- }
11195
- }
11196
-
11197
- function start$1(q) {
11198
- while (q._start = q._waiting && q._active < q._size) {
11199
- var i = q._ended + q._active,
11200
- t = q._tasks[i],
11201
- j = t.length - 1,
11202
- c = t[j];
11203
- t[j] = end(q, i);
11204
- --q._waiting, ++q._active;
11205
- t = c.apply(null, t);
11206
- if (!q._tasks[i]) continue; // task finished synchronously
11207
- q._tasks[i] = t || noabort;
11208
- }
11209
- }
11210
-
11211
- function end(q, i) {
11212
- return function(e, r) {
11213
- if (!q._tasks[i]) return; // ignore multiple callbacks
11214
- --q._active, ++q._ended;
11215
- q._tasks[i] = null;
11216
- if (q._error != null) return; // ignore secondary errors
11217
- if (e != null) {
11218
- abort(q, e);
11219
- } else {
11220
- q._data[i] = r;
11221
- if (q._waiting) poke$1(q);
11222
- else maybeNotify(q);
11223
- }
11224
- };
11225
- }
11226
-
11227
- function abort(q, e) {
11228
- var i = q._tasks.length, t;
11229
- q._error = e; // ignore active callbacks
11230
- q._data = undefined; // allow gc
11231
- q._waiting = NaN; // prevent starting
11232
-
11233
- while (--i >= 0) {
11234
- if (t = q._tasks[i]) {
11235
- q._tasks[i] = null;
11236
- if (t.abort) {
11237
- try { t.abort(); }
11238
- catch (e) { /* ignore */ }
11239
- }
11240
- }
11241
- }
11242
-
11243
- q._active = NaN; // allow notification
11244
- maybeNotify(q);
11245
- }
11246
-
11247
- function maybeNotify(q) {
11248
- if (!q._active && q._call) {
11249
- var d = q._data;
11250
- q._data = undefined; // allow gc
11251
- q._call(q._error, d);
11252
- }
11253
- }
11254
-
11255
- function queue(concurrency) {
11256
- if (concurrency == null) concurrency = Infinity;
11257
- else if (!((concurrency = +concurrency) >= 1)) throw new Error("invalid concurrency");
11258
- return new Queue(concurrency);
11259
- }
11260
-
11261
11673
  function defaultSource$1() {
11262
11674
  return Math.random();
11263
11675
  }
@@ -11356,208 +11768,10 @@ var exponential$1 = (function sourceRandomExponential(source) {
11356
11768
  return randomExponential;
11357
11769
  })(defaultSource$1);
11358
11770
 
11359
- function request(url, callback) {
11360
- var request,
11361
- event = dispatch("beforesend", "progress", "load", "error"),
11362
- mimeType,
11363
- headers = map$1(),
11364
- xhr = new XMLHttpRequest,
11365
- user = null,
11366
- password = null,
11367
- response,
11368
- responseType,
11369
- timeout = 0;
11370
-
11371
- // If IE does not support CORS, use XDomainRequest.
11372
- if (typeof XDomainRequest !== "undefined"
11373
- && !("withCredentials" in xhr)
11374
- && /^(http(s)?:)?\/\//.test(url)) xhr = new XDomainRequest;
11375
-
11376
- "onload" in xhr
11377
- ? xhr.onload = xhr.onerror = xhr.ontimeout = respond
11378
- : xhr.onreadystatechange = function(o) { xhr.readyState > 3 && respond(o); };
11379
-
11380
- function respond(o) {
11381
- var status = xhr.status, result;
11382
- if (!status && hasResponse(xhr)
11383
- || status >= 200 && status < 300
11384
- || status === 304) {
11385
- if (response) {
11386
- try {
11387
- result = response.call(request, xhr);
11388
- } catch (e) {
11389
- event.call("error", request, e);
11390
- return;
11391
- }
11392
- } else {
11393
- result = xhr;
11394
- }
11395
- event.call("load", request, result);
11396
- } else {
11397
- event.call("error", request, o);
11398
- }
11399
- }
11400
-
11401
- xhr.onprogress = function(e) {
11402
- event.call("progress", request, e);
11403
- };
11404
-
11405
- request = {
11406
- header: function(name, value) {
11407
- name = (name + "").toLowerCase();
11408
- if (arguments.length < 2) return headers.get(name);
11409
- if (value == null) headers.remove(name);
11410
- else headers.set(name, value + "");
11411
- return request;
11412
- },
11413
-
11414
- // If mimeType is non-null and no Accept header is set, a default is used.
11415
- mimeType: function(value) {
11416
- if (!arguments.length) return mimeType;
11417
- mimeType = value == null ? null : value + "";
11418
- return request;
11419
- },
11420
-
11421
- // Specifies what type the response value should take;
11422
- // for instance, arraybuffer, blob, document, or text.
11423
- responseType: function(value) {
11424
- if (!arguments.length) return responseType;
11425
- responseType = value;
11426
- return request;
11427
- },
11428
-
11429
- timeout: function(value) {
11430
- if (!arguments.length) return timeout;
11431
- timeout = +value;
11432
- return request;
11433
- },
11434
-
11435
- user: function(value) {
11436
- return arguments.length < 1 ? user : (user = value == null ? null : value + "", request);
11437
- },
11438
-
11439
- password: function(value) {
11440
- return arguments.length < 1 ? password : (password = value == null ? null : value + "", request);
11441
- },
11442
-
11443
- // Specify how to convert the response content to a specific type;
11444
- // changes the callback value on "load" events.
11445
- response: function(value) {
11446
- response = value;
11447
- return request;
11448
- },
11449
-
11450
- // Alias for send("GET", …).
11451
- get: function(data, callback) {
11452
- return request.send("GET", data, callback);
11453
- },
11454
-
11455
- // Alias for send("POST", …).
11456
- post: function(data, callback) {
11457
- return request.send("POST", data, callback);
11458
- },
11459
-
11460
- // If callback is non-null, it will be used for error and load events.
11461
- send: function(method, data, callback) {
11462
- xhr.open(method, url, true, user, password);
11463
- if (mimeType != null && !headers.has("accept")) headers.set("accept", mimeType + ",*/*");
11464
- if (xhr.setRequestHeader) headers.each(function(value, name) { xhr.setRequestHeader(name, value); });
11465
- if (mimeType != null && xhr.overrideMimeType) xhr.overrideMimeType(mimeType);
11466
- if (responseType != null) xhr.responseType = responseType;
11467
- if (timeout > 0) xhr.timeout = timeout;
11468
- if (callback == null && typeof data === "function") callback = data, data = null;
11469
- if (callback != null && callback.length === 1) callback = fixCallback(callback);
11470
- if (callback != null) request.on("error", callback).on("load", function(xhr) { callback(null, xhr); });
11471
- event.call("beforesend", request, xhr);
11472
- xhr.send(data == null ? null : data);
11473
- return request;
11474
- },
11475
-
11476
- abort: function() {
11477
- xhr.abort();
11478
- return request;
11479
- },
11480
-
11481
- on: function() {
11482
- var value = event.on.apply(event, arguments);
11483
- return value === event ? request : value;
11484
- }
11485
- };
11486
-
11487
- if (callback != null) {
11488
- if (typeof callback !== "function") throw new Error("invalid callback: " + callback);
11489
- return request.get(callback);
11490
- }
11491
-
11492
- return request;
11493
- }
11494
-
11495
- function fixCallback(callback) {
11496
- return function(error, xhr) {
11497
- callback(error == null ? xhr : null);
11498
- };
11499
- }
11500
-
11501
- function hasResponse(xhr) {
11502
- var type = xhr.responseType;
11503
- return type && type !== "text"
11504
- ? xhr.response // null on error
11505
- : xhr.responseText; // "" on error
11506
- }
11507
-
11508
- function type$1(defaultMimeType, response) {
11509
- return function(url, callback) {
11510
- var r = request(url).mimeType(defaultMimeType).response(response);
11511
- if (callback != null) {
11512
- if (typeof callback !== "function") throw new Error("invalid callback: " + callback);
11513
- return r.get(callback);
11514
- }
11515
- return r;
11516
- };
11517
- }
11518
-
11519
- var html = type$1("text/html", function(xhr) {
11520
- return document.createRange().createContextualFragment(xhr.responseText);
11521
- });
11522
-
11523
- var json = type$1("application/json", function(xhr) {
11524
- return JSON.parse(xhr.responseText);
11525
- });
11526
-
11527
- var text = type$1("text/plain", function(xhr) {
11528
- return xhr.responseText;
11529
- });
11530
-
11531
- var xml = type$1("application/xml", function(xhr) {
11532
- var xml = xhr.responseXML;
11533
- if (!xml) throw new Error("parse error");
11534
- return xml;
11535
- });
11771
+ var array$3 = Array.prototype;
11536
11772
 
11537
- function dsv$1(defaultMimeType, parse) {
11538
- return function(url, row, callback) {
11539
- if (arguments.length < 3) callback = row, row = null;
11540
- var r = request(url).mimeType(defaultMimeType);
11541
- r.row = function(_) { return arguments.length ? r.response(responseOf(parse, row = _)) : row; };
11542
- r.row(row);
11543
- return callback ? r.get(callback) : r;
11544
- };
11545
- }
11546
-
11547
- function responseOf(parse, row) {
11548
- return function(request$$1) {
11549
- return parse(request$$1.responseText, row);
11550
- };
11551
- }
11552
-
11553
- var csv$1 = dsv$1("text/csv", csvParse);
11554
-
11555
- var tsv$1 = dsv$1("text/tab-separated-values", tsvParse);
11556
-
11557
- var array$2 = Array.prototype;
11558
-
11559
- var map$3 = array$2.map;
11560
- var slice$5 = array$2.slice;
11773
+ var map$2 = array$3.map;
11774
+ var slice$5 = array$3.slice;
11561
11775
 
11562
11776
  var implicit = {name: "implicit"};
11563
11777
 
@@ -11702,7 +11916,7 @@ function point$1() {
11702
11916
  return pointish(band().paddingInner(1));
11703
11917
  }
11704
11918
 
11705
- function constant$9(x) {
11919
+ function constant$10(x) {
11706
11920
  return function() {
11707
11921
  return x;
11708
11922
  };
@@ -11717,7 +11931,7 @@ var unit = [0, 1];
11717
11931
  function deinterpolateLinear(a, b) {
11718
11932
  return (b -= (a = +a))
11719
11933
  ? function(x) { return (x - a) / b; }
11720
- : constant$9(b);
11934
+ : constant$10(b);
11721
11935
  }
11722
11936
 
11723
11937
  function deinterpolateClamp(deinterpolate) {
@@ -11727,21 +11941,21 @@ function deinterpolateClamp(deinterpolate) {
11727
11941
  };
11728
11942
  }
11729
11943
 
11730
- function reinterpolateClamp(reinterpolate) {
11944
+ function reinterpolateClamp(reinterpolate$$1) {
11731
11945
  return function(a, b) {
11732
- var r = reinterpolate(a = +a, b = +b);
11946
+ var r = reinterpolate$$1(a = +a, b = +b);
11733
11947
  return function(t) { return t <= 0 ? a : t >= 1 ? b : r(t); };
11734
11948
  };
11735
11949
  }
11736
11950
 
11737
- function bimap(domain, range, deinterpolate, reinterpolate) {
11951
+ function bimap(domain, range, deinterpolate, reinterpolate$$1) {
11738
11952
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
11739
- if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate(r1, r0);
11740
- else d0 = deinterpolate(d0, d1), r0 = reinterpolate(r0, r1);
11953
+ if (d1 < d0) d0 = deinterpolate(d1, d0), r0 = reinterpolate$$1(r1, r0);
11954
+ else d0 = deinterpolate(d0, d1), r0 = reinterpolate$$1(r0, r1);
11741
11955
  return function(x) { return r0(d0(x)); };
11742
11956
  }
11743
11957
 
11744
- function polymap(domain, range, deinterpolate, reinterpolate) {
11958
+ function polymap(domain, range, deinterpolate, reinterpolate$$1) {
11745
11959
  var j = Math.min(domain.length, range.length) - 1,
11746
11960
  d = new Array(j),
11747
11961
  r = new Array(j),
@@ -11755,7 +11969,7 @@ function polymap(domain, range, deinterpolate, reinterpolate) {
11755
11969
 
11756
11970
  while (++i < j) {
11757
11971
  d[i] = deinterpolate(domain[i], domain[i + 1]);
11758
- r[i] = reinterpolate(range[i], range[i + 1]);
11972
+ r[i] = reinterpolate$$1(range[i], range[i + 1]);
11759
11973
  }
11760
11974
 
11761
11975
  return function(x) {
@@ -11774,31 +11988,31 @@ function copy(source, target) {
11774
11988
 
11775
11989
  // deinterpolate(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
11776
11990
  // reinterpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding domain value x in [a,b].
11777
- function continuous(deinterpolate, reinterpolate) {
11991
+ function continuous(deinterpolate, reinterpolate$$1) {
11778
11992
  var domain = unit,
11779
11993
  range = unit,
11780
11994
  interpolate$$1 = interpolateValue,
11781
11995
  clamp = false,
11782
- piecewise,
11996
+ piecewise$$1,
11783
11997
  output,
11784
11998
  input;
11785
11999
 
11786
12000
  function rescale() {
11787
- piecewise = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
12001
+ piecewise$$1 = Math.min(domain.length, range.length) > 2 ? polymap : bimap;
11788
12002
  output = input = null;
11789
12003
  return scale;
11790
12004
  }
11791
12005
 
11792
12006
  function scale(x) {
11793
- return (output || (output = piecewise(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);
12007
+ return (output || (output = piecewise$$1(domain, range, clamp ? deinterpolateClamp(deinterpolate) : deinterpolate, interpolate$$1)))(+x);
11794
12008
  }
11795
12009
 
11796
12010
  scale.invert = function(y) {
11797
- return (input || (input = piecewise(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate) : reinterpolate)))(+y);
12011
+ return (input || (input = piecewise$$1(range, domain, deinterpolateLinear, clamp ? reinterpolateClamp(reinterpolate$$1) : reinterpolate$$1)))(+y);
11798
12012
  };
11799
12013
 
11800
12014
  scale.domain = function(_) {
11801
- return arguments.length ? (domain = map$3.call(_, number$2), rescale()) : domain.slice();
12015
+ return arguments.length ? (domain = map$2.call(_, number$2), rescale()) : domain.slice();
11802
12016
  };
11803
12017
 
11804
12018
  scale.range = function(_) {
@@ -11924,7 +12138,7 @@ function identity$6() {
11924
12138
  scale.invert = scale;
11925
12139
 
11926
12140
  scale.domain = scale.range = function(_) {
11927
- return arguments.length ? (domain = map$3.call(_, number$2), scale) : domain.slice();
12141
+ return arguments.length ? (domain = map$2.call(_, number$2), scale) : domain.slice();
11928
12142
  };
11929
12143
 
11930
12144
  scale.copy = function() {
@@ -11956,7 +12170,7 @@ function nice(domain, interval) {
11956
12170
  function deinterpolate(a, b) {
11957
12171
  return (b = Math.log(b / a))
11958
12172
  ? function(x) { return Math.log(x / a) / b; }
11959
- : constant$9(b);
12173
+ : constant$10(b);
11960
12174
  }
11961
12175
 
11962
12176
  function reinterpolate$1(a, b) {
@@ -12088,7 +12302,7 @@ function pow$1() {
12088
12302
  function deinterpolate(a, b) {
12089
12303
  return (b = raise$1(b, exponent) - (a = raise$1(a, exponent)))
12090
12304
  ? function(x) { return (raise$1(x, exponent) - a) / b; }
12091
- : constant$9(b);
12305
+ : constant$10(b);
12092
12306
  }
12093
12307
 
12094
12308
  function reinterpolate(a, b) {
@@ -12234,8 +12448,8 @@ function threshold$1() {
12234
12448
  return scale;
12235
12449
  }
12236
12450
 
12237
- var t0$1 = new Date;
12238
- var t1$1 = new Date;
12451
+ var t0$1 = new Date,
12452
+ t1$1 = new Date;
12239
12453
 
12240
12454
  function newInterval(floori, offseti, count, field) {
12241
12455
 
@@ -12324,51 +12538,47 @@ millisecond.every = function(k) {
12324
12538
  return (end - start) / k;
12325
12539
  });
12326
12540
  };
12327
-
12328
12541
  var milliseconds = millisecond.range;
12329
12542
 
12330
- var durationSecond$1 = 1e3;
12331
- var durationMinute$1 = 6e4;
12332
- var durationHour$1 = 36e5;
12333
- var durationDay$1 = 864e5;
12334
- var durationWeek$1 = 6048e5;
12543
+ var durationSecond = 1e3;
12544
+ var durationMinute = 6e4;
12545
+ var durationHour = 36e5;
12546
+ var durationDay = 864e5;
12547
+ var durationWeek = 6048e5;
12335
12548
 
12336
12549
  var second = newInterval(function(date) {
12337
- date.setTime(Math.floor(date / durationSecond$1) * durationSecond$1);
12550
+ date.setTime(Math.floor(date / durationSecond) * durationSecond);
12338
12551
  }, function(date, step) {
12339
- date.setTime(+date + step * durationSecond$1);
12552
+ date.setTime(+date + step * durationSecond);
12340
12553
  }, function(start, end) {
12341
- return (end - start) / durationSecond$1;
12554
+ return (end - start) / durationSecond;
12342
12555
  }, function(date) {
12343
12556
  return date.getUTCSeconds();
12344
12557
  });
12345
-
12346
12558
  var seconds = second.range;
12347
12559
 
12348
12560
  var minute = newInterval(function(date) {
12349
- date.setTime(Math.floor(date / durationMinute$1) * durationMinute$1);
12561
+ date.setTime(Math.floor(date / durationMinute) * durationMinute);
12350
12562
  }, function(date, step) {
12351
- date.setTime(+date + step * durationMinute$1);
12563
+ date.setTime(+date + step * durationMinute);
12352
12564
  }, function(start, end) {
12353
- return (end - start) / durationMinute$1;
12565
+ return (end - start) / durationMinute;
12354
12566
  }, function(date) {
12355
12567
  return date.getMinutes();
12356
12568
  });
12357
-
12358
12569
  var minutes = minute.range;
12359
12570
 
12360
12571
  var hour = newInterval(function(date) {
12361
- var offset = date.getTimezoneOffset() * durationMinute$1 % durationHour$1;
12362
- if (offset < 0) offset += durationHour$1;
12363
- date.setTime(Math.floor((+date - offset) / durationHour$1) * durationHour$1 + offset);
12572
+ var offset = date.getTimezoneOffset() * durationMinute % durationHour;
12573
+ if (offset < 0) offset += durationHour;
12574
+ date.setTime(Math.floor((+date - offset) / durationHour) * durationHour + offset);
12364
12575
  }, function(date, step) {
12365
- date.setTime(+date + step * durationHour$1);
12576
+ date.setTime(+date + step * durationHour);
12366
12577
  }, function(start, end) {
12367
- return (end - start) / durationHour$1;
12578
+ return (end - start) / durationHour;
12368
12579
  }, function(date) {
12369
12580
  return date.getHours();
12370
12581
  });
12371
-
12372
12582
  var hours = hour.range;
12373
12583
 
12374
12584
  var day = newInterval(function(date) {
@@ -12376,11 +12586,10 @@ var day = newInterval(function(date) {
12376
12586
  }, function(date, step) {
12377
12587
  date.setDate(date.getDate() + step);
12378
12588
  }, function(start, end) {
12379
- return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute$1) / durationDay$1;
12589
+ return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
12380
12590
  }, function(date) {
12381
12591
  return date.getDate() - 1;
12382
12592
  });
12383
-
12384
12593
  var days = day.range;
12385
12594
 
12386
12595
  function weekday(i) {
@@ -12390,7 +12599,7 @@ function weekday(i) {
12390
12599
  }, function(date, step) {
12391
12600
  date.setDate(date.getDate() + step * 7);
12392
12601
  }, function(start, end) {
12393
- return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute$1) / durationWeek$1;
12602
+ return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
12394
12603
  });
12395
12604
  }
12396
12605
 
@@ -12420,7 +12629,6 @@ var month = newInterval(function(date) {
12420
12629
  }, function(date) {
12421
12630
  return date.getMonth();
12422
12631
  });
12423
-
12424
12632
  var months = month.range;
12425
12633
 
12426
12634
  var year = newInterval(function(date) {
@@ -12444,31 +12652,28 @@ year.every = function(k) {
12444
12652
  date.setFullYear(date.getFullYear() + step * k);
12445
12653
  });
12446
12654
  };
12447
-
12448
12655
  var years = year.range;
12449
12656
 
12450
12657
  var utcMinute = newInterval(function(date) {
12451
12658
  date.setUTCSeconds(0, 0);
12452
12659
  }, function(date, step) {
12453
- date.setTime(+date + step * durationMinute$1);
12660
+ date.setTime(+date + step * durationMinute);
12454
12661
  }, function(start, end) {
12455
- return (end - start) / durationMinute$1;
12662
+ return (end - start) / durationMinute;
12456
12663
  }, function(date) {
12457
12664
  return date.getUTCMinutes();
12458
12665
  });
12459
-
12460
12666
  var utcMinutes = utcMinute.range;
12461
12667
 
12462
12668
  var utcHour = newInterval(function(date) {
12463
12669
  date.setUTCMinutes(0, 0, 0);
12464
12670
  }, function(date, step) {
12465
- date.setTime(+date + step * durationHour$1);
12671
+ date.setTime(+date + step * durationHour);
12466
12672
  }, function(start, end) {
12467
- return (end - start) / durationHour$1;
12673
+ return (end - start) / durationHour;
12468
12674
  }, function(date) {
12469
12675
  return date.getUTCHours();
12470
12676
  });
12471
-
12472
12677
  var utcHours = utcHour.range;
12473
12678
 
12474
12679
  var utcDay = newInterval(function(date) {
@@ -12476,11 +12681,10 @@ var utcDay = newInterval(function(date) {
12476
12681
  }, function(date, step) {
12477
12682
  date.setUTCDate(date.getUTCDate() + step);
12478
12683
  }, function(start, end) {
12479
- return (end - start) / durationDay$1;
12684
+ return (end - start) / durationDay;
12480
12685
  }, function(date) {
12481
12686
  return date.getUTCDate() - 1;
12482
12687
  });
12483
-
12484
12688
  var utcDays = utcDay.range;
12485
12689
 
12486
12690
  function utcWeekday(i) {
@@ -12490,7 +12694,7 @@ function utcWeekday(i) {
12490
12694
  }, function(date, step) {
12491
12695
  date.setUTCDate(date.getUTCDate() + step * 7);
12492
12696
  }, function(start, end) {
12493
- return (end - start) / durationWeek$1;
12697
+ return (end - start) / durationWeek;
12494
12698
  });
12495
12699
  }
12496
12700
 
@@ -12520,7 +12724,6 @@ var utcMonth = newInterval(function(date) {
12520
12724
  }, function(date) {
12521
12725
  return date.getUTCMonth();
12522
12726
  });
12523
-
12524
12727
  var utcMonths = utcMonth.range;
12525
12728
 
12526
12729
  var utcYear = newInterval(function(date) {
@@ -12544,7 +12747,6 @@ utcYear.every = function(k) {
12544
12747
  date.setUTCFullYear(date.getUTCFullYear() + step * k);
12545
12748
  });
12546
12749
  };
12547
-
12548
12750
  var utcYears = utcYear.range;
12549
12751
 
12550
12752
  function localDate(d) {
@@ -12897,10 +13099,10 @@ function formatLocale$1(locale) {
12897
13099
  };
12898
13100
  }
12899
13101
 
12900
- var pads = {"-": "", "_": " ", "0": "0"};
12901
- var numberRe = /^\s*\d+/;
12902
- var percentRe = /^%/;
12903
- var requoteRe = /[\\^$*+?|[\]().{}]/g;
13102
+ var pads = {"-": "", "_": " ", "0": "0"},
13103
+ numberRe = /^\s*\d+/, // note: ignores next directive
13104
+ percentRe = /^%/,
13105
+ requoteRe = /[\\^$*+?|[\]().{}]/g;
12904
13106
 
12905
13107
  function pad(value, fill, width) {
12906
13108
  var sign = value < 0 ? "-" : "",
@@ -13177,10 +13379,6 @@ function formatUnixTimestampSeconds(d) {
13177
13379
 
13178
13380
  var locale$1;
13179
13381
 
13180
-
13181
-
13182
-
13183
-
13184
13382
  defaultLocale$1({
13185
13383
  dateTime: "%x, %X",
13186
13384
  date: "%-m/%-d/%Y",
@@ -13220,13 +13418,13 @@ var parseIso = +new Date("2000-01-01T00:00:00.000Z")
13220
13418
  ? parseIsoNative
13221
13419
  : exports.utcParse(isoSpecifier);
13222
13420
 
13223
- var durationSecond = 1000;
13224
- var durationMinute = durationSecond * 60;
13225
- var durationHour = durationMinute * 60;
13226
- var durationDay = durationHour * 24;
13227
- var durationWeek = durationDay * 7;
13228
- var durationMonth = durationDay * 30;
13229
- var durationYear = durationDay * 365;
13421
+ var durationSecond$1 = 1000,
13422
+ durationMinute$1 = durationSecond$1 * 60,
13423
+ durationHour$1 = durationMinute$1 * 60,
13424
+ durationDay$1 = durationHour$1 * 24,
13425
+ durationWeek$1 = durationDay$1 * 7,
13426
+ durationMonth = durationDay$1 * 30,
13427
+ durationYear = durationDay$1 * 365;
13230
13428
 
13231
13429
  function date$1(t) {
13232
13430
  return new Date(t);
@@ -13251,34 +13449,34 @@ function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1
13251
13449
  formatYear = format("%Y");
13252
13450
 
13253
13451
  var tickIntervals = [
13254
- [second$$1, 1, durationSecond],
13255
- [second$$1, 5, 5 * durationSecond],
13256
- [second$$1, 15, 15 * durationSecond],
13257
- [second$$1, 30, 30 * durationSecond],
13258
- [minute$$1, 1, durationMinute],
13259
- [minute$$1, 5, 5 * durationMinute],
13260
- [minute$$1, 15, 15 * durationMinute],
13261
- [minute$$1, 30, 30 * durationMinute],
13262
- [ hour$$1, 1, durationHour ],
13263
- [ hour$$1, 3, 3 * durationHour ],
13264
- [ hour$$1, 6, 6 * durationHour ],
13265
- [ hour$$1, 12, 12 * durationHour ],
13266
- [ day$$1, 1, durationDay ],
13267
- [ day$$1, 2, 2 * durationDay ],
13268
- [ week, 1, durationWeek ],
13452
+ [second$$1, 1, durationSecond$1],
13453
+ [second$$1, 5, 5 * durationSecond$1],
13454
+ [second$$1, 15, 15 * durationSecond$1],
13455
+ [second$$1, 30, 30 * durationSecond$1],
13456
+ [minute$$1, 1, durationMinute$1],
13457
+ [minute$$1, 5, 5 * durationMinute$1],
13458
+ [minute$$1, 15, 15 * durationMinute$1],
13459
+ [minute$$1, 30, 30 * durationMinute$1],
13460
+ [ hour$$1, 1, durationHour$1 ],
13461
+ [ hour$$1, 3, 3 * durationHour$1 ],
13462
+ [ hour$$1, 6, 6 * durationHour$1 ],
13463
+ [ hour$$1, 12, 12 * durationHour$1 ],
13464
+ [ day$$1, 1, durationDay$1 ],
13465
+ [ day$$1, 2, 2 * durationDay$1 ],
13466
+ [ week, 1, durationWeek$1 ],
13269
13467
  [ month$$1, 1, durationMonth ],
13270
13468
  [ month$$1, 3, 3 * durationMonth ],
13271
13469
  [ year$$1, 1, durationYear ]
13272
13470
  ];
13273
13471
 
13274
- function tickFormat(date) {
13275
- return (second$$1(date) < date ? formatMillisecond
13276
- : minute$$1(date) < date ? formatSecond
13277
- : hour$$1(date) < date ? formatMinute
13278
- : day$$1(date) < date ? formatHour
13279
- : month$$1(date) < date ? (week(date) < date ? formatDay : formatWeek)
13280
- : year$$1(date) < date ? formatMonth
13281
- : formatYear)(date);
13472
+ function tickFormat(date$$1) {
13473
+ return (second$$1(date$$1) < date$$1 ? formatMillisecond
13474
+ : minute$$1(date$$1) < date$$1 ? formatSecond
13475
+ : hour$$1(date$$1) < date$$1 ? formatMinute
13476
+ : day$$1(date$$1) < date$$1 ? formatHour
13477
+ : month$$1(date$$1) < date$$1 ? (week(date$$1) < date$$1 ? formatDay : formatWeek)
13478
+ : year$$1(date$$1) < date$$1 ? formatMonth
13479
+ : formatYear)(date$$1);
13282
13480
  }
13283
13481
 
13284
13482
  function tickInterval(interval, start, stop, step) {
@@ -13311,7 +13509,7 @@ function calendar(year$$1, month$$1, week, day$$1, hour$$1, minute$$1, second$$1
13311
13509
  };
13312
13510
 
13313
13511
  scale.domain = function(_) {
13314
- return arguments.length ? domain(map$3.call(_, number$3)) : domain().map(date$1);
13512
+ return arguments.length ? domain(map$2.call(_, number$3)) : domain().map(date$1);
13315
13513
  };
13316
13514
 
13317
13515
  scale.ticks = function(interval, step) {
@@ -13352,52 +13550,6 @@ function utcTime() {
13352
13550
  return calendar(utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, millisecond, exports.utcFormat).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]);
13353
13551
  }
13354
13552
 
13355
- function colors(s) {
13356
- return s.match(/.{6}/g).map(function(x) {
13357
- return "#" + x;
13358
- });
13359
- }
13360
-
13361
- var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
13362
-
13363
- var category20b = colors("393b795254a36b6ecf9c9ede6379398ca252b5cf6bcedb9c8c6d31bd9e39e7ba52e7cb94843c39ad494ad6616be7969c7b4173a55194ce6dbdde9ed6");
13364
-
13365
- var category20c = colors("3182bd6baed69ecae1c6dbefe6550dfd8d3cfdae6bfdd0a231a35474c476a1d99bc7e9c0756bb19e9ac8bcbddcdadaeb636363969696bdbdbdd9d9d9");
13366
-
13367
- var category20 = colors("1f77b4aec7e8ff7f0effbb782ca02c98df8ad62728ff98969467bdc5b0d58c564bc49c94e377c2f7b6d27f7f7fc7c7c7bcbd22dbdb8d17becf9edae5");
13368
-
13369
- var cubehelix$3 = cubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));
13370
-
13371
- var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
13372
-
13373
- var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
13374
-
13375
- var rainbow = cubehelix();
13376
-
13377
- function rainbow$1(t) {
13378
- if (t < 0 || t > 1) t -= Math.floor(t);
13379
- var ts = Math.abs(t - 0.5);
13380
- rainbow.h = 360 * t - 100;
13381
- rainbow.s = 1.5 - 1.5 * ts;
13382
- rainbow.l = 0.8 - 0.9 * ts;
13383
- return rainbow + "";
13384
- }
13385
-
13386
- function ramp(range) {
13387
- var n = range.length;
13388
- return function(t) {
13389
- return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
13390
- };
13391
- }
13392
-
13393
- var viridis = ramp(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
13394
-
13395
- var magma = ramp(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
13396
-
13397
- var inferno = ramp(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
13398
-
13399
- var plasma = ramp(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
13400
-
13401
13553
  function sequential(interpolator) {
13402
13554
  var x0 = 0,
13403
13555
  x1 = 1,
@@ -13427,7 +13579,422 @@ function sequential(interpolator) {
13427
13579
  return linearish(scale);
13428
13580
  }
13429
13581
 
13430
- function constant$10(x) {
13582
+ function colors(specifier) {
13583
+ var n = specifier.length / 6 | 0, colors = new Array(n), i = 0;
13584
+ while (i < n) colors[i] = "#" + specifier.slice(i * 6, ++i * 6);
13585
+ return colors;
13586
+ }
13587
+
13588
+ var category10 = colors("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf");
13589
+
13590
+ var Accent = colors("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666");
13591
+
13592
+ var Dark2 = colors("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666");
13593
+
13594
+ var Paired = colors("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928");
13595
+
13596
+ var Pastel1 = colors("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2");
13597
+
13598
+ var Pastel2 = colors("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc");
13599
+
13600
+ var Set1 = colors("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999");
13601
+
13602
+ var Set2 = colors("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3");
13603
+
13604
+ var Set3 = colors("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f");
13605
+
13606
+ function ramp(scheme) {
13607
+ return rgbBasis(scheme[scheme.length - 1]);
13608
+ }
13609
+
13610
+ var scheme = new Array(3).concat(
13611
+ "d8b365f5f5f55ab4ac",
13612
+ "a6611adfc27d80cdc1018571",
13613
+ "a6611adfc27df5f5f580cdc1018571",
13614
+ "8c510ad8b365f6e8c3c7eae55ab4ac01665e",
13615
+ "8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e",
13616
+ "8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e",
13617
+ "8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e",
13618
+ "5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30",
13619
+ "5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30"
13620
+ ).map(colors);
13621
+
13622
+ var BrBG = ramp(scheme);
13623
+
13624
+ var scheme$1 = new Array(3).concat(
13625
+ "af8dc3f7f7f77fbf7b",
13626
+ "7b3294c2a5cfa6dba0008837",
13627
+ "7b3294c2a5cff7f7f7a6dba0008837",
13628
+ "762a83af8dc3e7d4e8d9f0d37fbf7b1b7837",
13629
+ "762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837",
13630
+ "762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837",
13631
+ "762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837",
13632
+ "40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b",
13633
+ "40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b"
13634
+ ).map(colors);
13635
+
13636
+ var PRGn = ramp(scheme$1);
13637
+
13638
+ var scheme$2 = new Array(3).concat(
13639
+ "e9a3c9f7f7f7a1d76a",
13640
+ "d01c8bf1b6dab8e1864dac26",
13641
+ "d01c8bf1b6daf7f7f7b8e1864dac26",
13642
+ "c51b7de9a3c9fde0efe6f5d0a1d76a4d9221",
13643
+ "c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221",
13644
+ "c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221",
13645
+ "c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221",
13646
+ "8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419",
13647
+ "8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419"
13648
+ ).map(colors);
13649
+
13650
+ var PiYG = ramp(scheme$2);
13651
+
13652
+ var scheme$3 = new Array(3).concat(
13653
+ "998ec3f7f7f7f1a340",
13654
+ "5e3c99b2abd2fdb863e66101",
13655
+ "5e3c99b2abd2f7f7f7fdb863e66101",
13656
+ "542788998ec3d8daebfee0b6f1a340b35806",
13657
+ "542788998ec3d8daebf7f7f7fee0b6f1a340b35806",
13658
+ "5427888073acb2abd2d8daebfee0b6fdb863e08214b35806",
13659
+ "5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806",
13660
+ "2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08",
13661
+ "2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08"
13662
+ ).map(colors);
13663
+
13664
+ var PuOr = ramp(scheme$3);
13665
+
13666
+ var scheme$4 = new Array(3).concat(
13667
+ "ef8a62f7f7f767a9cf",
13668
+ "ca0020f4a58292c5de0571b0",
13669
+ "ca0020f4a582f7f7f792c5de0571b0",
13670
+ "b2182bef8a62fddbc7d1e5f067a9cf2166ac",
13671
+ "b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac",
13672
+ "b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac",
13673
+ "b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac",
13674
+ "67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061",
13675
+ "67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061"
13676
+ ).map(colors);
13677
+
13678
+ var RdBu = ramp(scheme$4);
13679
+
13680
+ var scheme$5 = new Array(3).concat(
13681
+ "ef8a62ffffff999999",
13682
+ "ca0020f4a582bababa404040",
13683
+ "ca0020f4a582ffffffbababa404040",
13684
+ "b2182bef8a62fddbc7e0e0e09999994d4d4d",
13685
+ "b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d",
13686
+ "b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d",
13687
+ "b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d",
13688
+ "67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a",
13689
+ "67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a"
13690
+ ).map(colors);
13691
+
13692
+ var RdGy = ramp(scheme$5);
13693
+
13694
+ var scheme$6 = new Array(3).concat(
13695
+ "fc8d59ffffbf91bfdb",
13696
+ "d7191cfdae61abd9e92c7bb6",
13697
+ "d7191cfdae61ffffbfabd9e92c7bb6",
13698
+ "d73027fc8d59fee090e0f3f891bfdb4575b4",
13699
+ "d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4",
13700
+ "d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4",
13701
+ "d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4",
13702
+ "a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695",
13703
+ "a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695"
13704
+ ).map(colors);
13705
+
13706
+ var RdYlBu = ramp(scheme$6);
13707
+
13708
+ var scheme$7 = new Array(3).concat(
13709
+ "fc8d59ffffbf91cf60",
13710
+ "d7191cfdae61a6d96a1a9641",
13711
+ "d7191cfdae61ffffbfa6d96a1a9641",
13712
+ "d73027fc8d59fee08bd9ef8b91cf601a9850",
13713
+ "d73027fc8d59fee08bffffbfd9ef8b91cf601a9850",
13714
+ "d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850",
13715
+ "d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850",
13716
+ "a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837",
13717
+ "a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837"
13718
+ ).map(colors);
13719
+
13720
+ var RdYlGn = ramp(scheme$7);
13721
+
13722
+ var scheme$8 = new Array(3).concat(
13723
+ "fc8d59ffffbf99d594",
13724
+ "d7191cfdae61abdda42b83ba",
13725
+ "d7191cfdae61ffffbfabdda42b83ba",
13726
+ "d53e4ffc8d59fee08be6f59899d5943288bd",
13727
+ "d53e4ffc8d59fee08bffffbfe6f59899d5943288bd",
13728
+ "d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd",
13729
+ "d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd",
13730
+ "9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2",
13731
+ "9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2"
13732
+ ).map(colors);
13733
+
13734
+ var Spectral = ramp(scheme$8);
13735
+
13736
+ var scheme$9 = new Array(3).concat(
13737
+ "e5f5f999d8c92ca25f",
13738
+ "edf8fbb2e2e266c2a4238b45",
13739
+ "edf8fbb2e2e266c2a42ca25f006d2c",
13740
+ "edf8fbccece699d8c966c2a42ca25f006d2c",
13741
+ "edf8fbccece699d8c966c2a441ae76238b45005824",
13742
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824",
13743
+ "f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b"
13744
+ ).map(colors);
13745
+
13746
+ var BuGn = ramp(scheme$9);
13747
+
13748
+ var scheme$10 = new Array(3).concat(
13749
+ "e0ecf49ebcda8856a7",
13750
+ "edf8fbb3cde38c96c688419d",
13751
+ "edf8fbb3cde38c96c68856a7810f7c",
13752
+ "edf8fbbfd3e69ebcda8c96c68856a7810f7c",
13753
+ "edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b",
13754
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b",
13755
+ "f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b"
13756
+ ).map(colors);
13757
+
13758
+ var BuPu = ramp(scheme$10);
13759
+
13760
+ var scheme$11 = new Array(3).concat(
13761
+ "e0f3dba8ddb543a2ca",
13762
+ "f0f9e8bae4bc7bccc42b8cbe",
13763
+ "f0f9e8bae4bc7bccc443a2ca0868ac",
13764
+ "f0f9e8ccebc5a8ddb57bccc443a2ca0868ac",
13765
+ "f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e",
13766
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e",
13767
+ "f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081"
13768
+ ).map(colors);
13769
+
13770
+ var GnBu = ramp(scheme$11);
13771
+
13772
+ var scheme$12 = new Array(3).concat(
13773
+ "fee8c8fdbb84e34a33",
13774
+ "fef0d9fdcc8afc8d59d7301f",
13775
+ "fef0d9fdcc8afc8d59e34a33b30000",
13776
+ "fef0d9fdd49efdbb84fc8d59e34a33b30000",
13777
+ "fef0d9fdd49efdbb84fc8d59ef6548d7301f990000",
13778
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000",
13779
+ "fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000"
13780
+ ).map(colors);
13781
+
13782
+ var OrRd = ramp(scheme$12);
13783
+
13784
+ var scheme$13 = new Array(3).concat(
13785
+ "ece2f0a6bddb1c9099",
13786
+ "f6eff7bdc9e167a9cf02818a",
13787
+ "f6eff7bdc9e167a9cf1c9099016c59",
13788
+ "f6eff7d0d1e6a6bddb67a9cf1c9099016c59",
13789
+ "f6eff7d0d1e6a6bddb67a9cf3690c002818a016450",
13790
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450",
13791
+ "fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636"
13792
+ ).map(colors);
13793
+
13794
+ var PuBuGn = ramp(scheme$13);
13795
+
13796
+ var scheme$14 = new Array(3).concat(
13797
+ "ece7f2a6bddb2b8cbe",
13798
+ "f1eef6bdc9e174a9cf0570b0",
13799
+ "f1eef6bdc9e174a9cf2b8cbe045a8d",
13800
+ "f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d",
13801
+ "f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b",
13802
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b",
13803
+ "fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858"
13804
+ ).map(colors);
13805
+
13806
+ var PuBu = ramp(scheme$14);
13807
+
13808
+ var scheme$15 = new Array(3).concat(
13809
+ "e7e1efc994c7dd1c77",
13810
+ "f1eef6d7b5d8df65b0ce1256",
13811
+ "f1eef6d7b5d8df65b0dd1c77980043",
13812
+ "f1eef6d4b9dac994c7df65b0dd1c77980043",
13813
+ "f1eef6d4b9dac994c7df65b0e7298ace125691003f",
13814
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f",
13815
+ "f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f"
13816
+ ).map(colors);
13817
+
13818
+ var PuRd = ramp(scheme$15);
13819
+
13820
+ var scheme$16 = new Array(3).concat(
13821
+ "fde0ddfa9fb5c51b8a",
13822
+ "feebe2fbb4b9f768a1ae017e",
13823
+ "feebe2fbb4b9f768a1c51b8a7a0177",
13824
+ "feebe2fcc5c0fa9fb5f768a1c51b8a7a0177",
13825
+ "feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177",
13826
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177",
13827
+ "fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a"
13828
+ ).map(colors);
13829
+
13830
+ var RdPu = ramp(scheme$16);
13831
+
13832
+ var scheme$17 = new Array(3).concat(
13833
+ "edf8b17fcdbb2c7fb8",
13834
+ "ffffcca1dab441b6c4225ea8",
13835
+ "ffffcca1dab441b6c42c7fb8253494",
13836
+ "ffffccc7e9b47fcdbb41b6c42c7fb8253494",
13837
+ "ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84",
13838
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84",
13839
+ "ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58"
13840
+ ).map(colors);
13841
+
13842
+ var YlGnBu = ramp(scheme$17);
13843
+
13844
+ var scheme$18 = new Array(3).concat(
13845
+ "f7fcb9addd8e31a354",
13846
+ "ffffccc2e69978c679238443",
13847
+ "ffffccc2e69978c67931a354006837",
13848
+ "ffffccd9f0a3addd8e78c67931a354006837",
13849
+ "ffffccd9f0a3addd8e78c67941ab5d238443005a32",
13850
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32",
13851
+ "ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529"
13852
+ ).map(colors);
13853
+
13854
+ var YlGn = ramp(scheme$18);
13855
+
13856
+ var scheme$19 = new Array(3).concat(
13857
+ "fff7bcfec44fd95f0e",
13858
+ "ffffd4fed98efe9929cc4c02",
13859
+ "ffffd4fed98efe9929d95f0e993404",
13860
+ "ffffd4fee391fec44ffe9929d95f0e993404",
13861
+ "ffffd4fee391fec44ffe9929ec7014cc4c028c2d04",
13862
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04",
13863
+ "ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506"
13864
+ ).map(colors);
13865
+
13866
+ var YlOrBr = ramp(scheme$19);
13867
+
13868
+ var scheme$20 = new Array(3).concat(
13869
+ "ffeda0feb24cf03b20",
13870
+ "ffffb2fecc5cfd8d3ce31a1c",
13871
+ "ffffb2fecc5cfd8d3cf03b20bd0026",
13872
+ "ffffb2fed976feb24cfd8d3cf03b20bd0026",
13873
+ "ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026",
13874
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026",
13875
+ "ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026"
13876
+ ).map(colors);
13877
+
13878
+ var YlOrRd = ramp(scheme$20);
13879
+
13880
+ var scheme$21 = new Array(3).concat(
13881
+ "deebf79ecae13182bd",
13882
+ "eff3ffbdd7e76baed62171b5",
13883
+ "eff3ffbdd7e76baed63182bd08519c",
13884
+ "eff3ffc6dbef9ecae16baed63182bd08519c",
13885
+ "eff3ffc6dbef9ecae16baed64292c62171b5084594",
13886
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594",
13887
+ "f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b"
13888
+ ).map(colors);
13889
+
13890
+ var Blues = ramp(scheme$21);
13891
+
13892
+ var scheme$22 = new Array(3).concat(
13893
+ "e5f5e0a1d99b31a354",
13894
+ "edf8e9bae4b374c476238b45",
13895
+ "edf8e9bae4b374c47631a354006d2c",
13896
+ "edf8e9c7e9c0a1d99b74c47631a354006d2c",
13897
+ "edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32",
13898
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32",
13899
+ "f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b"
13900
+ ).map(colors);
13901
+
13902
+ var Greens = ramp(scheme$22);
13903
+
13904
+ var scheme$23 = new Array(3).concat(
13905
+ "f0f0f0bdbdbd636363",
13906
+ "f7f7f7cccccc969696525252",
13907
+ "f7f7f7cccccc969696636363252525",
13908
+ "f7f7f7d9d9d9bdbdbd969696636363252525",
13909
+ "f7f7f7d9d9d9bdbdbd969696737373525252252525",
13910
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525",
13911
+ "fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000"
13912
+ ).map(colors);
13913
+
13914
+ var Greys = ramp(scheme$23);
13915
+
13916
+ var scheme$24 = new Array(3).concat(
13917
+ "efedf5bcbddc756bb1",
13918
+ "f2f0f7cbc9e29e9ac86a51a3",
13919
+ "f2f0f7cbc9e29e9ac8756bb154278f",
13920
+ "f2f0f7dadaebbcbddc9e9ac8756bb154278f",
13921
+ "f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486",
13922
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486",
13923
+ "fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d"
13924
+ ).map(colors);
13925
+
13926
+ var Purples = ramp(scheme$24);
13927
+
13928
+ var scheme$25 = new Array(3).concat(
13929
+ "fee0d2fc9272de2d26",
13930
+ "fee5d9fcae91fb6a4acb181d",
13931
+ "fee5d9fcae91fb6a4ade2d26a50f15",
13932
+ "fee5d9fcbba1fc9272fb6a4ade2d26a50f15",
13933
+ "fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d",
13934
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d",
13935
+ "fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d"
13936
+ ).map(colors);
13937
+
13938
+ var Reds = ramp(scheme$25);
13939
+
13940
+ var scheme$26 = new Array(3).concat(
13941
+ "fee6cefdae6be6550d",
13942
+ "feeddefdbe85fd8d3cd94701",
13943
+ "feeddefdbe85fd8d3ce6550da63603",
13944
+ "feeddefdd0a2fdae6bfd8d3ce6550da63603",
13945
+ "feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04",
13946
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04",
13947
+ "fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704"
13948
+ ).map(colors);
13949
+
13950
+ var Oranges = ramp(scheme$26);
13951
+
13952
+ var cubehelix$3 = cubehelixLong(cubehelix(300, 0.5, 0.0), cubehelix(-240, 0.5, 1.0));
13953
+
13954
+ var warm = cubehelixLong(cubehelix(-100, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
13955
+
13956
+ var cool = cubehelixLong(cubehelix(260, 0.75, 0.35), cubehelix(80, 1.50, 0.8));
13957
+
13958
+ var c = cubehelix();
13959
+
13960
+ function rainbow(t) {
13961
+ if (t < 0 || t > 1) t -= Math.floor(t);
13962
+ var ts = Math.abs(t - 0.5);
13963
+ c.h = 360 * t - 100;
13964
+ c.s = 1.5 - 1.5 * ts;
13965
+ c.l = 0.8 - 0.9 * ts;
13966
+ return c + "";
13967
+ }
13968
+
13969
+ var c$1 = rgb(),
13970
+ pi_1_3 = Math.PI / 3,
13971
+ pi_2_3 = Math.PI * 2 / 3;
13972
+
13973
+ function sinebow(t) {
13974
+ var x;
13975
+ t = (0.5 - t) * Math.PI;
13976
+ c$1.r = 255 * (x = Math.sin(t)) * x;
13977
+ c$1.g = 255 * (x = Math.sin(t + pi_1_3)) * x;
13978
+ c$1.b = 255 * (x = Math.sin(t + pi_2_3)) * x;
13979
+ return c$1 + "";
13980
+ }
13981
+
13982
+ function ramp$1(range) {
13983
+ var n = range.length;
13984
+ return function(t) {
13985
+ return range[Math.max(0, Math.min(n - 1, Math.floor(t * n)))];
13986
+ };
13987
+ }
13988
+
13989
+ var viridis = ramp$1(colors("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));
13990
+
13991
+ var magma = ramp$1(colors("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf"));
13992
+
13993
+ var inferno = ramp$1(colors("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4"));
13994
+
13995
+ var plasma = ramp$1(colors("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));
13996
+
13997
+ function constant$11(x) {
13431
13998
  return function constant() {
13432
13999
  return x;
13433
14000
  };
@@ -13527,7 +14094,7 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
13527
14094
  function arc() {
13528
14095
  var innerRadius = arcInnerRadius,
13529
14096
  outerRadius = arcOuterRadius,
13530
- cornerRadius = constant$10(0),
14097
+ cornerRadius = constant$11(0),
13531
14098
  padRadius = null,
13532
14099
  startAngle = arcStartAngle,
13533
14100
  endAngle = arcEndAngle,
@@ -13676,31 +14243,31 @@ function arc() {
13676
14243
  };
13677
14244
 
13678
14245
  arc.innerRadius = function(_) {
13679
- return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : innerRadius;
14246
+ return arguments.length ? (innerRadius = typeof _ === "function" ? _ : constant$11(+_), arc) : innerRadius;
13680
14247
  };
13681
14248
 
13682
14249
  arc.outerRadius = function(_) {
13683
- return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : outerRadius;
14250
+ return arguments.length ? (outerRadius = typeof _ === "function" ? _ : constant$11(+_), arc) : outerRadius;
13684
14251
  };
13685
14252
 
13686
14253
  arc.cornerRadius = function(_) {
13687
- return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$10(+_), arc) : cornerRadius;
14254
+ return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : constant$11(+_), arc) : cornerRadius;
13688
14255
  };
13689
14256
 
13690
14257
  arc.padRadius = function(_) {
13691
- return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), arc) : padRadius;
14258
+ return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : constant$11(+_), arc) : padRadius;
13692
14259
  };
13693
14260
 
13694
14261
  arc.startAngle = function(_) {
13695
- return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : startAngle;
14262
+ return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$11(+_), arc) : startAngle;
13696
14263
  };
13697
14264
 
13698
14265
  arc.endAngle = function(_) {
13699
- return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : endAngle;
14266
+ return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$11(+_), arc) : endAngle;
13700
14267
  };
13701
14268
 
13702
14269
  arc.padAngle = function(_) {
13703
- return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$10(+_), arc) : padAngle;
14270
+ return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$11(+_), arc) : padAngle;
13704
14271
  };
13705
14272
 
13706
14273
  arc.context = function(_) {
@@ -13753,7 +14320,7 @@ function y$3(p) {
13753
14320
  function line() {
13754
14321
  var x$$1 = x$3,
13755
14322
  y$$1 = y$3,
13756
- defined = constant$10(true),
14323
+ defined = constant$11(true),
13757
14324
  context = null,
13758
14325
  curve = curveLinear,
13759
14326
  output = null;
@@ -13779,15 +14346,15 @@ function line() {
13779
14346
  }
13780
14347
 
13781
14348
  line.x = function(_) {
13782
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : x$$1;
14349
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$11(+_), line) : x$$1;
13783
14350
  };
13784
14351
 
13785
14352
  line.y = function(_) {
13786
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), line) : y$$1;
14353
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$11(+_), line) : y$$1;
13787
14354
  };
13788
14355
 
13789
14356
  line.defined = function(_) {
13790
- return arguments.length ? (defined = typeof _ === "function" ? _ : constant$10(!!_), line) : defined;
14357
+ return arguments.length ? (defined = typeof _ === "function" ? _ : constant$11(!!_), line) : defined;
13791
14358
  };
13792
14359
 
13793
14360
  line.curve = function(_) {
@@ -13801,12 +14368,12 @@ function line() {
13801
14368
  return line;
13802
14369
  }
13803
14370
 
13804
- function area$2() {
14371
+ function area$3() {
13805
14372
  var x0 = x$3,
13806
14373
  x1 = null,
13807
- y0 = constant$10(0),
14374
+ y0 = constant$11(0),
13808
14375
  y1 = y$3,
13809
- defined = constant$10(true),
14376
+ defined = constant$11(true),
13810
14377
  context = null,
13811
14378
  curve = curveLinear,
13812
14379
  output = null;
@@ -13854,27 +14421,27 @@ function area$2() {
13854
14421
  }
13855
14422
 
13856
14423
  area.x = function(_) {
13857
- return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$10(+_), x1 = null, area) : x0;
14424
+ return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$11(+_), x1 = null, area) : x0;
13858
14425
  };
13859
14426
 
13860
14427
  area.x0 = function(_) {
13861
- return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$10(+_), area) : x0;
14428
+ return arguments.length ? (x0 = typeof _ === "function" ? _ : constant$11(+_), area) : x0;
13862
14429
  };
13863
14430
 
13864
14431
  area.x1 = function(_) {
13865
- return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), area) : x1;
14432
+ return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : constant$11(+_), area) : x1;
13866
14433
  };
13867
14434
 
13868
14435
  area.y = function(_) {
13869
- return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$10(+_), y1 = null, area) : y0;
14436
+ return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$11(+_), y1 = null, area) : y0;
13870
14437
  };
13871
14438
 
13872
14439
  area.y0 = function(_) {
13873
- return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$10(+_), area) : y0;
14440
+ return arguments.length ? (y0 = typeof _ === "function" ? _ : constant$11(+_), area) : y0;
13874
14441
  };
13875
14442
 
13876
14443
  area.y1 = function(_) {
13877
- return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$10(+_), area) : y1;
14444
+ return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : constant$11(+_), area) : y1;
13878
14445
  };
13879
14446
 
13880
14447
  area.lineX0 =
@@ -13891,7 +14458,7 @@ function area$2() {
13891
14458
  };
13892
14459
 
13893
14460
  area.defined = function(_) {
13894
- return arguments.length ? (defined = typeof _ === "function" ? _ : constant$10(!!_), area) : defined;
14461
+ return arguments.length ? (defined = typeof _ === "function" ? _ : constant$11(!!_), area) : defined;
13895
14462
  };
13896
14463
 
13897
14464
  area.curve = function(_) {
@@ -13917,9 +14484,9 @@ function pie() {
13917
14484
  var value = identity$7,
13918
14485
  sortValues = descending$1,
13919
14486
  sort = null,
13920
- startAngle = constant$10(0),
13921
- endAngle = constant$10(tau$4),
13922
- padAngle = constant$10(0);
14487
+ startAngle = constant$11(0),
14488
+ endAngle = constant$11(tau$4),
14489
+ padAngle = constant$11(0);
13923
14490
 
13924
14491
  function pie(data) {
13925
14492
  var i,
@@ -13962,7 +14529,7 @@ function pie() {
13962
14529
  }
13963
14530
 
13964
14531
  pie.value = function(_) {
13965
- return arguments.length ? (value = typeof _ === "function" ? _ : constant$10(+_), pie) : value;
14532
+ return arguments.length ? (value = typeof _ === "function" ? _ : constant$11(+_), pie) : value;
13966
14533
  };
13967
14534
 
13968
14535
  pie.sortValues = function(_) {
@@ -13974,15 +14541,15 @@ function pie() {
13974
14541
  };
13975
14542
 
13976
14543
  pie.startAngle = function(_) {
13977
- return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : startAngle;
14544
+ return arguments.length ? (startAngle = typeof _ === "function" ? _ : constant$11(+_), pie) : startAngle;
13978
14545
  };
13979
14546
 
13980
14547
  pie.endAngle = function(_) {
13981
- return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : endAngle;
14548
+ return arguments.length ? (endAngle = typeof _ === "function" ? _ : constant$11(+_), pie) : endAngle;
13982
14549
  };
13983
14550
 
13984
14551
  pie.padAngle = function(_) {
13985
- return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$10(+_), pie) : padAngle;
14552
+ return arguments.length ? (padAngle = typeof _ === "function" ? _ : constant$11(+_), pie) : padAngle;
13986
14553
  };
13987
14554
 
13988
14555
  return pie;
@@ -14041,7 +14608,7 @@ function lineRadial$1() {
14041
14608
  }
14042
14609
 
14043
14610
  function areaRadial() {
14044
- var a = area$2().curve(curveRadialLinear),
14611
+ var a = area$3().curve(curveRadialLinear),
14045
14612
  c = a.curve,
14046
14613
  x0 = a.lineX0,
14047
14614
  x1 = a.lineX1,
@@ -14103,11 +14670,11 @@ function link$2(curve) {
14103
14670
  };
14104
14671
 
14105
14672
  link.x = function(_) {
14106
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : x$$1;
14673
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$11(+_), link) : x$$1;
14107
14674
  };
14108
14675
 
14109
14676
  link.y = function(_) {
14110
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$10(+_), link) : y$$1;
14677
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$11(+_), link) : y$$1;
14111
14678
  };
14112
14679
 
14113
14680
  link.context = function(_) {
@@ -14178,8 +14745,8 @@ var cross$2 = {
14178
14745
  }
14179
14746
  };
14180
14747
 
14181
- var tan30 = Math.sqrt(1 / 3);
14182
- var tan30_2 = tan30 * 2;
14748
+ var tan30 = Math.sqrt(1 / 3),
14749
+ tan30_2 = tan30 * 2;
14183
14750
 
14184
14751
  var diamond = {
14185
14752
  draw: function(context, size) {
@@ -14193,10 +14760,10 @@ var diamond = {
14193
14760
  }
14194
14761
  };
14195
14762
 
14196
- var ka = 0.89081309152928522810;
14197
- var kr = Math.sin(pi$4 / 10) / Math.sin(7 * pi$4 / 10);
14198
- var kx = Math.sin(tau$4 / 10) * kr;
14199
- var ky = -Math.cos(tau$4 / 10) * kr;
14763
+ var ka = 0.89081309152928522810,
14764
+ kr = Math.sin(pi$4 / 10) / Math.sin(7 * pi$4 / 10),
14765
+ kx = Math.sin(tau$4 / 10) * kr,
14766
+ ky = -Math.cos(tau$4 / 10) * kr;
14200
14767
 
14201
14768
  var star = {
14202
14769
  draw: function(context, size) {
@@ -14236,10 +14803,10 @@ var triangle = {
14236
14803
  }
14237
14804
  };
14238
14805
 
14239
- var c = -0.5;
14240
- var s = Math.sqrt(3) / 2;
14241
- var k = 1 / Math.sqrt(12);
14242
- var a = (k / 2 + 1) * 3;
14806
+ var c$2 = -0.5,
14807
+ s = Math.sqrt(3) / 2,
14808
+ k = 1 / Math.sqrt(12),
14809
+ a = (k / 2 + 1) * 3;
14243
14810
 
14244
14811
  var wye = {
14245
14812
  draw: function(context, size) {
@@ -14253,12 +14820,12 @@ var wye = {
14253
14820
  context.moveTo(x0, y0);
14254
14821
  context.lineTo(x1, y1);
14255
14822
  context.lineTo(x2, y2);
14256
- context.lineTo(c * x0 - s * y0, s * x0 + c * y0);
14257
- context.lineTo(c * x1 - s * y1, s * x1 + c * y1);
14258
- context.lineTo(c * x2 - s * y2, s * x2 + c * y2);
14259
- context.lineTo(c * x0 + s * y0, c * y0 - s * x0);
14260
- context.lineTo(c * x1 + s * y1, c * y1 - s * x1);
14261
- context.lineTo(c * x2 + s * y2, c * y2 - s * x2);
14823
+ context.lineTo(c$2 * x0 - s * y0, s * x0 + c$2 * y0);
14824
+ context.lineTo(c$2 * x1 - s * y1, s * x1 + c$2 * y1);
14825
+ context.lineTo(c$2 * x2 - s * y2, s * x2 + c$2 * y2);
14826
+ context.lineTo(c$2 * x0 + s * y0, c$2 * y0 - s * x0);
14827
+ context.lineTo(c$2 * x1 + s * y1, c$2 * y1 - s * x1);
14828
+ context.lineTo(c$2 * x2 + s * y2, c$2 * y2 - s * x2);
14262
14829
  context.closePath();
14263
14830
  }
14264
14831
  };
@@ -14274,8 +14841,8 @@ var symbols = [
14274
14841
  ];
14275
14842
 
14276
14843
  function symbol() {
14277
- var type = constant$10(circle$2),
14278
- size = constant$10(64),
14844
+ var type = constant$11(circle$2),
14845
+ size = constant$11(64),
14279
14846
  context = null;
14280
14847
 
14281
14848
  function symbol() {
@@ -14286,11 +14853,11 @@ function symbol() {
14286
14853
  }
14287
14854
 
14288
14855
  symbol.type = function(_) {
14289
- return arguments.length ? (type = typeof _ === "function" ? _ : constant$10(_), symbol) : type;
14856
+ return arguments.length ? (type = typeof _ === "function" ? _ : constant$11(_), symbol) : type;
14290
14857
  };
14291
14858
 
14292
14859
  symbol.size = function(_) {
14293
- return arguments.length ? (size = typeof _ === "function" ? _ : constant$10(+_), symbol) : size;
14860
+ return arguments.length ? (size = typeof _ === "function" ? _ : constant$11(+_), symbol) : size;
14294
14861
  };
14295
14862
 
14296
14863
  symbol.context = function(_) {
@@ -14300,7 +14867,7 @@ function symbol() {
14300
14867
  return symbol;
14301
14868
  }
14302
14869
 
14303
- function noop$2() {}
14870
+ function noop$3() {}
14304
14871
 
14305
14872
  function point$2(that, x, y) {
14306
14873
  that._context.bezierCurveTo(
@@ -14359,8 +14926,8 @@ function BasisClosed(context) {
14359
14926
  }
14360
14927
 
14361
14928
  BasisClosed.prototype = {
14362
- areaStart: noop$2,
14363
- areaEnd: noop$2,
14929
+ areaStart: noop$3,
14930
+ areaEnd: noop$3,
14364
14931
  lineStart: function() {
14365
14932
  this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =
14366
14933
  this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;
@@ -14565,8 +15132,8 @@ function CardinalClosed(context, tension) {
14565
15132
  }
14566
15133
 
14567
15134
  CardinalClosed.prototype = {
14568
- areaStart: noop$2,
14569
- areaEnd: noop$2,
15135
+ areaStart: noop$3,
15136
+ areaEnd: noop$3,
14570
15137
  lineStart: function() {
14571
15138
  this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
14572
15139
  this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
@@ -14758,8 +15325,8 @@ function CatmullRomClosed(context, alpha) {
14758
15325
  }
14759
15326
 
14760
15327
  CatmullRomClosed.prototype = {
14761
- areaStart: noop$2,
14762
- areaEnd: noop$2,
15328
+ areaStart: noop$3,
15329
+ areaEnd: noop$3,
14763
15330
  lineStart: function() {
14764
15331
  this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =
14765
15332
  this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;
@@ -14888,8 +15455,8 @@ function LinearClosed(context) {
14888
15455
  }
14889
15456
 
14890
15457
  LinearClosed.prototype = {
14891
- areaStart: noop$2,
14892
- areaEnd: noop$2,
15458
+ areaStart: noop$3,
15459
+ areaEnd: noop$3,
14893
15460
  lineStart: function() {
14894
15461
  this._point = 0;
14895
15462
  },
@@ -15153,7 +15720,7 @@ function stackValue(d, key) {
15153
15720
  }
15154
15721
 
15155
15722
  function stack() {
15156
- var keys = constant$10([]),
15723
+ var keys = constant$11([]),
15157
15724
  order = none$2,
15158
15725
  offset = none$1,
15159
15726
  value = stackValue;
@@ -15183,15 +15750,15 @@ function stack() {
15183
15750
  }
15184
15751
 
15185
15752
  stack.keys = function(_) {
15186
- return arguments.length ? (keys = typeof _ === "function" ? _ : constant$10(slice$6.call(_)), stack) : keys;
15753
+ return arguments.length ? (keys = typeof _ === "function" ? _ : constant$11(slice$6.call(_)), stack) : keys;
15187
15754
  };
15188
15755
 
15189
15756
  stack.value = function(_) {
15190
- return arguments.length ? (value = typeof _ === "function" ? _ : constant$10(+_), stack) : value;
15757
+ return arguments.length ? (value = typeof _ === "function" ? _ : constant$11(+_), stack) : value;
15191
15758
  };
15192
15759
 
15193
15760
  stack.order = function(_) {
15194
- return arguments.length ? (order = _ == null ? none$2 : typeof _ === "function" ? _ : constant$10(slice$6.call(_)), stack) : order;
15761
+ return arguments.length ? (order = _ == null ? none$2 : typeof _ === "function" ? _ : constant$11(slice$6.call(_)), stack) : order;
15195
15762
  };
15196
15763
 
15197
15764
  stack.offset = function(_) {
@@ -15257,7 +15824,7 @@ function wiggle(series, order) {
15257
15824
  none$1(series, order);
15258
15825
  }
15259
15826
 
15260
- function ascending$2(series) {
15827
+ function ascending$3(series) {
15261
15828
  var sums = series.map(sum$2);
15262
15829
  return none$2(series).sort(function(a, b) { return sums[a] - sums[b]; });
15263
15830
  }
@@ -15269,7 +15836,7 @@ function sum$2(series) {
15269
15836
  }
15270
15837
 
15271
15838
  function descending$2(series) {
15272
- return ascending$2(series).reverse();
15839
+ return ascending$3(series).reverse();
15273
15840
  }
15274
15841
 
15275
15842
  function insideOut(series) {
@@ -15301,7 +15868,7 @@ function reverse(series) {
15301
15868
  return none$2(series).reverse();
15302
15869
  }
15303
15870
 
15304
- function constant$11(x) {
15871
+ function constant$12(x) {
15305
15872
  return function() {
15306
15873
  return x;
15307
15874
  };
@@ -16270,11 +16837,11 @@ function voronoi() {
16270
16837
  };
16271
16838
 
16272
16839
  voronoi.x = function(_) {
16273
- return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : x$$1;
16840
+ return arguments.length ? (x$$1 = typeof _ === "function" ? _ : constant$12(+_), voronoi) : x$$1;
16274
16841
  };
16275
16842
 
16276
16843
  voronoi.y = function(_) {
16277
- return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$11(+_), voronoi) : y$$1;
16844
+ return arguments.length ? (y$$1 = typeof _ === "function" ? _ : constant$12(+_), voronoi) : y$$1;
16278
16845
  };
16279
16846
 
16280
16847
  voronoi.extent = function(_) {
@@ -16288,7 +16855,7 @@ function voronoi() {
16288
16855
  return voronoi;
16289
16856
  }
16290
16857
 
16291
- function constant$12(x) {
16858
+ function constant$13(x) {
16292
16859
  return function() {
16293
16860
  return x;
16294
16861
  };
@@ -16390,12 +16957,12 @@ function defaultTouchable$1() {
16390
16957
  return "ontouchstart" in this;
16391
16958
  }
16392
16959
 
16393
- function defaultConstrain(transform$$1, extent, translateExtent) {
16394
- var dx0 = transform$$1.invertX(extent[0][0]) - translateExtent[0][0],
16395
- dx1 = transform$$1.invertX(extent[1][0]) - translateExtent[1][0],
16396
- dy0 = transform$$1.invertY(extent[0][1]) - translateExtent[0][1],
16397
- dy1 = transform$$1.invertY(extent[1][1]) - translateExtent[1][1];
16398
- return transform$$1.translate(
16960
+ function defaultConstrain(transform, extent, translateExtent) {
16961
+ var dx0 = transform.invertX(extent[0][0]) - translateExtent[0][0],
16962
+ dx1 = transform.invertX(extent[1][0]) - translateExtent[1][0],
16963
+ dy0 = transform.invertY(extent[0][1]) - translateExtent[0][1],
16964
+ dy1 = transform.invertY(extent[1][1]) - translateExtent[1][1];
16965
+ return transform.translate(
16399
16966
  dx1 > dx0 ? (dx0 + dx1) / 2 : Math.min(0, dx0) || Math.max(0, dx1),
16400
16967
  dy1 > dy0 ? (dy0 + dy1) / 2 : Math.min(0, dy0) || Math.max(0, dy1)
16401
16968
  );
@@ -16419,8 +16986,8 @@ function zoom() {
16419
16986
  wheelDelay = 150,
16420
16987
  clickDistance2 = 0;
16421
16988
 
16422
- function zoom(selection) {
16423
- selection
16989
+ function zoom(selection$$1) {
16990
+ selection$$1
16424
16991
  .property("__zoom", defaultTransform)
16425
16992
  .on("wheel.zoom", wheeled)
16426
16993
  .on("mousedown.zoom", mousedowned)
@@ -16433,31 +17000,31 @@ function zoom() {
16433
17000
  .style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
16434
17001
  }
16435
17002
 
16436
- zoom.transform = function(collection, transform$$1) {
16437
- var selection = collection.selection ? collection.selection() : collection;
16438
- selection.property("__zoom", defaultTransform);
16439
- if (collection !== selection) {
16440
- schedule(collection, transform$$1);
17003
+ zoom.transform = function(collection, transform) {
17004
+ var selection$$1 = collection.selection ? collection.selection() : collection;
17005
+ selection$$1.property("__zoom", defaultTransform);
17006
+ if (collection !== selection$$1) {
17007
+ schedule(collection, transform);
16441
17008
  } else {
16442
- selection.interrupt().each(function() {
17009
+ selection$$1.interrupt().each(function() {
16443
17010
  gesture(this, arguments)
16444
17011
  .start()
16445
- .zoom(null, typeof transform$$1 === "function" ? transform$$1.apply(this, arguments) : transform$$1)
17012
+ .zoom(null, typeof transform === "function" ? transform.apply(this, arguments) : transform)
16446
17013
  .end();
16447
17014
  });
16448
17015
  }
16449
17016
  };
16450
17017
 
16451
- zoom.scaleBy = function(selection, k) {
16452
- zoom.scaleTo(selection, function() {
17018
+ zoom.scaleBy = function(selection$$1, k) {
17019
+ zoom.scaleTo(selection$$1, function() {
16453
17020
  var k0 = this.__zoom.k,
16454
17021
  k1 = typeof k === "function" ? k.apply(this, arguments) : k;
16455
17022
  return k0 * k1;
16456
17023
  });
16457
17024
  };
16458
17025
 
16459
- zoom.scaleTo = function(selection, k) {
16460
- zoom.transform(selection, function() {
17026
+ zoom.scaleTo = function(selection$$1, k) {
17027
+ zoom.transform(selection$$1, function() {
16461
17028
  var e = extent.apply(this, arguments),
16462
17029
  t0 = this.__zoom,
16463
17030
  p0 = centroid(e),
@@ -16467,8 +17034,8 @@ function zoom() {
16467
17034
  });
16468
17035
  };
16469
17036
 
16470
- zoom.translateBy = function(selection, x, y) {
16471
- zoom.transform(selection, function() {
17037
+ zoom.translateBy = function(selection$$1, x, y) {
17038
+ zoom.transform(selection$$1, function() {
16472
17039
  return constrain(this.__zoom.translate(
16473
17040
  typeof x === "function" ? x.apply(this, arguments) : x,
16474
17041
  typeof y === "function" ? y.apply(this, arguments) : y
@@ -16476,8 +17043,8 @@ function zoom() {
16476
17043
  });
16477
17044
  };
16478
17045
 
16479
- zoom.translateTo = function(selection, x, y) {
16480
- zoom.transform(selection, function() {
17046
+ zoom.translateTo = function(selection$$1, x, y) {
17047
+ zoom.transform(selection$$1, function() {
16481
17048
  var e = extent.apply(this, arguments),
16482
17049
  t = this.__zoom,
16483
17050
  p = centroid(e);
@@ -16488,22 +17055,22 @@ function zoom() {
16488
17055
  });
16489
17056
  };
16490
17057
 
16491
- function scale(transform$$1, k) {
17058
+ function scale(transform, k) {
16492
17059
  k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], k));
16493
- return k === transform$$1.k ? transform$$1 : new Transform(k, transform$$1.x, transform$$1.y);
17060
+ return k === transform.k ? transform : new Transform(k, transform.x, transform.y);
16494
17061
  }
16495
17062
 
16496
- function translate(transform$$1, p0, p1) {
16497
- var x = p0[0] - p1[0] * transform$$1.k, y = p0[1] - p1[1] * transform$$1.k;
16498
- return x === transform$$1.x && y === transform$$1.y ? transform$$1 : new Transform(transform$$1.k, x, y);
17063
+ function translate(transform, p0, p1) {
17064
+ var x = p0[0] - p1[0] * transform.k, y = p0[1] - p1[1] * transform.k;
17065
+ return x === transform.x && y === transform.y ? transform : new Transform(transform.k, x, y);
16499
17066
  }
16500
17067
 
16501
17068
  function centroid(extent) {
16502
17069
  return [(+extent[0][0] + +extent[1][0]) / 2, (+extent[0][1] + +extent[1][1]) / 2];
16503
17070
  }
16504
17071
 
16505
- function schedule(transition, transform$$1, center) {
16506
- transition
17072
+ function schedule(transition$$1, transform, center) {
17073
+ transition$$1
16507
17074
  .on("start.zoom", function() { gesture(this, arguments).start(); })
16508
17075
  .on("interrupt.zoom end.zoom", function() { gesture(this, arguments).end(); })
16509
17076
  .tween("zoom", function() {
@@ -16514,7 +17081,7 @@ function zoom() {
16514
17081
  p = center || centroid(e),
16515
17082
  w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]),
16516
17083
  a = that.__zoom,
16517
- b = typeof transform$$1 === "function" ? transform$$1.apply(that, args) : transform$$1,
17084
+ b = typeof transform === "function" ? transform.apply(that, args) : transform,
16518
17085
  i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
16519
17086
  return function(t) {
16520
17087
  if (t === 1) t = b; // Avoid rounding error on end.
@@ -16549,11 +17116,11 @@ function zoom() {
16549
17116
  }
16550
17117
  return this;
16551
17118
  },
16552
- zoom: function(key, transform$$1) {
16553
- if (this.mouse && key !== "mouse") this.mouse[1] = transform$$1.invert(this.mouse[0]);
16554
- if (this.touch0 && key !== "touch") this.touch0[1] = transform$$1.invert(this.touch0[0]);
16555
- if (this.touch1 && key !== "touch") this.touch1[1] = transform$$1.invert(this.touch1[0]);
16556
- this.that.__zoom = transform$$1;
17119
+ zoom: function(key, transform) {
17120
+ if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
17121
+ if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
17122
+ if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
17123
+ this.that.__zoom = transform;
16557
17124
  this.emit("zoom");
16558
17125
  return this;
16559
17126
  },
@@ -16653,13 +17220,13 @@ function zoom() {
16653
17220
  function touchstarted() {
16654
17221
  if (!filter.apply(this, arguments)) return;
16655
17222
  var g = gesture(this, arguments),
16656
- touches = exports.event.changedTouches,
17223
+ touches$$1 = exports.event.changedTouches,
16657
17224
  started,
16658
- n = touches.length, i, t, p;
17225
+ n = touches$$1.length, i, t, p;
16659
17226
 
16660
17227
  nopropagation$2();
16661
17228
  for (i = 0; i < n; ++i) {
16662
- t = touches[i], p = touch(this, touches, t.identifier);
17229
+ t = touches$$1[i], p = touch(this, touches$$1, t.identifier);
16663
17230
  p = [p, this.__zoom.invert(p), t.identifier];
16664
17231
  if (!g.touch0) g.touch0 = p, started = true;
16665
17232
  else if (!g.touch1) g.touch1 = p;
@@ -16685,13 +17252,13 @@ function zoom() {
16685
17252
 
16686
17253
  function touchmoved() {
16687
17254
  var g = gesture(this, arguments),
16688
- touches = exports.event.changedTouches,
16689
- n = touches.length, i, t, p, l;
17255
+ touches$$1 = exports.event.changedTouches,
17256
+ n = touches$$1.length, i, t, p, l;
16690
17257
 
16691
17258
  noevent$2();
16692
17259
  if (touchstarting) touchstarting = clearTimeout(touchstarting);
16693
17260
  for (i = 0; i < n; ++i) {
16694
- t = touches[i], p = touch(this, touches, t.identifier);
17261
+ t = touches$$1[i], p = touch(this, touches$$1, t.identifier);
16695
17262
  if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
16696
17263
  else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
16697
17264
  }
@@ -16712,14 +17279,14 @@ function zoom() {
16712
17279
 
16713
17280
  function touchended() {
16714
17281
  var g = gesture(this, arguments),
16715
- touches = exports.event.changedTouches,
16716
- n = touches.length, i, t;
17282
+ touches$$1 = exports.event.changedTouches,
17283
+ n = touches$$1.length, i, t;
16717
17284
 
16718
17285
  nopropagation$2();
16719
17286
  if (touchending) clearTimeout(touchending);
16720
17287
  touchending = setTimeout(function() { touchending = null; }, touchDelay);
16721
17288
  for (i = 0; i < n; ++i) {
16722
- t = touches[i];
17289
+ t = touches$$1[i];
16723
17290
  if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
16724
17291
  else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
16725
17292
  }
@@ -16729,19 +17296,19 @@ function zoom() {
16729
17296
  }
16730
17297
 
16731
17298
  zoom.wheelDelta = function(_) {
16732
- return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant$12(+_), zoom) : wheelDelta;
17299
+ return arguments.length ? (wheelDelta = typeof _ === "function" ? _ : constant$13(+_), zoom) : wheelDelta;
16733
17300
  };
16734
17301
 
16735
17302
  zoom.filter = function(_) {
16736
- return arguments.length ? (filter = typeof _ === "function" ? _ : constant$12(!!_), zoom) : filter;
17303
+ return arguments.length ? (filter = typeof _ === "function" ? _ : constant$13(!!_), zoom) : filter;
16737
17304
  };
16738
17305
 
16739
17306
  zoom.touchable = function(_) {
16740
- return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$12(!!_), zoom) : touchable;
17307
+ return arguments.length ? (touchable = typeof _ === "function" ? _ : constant$13(!!_), zoom) : touchable;
16741
17308
  };
16742
17309
 
16743
17310
  zoom.extent = function(_) {
16744
- return arguments.length ? (extent = typeof _ === "function" ? _ : constant$12([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
17311
+ return arguments.length ? (extent = typeof _ === "function" ? _ : constant$13([[+_[0][0], +_[0][1]], [+_[1][0], +_[1][1]]]), zoom) : extent;
16745
17312
  };
16746
17313
 
16747
17314
  zoom.scaleExtent = function(_) {
@@ -16789,7 +17356,7 @@ exports.extent = extent;
16789
17356
  exports.histogram = histogram;
16790
17357
  exports.thresholdFreedmanDiaconis = freedmanDiaconis;
16791
17358
  exports.thresholdScott = scott;
16792
- exports.thresholdSturges = sturges;
17359
+ exports.thresholdSturges = thresholdSturges;
16793
17360
  exports.max = max;
16794
17361
  exports.mean = mean;
16795
17362
  exports.median = median;
@@ -16829,12 +17396,16 @@ exports.rgb = rgb;
16829
17396
  exports.hsl = hsl;
16830
17397
  exports.lab = lab;
16831
17398
  exports.hcl = hcl;
17399
+ exports.lch = lch;
17400
+ exports.gray = gray;
16832
17401
  exports.cubehelix = cubehelix;
17402
+ exports.contours = contours;
17403
+ exports.contourDensity = density;
16833
17404
  exports.dispatch = dispatch;
16834
17405
  exports.drag = drag;
16835
17406
  exports.dragDisable = dragDisable;
16836
17407
  exports.dragEnable = yesdrag;
16837
- exports.dsvFormat = dsv;
17408
+ exports.dsvFormat = dsvFormat;
16838
17409
  exports.csvParse = csvParse;
16839
17410
  exports.csvParseRows = csvParseRows;
16840
17411
  exports.csvFormat = csvFormat;
@@ -16880,6 +17451,17 @@ exports.easeElastic = elasticOut;
16880
17451
  exports.easeElasticIn = elasticIn;
16881
17452
  exports.easeElasticOut = elasticOut;
16882
17453
  exports.easeElasticInOut = elasticInOut;
17454
+ exports.blob = blob;
17455
+ exports.buffer = buffer;
17456
+ exports.dsv = dsv;
17457
+ exports.csv = csv$1;
17458
+ exports.tsv = tsv$1;
17459
+ exports.image = image;
17460
+ exports.json = json;
17461
+ exports.text = text;
17462
+ exports.xml = xml;
17463
+ exports.html = html;
17464
+ exports.svg = svg;
16883
17465
  exports.forceCenter = center$1;
16884
17466
  exports.forceCollide = collide;
16885
17467
  exports.forceLink = link;
@@ -16894,7 +17476,7 @@ exports.formatSpecifier = formatSpecifier;
16894
17476
  exports.precisionFixed = precisionFixed;
16895
17477
  exports.precisionPrefix = precisionPrefix;
16896
17478
  exports.precisionRound = precisionRound;
16897
- exports.geoArea = area;
17479
+ exports.geoArea = area$1;
16898
17480
  exports.geoBounds = bounds;
16899
17481
  exports.geoCentroid = centroid;
16900
17482
  exports.geoCircle = circle;
@@ -16902,7 +17484,7 @@ exports.geoClipAntimeridian = clipAntimeridian;
16902
17484
  exports.geoClipCircle = clipCircle;
16903
17485
  exports.geoClipExtent = extent$1;
16904
17486
  exports.geoClipRectangle = clipRectangle;
16905
- exports.geoContains = contains;
17487
+ exports.geoContains = contains$1;
16906
17488
  exports.geoDistance = distance;
16907
17489
  exports.geoGraticule = graticule;
16908
17490
  exports.geoGraticule10 = graticule10;
@@ -16978,28 +17560,21 @@ exports.interpolateHcl = hcl$2;
16978
17560
  exports.interpolateHclLong = hclLong;
16979
17561
  exports.interpolateCubehelix = cubehelix$2;
16980
17562
  exports.interpolateCubehelixLong = cubehelixLong;
17563
+ exports.piecewise = piecewise;
16981
17564
  exports.quantize = quantize;
16982
17565
  exports.path = path;
16983
- exports.polygonArea = area$1;
17566
+ exports.polygonArea = area$2;
16984
17567
  exports.polygonCentroid = centroid$1;
16985
17568
  exports.polygonHull = hull;
16986
- exports.polygonContains = contains$1;
17569
+ exports.polygonContains = contains$2;
16987
17570
  exports.polygonLength = length$2;
16988
17571
  exports.quadtree = quadtree;
16989
- exports.queue = queue;
16990
17572
  exports.randomUniform = uniform;
16991
17573
  exports.randomNormal = normal;
16992
17574
  exports.randomLogNormal = logNormal;
16993
17575
  exports.randomBates = bates;
16994
17576
  exports.randomIrwinHall = irwinHall;
16995
17577
  exports.randomExponential = exponential$1;
16996
- exports.request = request;
16997
- exports.html = html;
16998
- exports.json = json;
16999
- exports.text = text;
17000
- exports.xml = xml;
17001
- exports.csv = csv$1;
17002
- exports.tsv = tsv$1;
17003
17578
  exports.scaleBand = band;
17004
17579
  exports.scalePoint = point$1;
17005
17580
  exports.scaleIdentity = identity$6;
@@ -17014,22 +17589,82 @@ exports.scaleQuantize = quantize$1;
17014
17589
  exports.scaleThreshold = threshold$1;
17015
17590
  exports.scaleTime = time;
17016
17591
  exports.scaleUtc = utcTime;
17592
+ exports.scaleSequential = sequential;
17017
17593
  exports.schemeCategory10 = category10;
17018
- exports.schemeCategory20b = category20b;
17019
- exports.schemeCategory20c = category20c;
17020
- exports.schemeCategory20 = category20;
17594
+ exports.schemeAccent = Accent;
17595
+ exports.schemeDark2 = Dark2;
17596
+ exports.schemePaired = Paired;
17597
+ exports.schemePastel1 = Pastel1;
17598
+ exports.schemePastel2 = Pastel2;
17599
+ exports.schemeSet1 = Set1;
17600
+ exports.schemeSet2 = Set2;
17601
+ exports.schemeSet3 = Set3;
17602
+ exports.interpolateBrBG = BrBG;
17603
+ exports.schemeBrBG = scheme;
17604
+ exports.interpolatePRGn = PRGn;
17605
+ exports.schemePRGn = scheme$1;
17606
+ exports.interpolatePiYG = PiYG;
17607
+ exports.schemePiYG = scheme$2;
17608
+ exports.interpolatePuOr = PuOr;
17609
+ exports.schemePuOr = scheme$3;
17610
+ exports.interpolateRdBu = RdBu;
17611
+ exports.schemeRdBu = scheme$4;
17612
+ exports.interpolateRdGy = RdGy;
17613
+ exports.schemeRdGy = scheme$5;
17614
+ exports.interpolateRdYlBu = RdYlBu;
17615
+ exports.schemeRdYlBu = scheme$6;
17616
+ exports.interpolateRdYlGn = RdYlGn;
17617
+ exports.schemeRdYlGn = scheme$7;
17618
+ exports.interpolateSpectral = Spectral;
17619
+ exports.schemeSpectral = scheme$8;
17620
+ exports.interpolateBuGn = BuGn;
17621
+ exports.schemeBuGn = scheme$9;
17622
+ exports.interpolateBuPu = BuPu;
17623
+ exports.schemeBuPu = scheme$10;
17624
+ exports.interpolateGnBu = GnBu;
17625
+ exports.schemeGnBu = scheme$11;
17626
+ exports.interpolateOrRd = OrRd;
17627
+ exports.schemeOrRd = scheme$12;
17628
+ exports.interpolatePuBuGn = PuBuGn;
17629
+ exports.schemePuBuGn = scheme$13;
17630
+ exports.interpolatePuBu = PuBu;
17631
+ exports.schemePuBu = scheme$14;
17632
+ exports.interpolatePuRd = PuRd;
17633
+ exports.schemePuRd = scheme$15;
17634
+ exports.interpolateRdPu = RdPu;
17635
+ exports.schemeRdPu = scheme$16;
17636
+ exports.interpolateYlGnBu = YlGnBu;
17637
+ exports.schemeYlGnBu = scheme$17;
17638
+ exports.interpolateYlGn = YlGn;
17639
+ exports.schemeYlGn = scheme$18;
17640
+ exports.interpolateYlOrBr = YlOrBr;
17641
+ exports.schemeYlOrBr = scheme$19;
17642
+ exports.interpolateYlOrRd = YlOrRd;
17643
+ exports.schemeYlOrRd = scheme$20;
17644
+ exports.interpolateBlues = Blues;
17645
+ exports.schemeBlues = scheme$21;
17646
+ exports.interpolateGreens = Greens;
17647
+ exports.schemeGreens = scheme$22;
17648
+ exports.interpolateGreys = Greys;
17649
+ exports.schemeGreys = scheme$23;
17650
+ exports.interpolatePurples = Purples;
17651
+ exports.schemePurples = scheme$24;
17652
+ exports.interpolateReds = Reds;
17653
+ exports.schemeReds = scheme$25;
17654
+ exports.interpolateOranges = Oranges;
17655
+ exports.schemeOranges = scheme$26;
17021
17656
  exports.interpolateCubehelixDefault = cubehelix$3;
17022
- exports.interpolateRainbow = rainbow$1;
17657
+ exports.interpolateRainbow = rainbow;
17023
17658
  exports.interpolateWarm = warm;
17024
17659
  exports.interpolateCool = cool;
17660
+ exports.interpolateSinebow = sinebow;
17025
17661
  exports.interpolateViridis = viridis;
17026
17662
  exports.interpolateMagma = magma;
17027
17663
  exports.interpolateInferno = inferno;
17028
17664
  exports.interpolatePlasma = plasma;
17029
- exports.scaleSequential = sequential;
17030
17665
  exports.create = create;
17031
17666
  exports.creator = creator;
17032
- exports.local = local$1;
17667
+ exports.local = local;
17033
17668
  exports.matcher = matcher$1;
17034
17669
  exports.mouse = mouse;
17035
17670
  exports.namespace = namespace;
@@ -17046,7 +17681,7 @@ exports.touches = touches;
17046
17681
  exports.window = defaultView;
17047
17682
  exports.customEvent = customEvent;
17048
17683
  exports.arc = arc;
17049
- exports.area = area$2;
17684
+ exports.area = area$3;
17050
17685
  exports.line = line;
17051
17686
  exports.pie = pie;
17052
17687
  exports.areaRadial = areaRadial;
@@ -17090,7 +17725,7 @@ exports.stackOffsetDiverging = diverging;
17090
17725
  exports.stackOffsetNone = none$1;
17091
17726
  exports.stackOffsetSilhouette = silhouette;
17092
17727
  exports.stackOffsetWiggle = wiggle;
17093
- exports.stackOrderAscending = ascending$2;
17728
+ exports.stackOrderAscending = ascending$3;
17094
17729
  exports.stackOrderDescending = descending$2;
17095
17730
  exports.stackOrderInsideOut = insideOut;
17096
17731
  exports.stackOrderNone = none$2;